2017-10-22 13:27:13 +00:00
|
|
|
pragma solidity ^0.4.7;
|
2017-07-16 18:11:37 +00:00
|
|
|
|
|
|
|
import "ownable.sol";
|
|
|
|
|
|
|
|
contract SimpleStorage is Ownable {
|
2017-02-10 00:38:02 +00:00
|
|
|
uint public storedData;
|
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function() public payable { }
|
2017-04-02 18:12:12 +00:00
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function SimpleStorage(uint initialValue) public {
|
2017-02-10 00:38:02 +00:00
|
|
|
storedData = initialValue;
|
|
|
|
}
|
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function set(uint x) public {
|
2017-02-10 00:38:02 +00:00
|
|
|
storedData = x;
|
|
|
|
}
|
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function set2(uint x, uint unusedGiveWarning) public onlyOwner {
|
2017-07-15 15:35:29 +00:00
|
|
|
storedData = x;
|
|
|
|
}
|
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function get() public view returns (uint retVal) {
|
2017-02-10 00:38:02 +00:00
|
|
|
return storedData;
|
|
|
|
}
|
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function getS() public pure returns (string d) {
|
2017-02-28 01:32:26 +00:00
|
|
|
return "hello";
|
|
|
|
}
|
|
|
|
|
2017-02-10 00:38:02 +00:00
|
|
|
}
|