github.com/hashgraph/hedera-sdk-go/v2@v2.48.0/examples/create_simple_contract/hello_world.sol (about) 1 pragma solidity >=0.4.22 <0.6.0; 2 3 contract HelloWorld { 4 // the contract's owner, set in the constructor 5 address owner; 6 7 constructor() public { 8 // set the owner of the contract for `kill()` 9 owner = msg.sender; 10 } 11 12 // return a string 13 function greet() public pure returns (string memory) { 14 return "Hello, world!"; 15 } 16 17 // recover the funds of the contract 18 function kill() public { if (msg.sender == owner) selfdestruct(msg.sender); } 19 }