xxxxxxxxxx
The constructor is declared by keyword “constructor” with no function
name, followed by access modifier - public or internal.
xxxxxxxxxx
contract Will {
address owner;
uint fortune;
bool deceased;
//constructor is special function that's going to execute
//when we deploy our solidity
//payable is the function that allow send or recieve ethers
constructor() payable public {
owner= msg.sender; // msg.sender represents address that is being called
fortune=msg.value; //msg.value tells us how much ether is being sent
deceased=false;
}
//create modifier so the only person who can call the contract is the owner
}