embark/test_app/app/contracts/simple_storage.sol

31 lines
507 B
Solidity
Raw Normal View History

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 {
storedData = x;
}
2017-02-09 19:38:02 -05:00
function get() constant returns (uint retVal) {
return storedData;
}
function getS() constant returns (string d) {
return "hello";
}
2017-02-09 19:38:02 -05:00
}