Payable function modifiers provide a mechanism to receive funds in your smart contract. These functions are annotated with the payable…
Solidity Basics
Learn how to develop a Solidity smart contract
Struct in Solidity smart contracts
Structs are custom data types that can group several variables. They represent a record of “something”. Suppose you want to…
Enum in Solidity smart contracts
Short for enumeration, enums restrict a variable to have one of only a few predefined values. The values in this…
Maps in a solidity smart contract
This post has been updated click here A map is like a hash table that allows you to save data…
How to create an array in a Solidity smart contract
In place of creating different variables of the same data type you can create an array to store a list…
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…