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