In place of creating different variables of the same data type you can create an array to store a list…
Solidity
How to create a For Loop in a Solidity smart contract
A loop will run n times where n is the number we pass into the function. There should be an…
Fallback function in Solidity smart contracts
A fallback function is executed when a contract receives Ether without any additional data. For your contract to receive Ether…
Error Handling in Solidity smart contracts
Assert – is used to check for conditions that should never be possible. Asserts should always evaluate to true and…
Events in Solidity smart contracts
Events are used to inform a calling application about the current state of a smart contract. As transactions occur on…
Gas in Solidity smart contracts
In Solidity Gas is a fee which is required to conduct a transaction on the Ethereum blockchain. Gas prices are specified in gwei. Gwei…
Pure and View in Solidity smart contracts
Pure, view and payable dictate a Solidity functions behavior. If the behavior of a function is not specified by default…
Function modifiers in Solidity smart contracts
Function modifiers are used to change or restrict the behavior of a function in a smart contract. You can use…