contract mortal { /* Define variable owner of the type address */ address owner; string str; /* This function is executed at initialization and sets the owner of the contract */ function mortal() { owner = msg.sender; } /* Function to recover the funds on the contract */ function kill() { if (msg.sender == owner) selfdestruct(owner); } function set(string val) public { str = val; } function get() public constant returns (string) { return str; } }
0.4.18