-
Notifications
You must be signed in to change notification settings - Fork 4
02. Fallout
Claim ownership of the contract.
The contract used a syntax deprecated since v 0.5. The function meant to be the constructor isn't one. It can actually be called after contract initialisation. It has a public visibility and can be called by anyone.
A constructor is an optional function declared with the constructor keyword which is executed upon contract creation, and where you can run contract initialisation code. Before the constructor code is executed, state variables are initialised to their specified value if you initialise them inline, or zero if you do not. Prior to version 0.4.22, constructors were defined as functions with the same name as the contract. This syntax was deprecated and is not allowed anymore in version 0.5.0.
The Fal1out()
function was supposed to be named Fallout()
and would have been the contract's constructor as syntax previous version 0.5.
Call Fal1out()
.
- Work with the latest compiler versions which are more secure.
- Listen to the compiler warnings.
- Do test driven development to detect typos.