Chapter 7, Functions, Modifiers, and Fallbacks
- There are four types of scope visibility modifiers available in Solidity – private, internal, public, and external. Also, state variables cannot have external scope visibility.
- The
fallback
andreceive
functions are special Solidity functions that are executed automatically, based on certain conditions. Afallback
function is executed if a function call on a contract is made and such a function does not exist, whereas areceive
function is executed when any value in terms of Ether, wei, or gwei is sent to a contract without any function invocation – for example, using thesend
ortransfer
functions.