Last active
August 11, 2020 12:53
-
-
Save stefan2904/848468ad9314c453205d3289600bba0b to your computer and use it in GitHub Desktop.
Some demo Smart Contract (deploy via https://remix.ethereum.org)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.4.22 <0.7.0; | |
/** | |
* @title VerrStorage | |
* @dev Store & retreive value in a variable | |
*/ | |
contract VerrStorage { | |
address payable public owner = msg.sender; | |
uint public creationTime = block.timestamp; | |
uint256 number; | |
/** | |
* @dev Store value in variable | |
* @param num value to store | |
*/ | |
function store2(uint256 num) public { | |
number = num; | |
} | |
/** | |
* @dev Return value | |
* @return value of 'number' | |
*/ | |
function retreive() public view returns (uint256){ | |
return number; | |
} | |
function kill() public { | |
if (msg.sender == owner) | |
selfdestruct(owner); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment