We Define the Basic Smart Contract
This is the very basic smart contract. It can receive Ether and itās possible to withdraw Ether, but all in all, not very useful quite yet. Letās see if we can improve this a bit in the next step.
Prior Solidity 0.6 the fallback function was simply called āfunction() external payableā - a Function without a name. Since Solidity 0.6 there are two different functions: one called fallback and the other one called āreceiveā. Only āreceiveā can receive ether. You can read more about this in my walkthroughā!
Also, the code in this lab has been ported to Solidity 0.8.
The most prominent change is the removal of the SafeMath library, since Solidity 0.8 doesnāt do automatic integer rollovers anymore. Read more about this in the topic about Overflow and Underflow. In the lab are notes where Solidity 0.8 changes come in.