April 2018
Intermediate to advanced
222 pages
5h 28m
English
Scoping refers to the availability of a variable within a function and a contract in Solidity. Solidity provides the following two locations where variables can be declared:
It is quite easy to understand function-level local variables. They are only available anywhere within a function and not outside.
Contract-level global variables are variables that are available to all functions including constructor, fallback, and modifiers within a contract. Contract-level global variables can have a visibility modifier attached to them. It is important to understand that state data can be viewed across the entire network irrespective of ...