Solidity Series

Solidity Programming Language – State Variable, Local Variable, Global variable

(State Variable in solidity | what are stable variable in solidity):

These are the variable which is declared inside the contract but declare outside the function. When we add public in this variable by default get function add in it Constructor is the first function which will run while executing the smart contract.

(Local variable in solidity | What are local variable in solidity):

Local variables:  It stored in stack.

The variable which we create inside the function that we call as local variable. And this store in memory (which we call as stack or RAM.

Global Variable:

 These are special variables which exist in global workspace and provide information about the blockchain and transaction properties

https://docs.soliditylang.org/en/latest/units-and-global-variables.html

Hi, I’m saksham dixit

Leave a Reply

Your email address will not be published. Required fields are marked *