embark-area-51/test_app/app/contracts/simple_storage.sol

31 lines
542 B
Solidity

pragma solidity ^0.4.18;
import "ownable.sol";
contract SimpleStorage is Ownable {
uint public storedData;
function() public payable { }
function SimpleStorage(uint initialValue) public {
storedData = initialValue;
}
function set(uint x) public {
storedData = x;
}
function set2(uint x, uint unusedGiveWarning) public onlyOwner {
storedData = x;
}
function get() public view returns (uint retVal) {
return storedData;
}
function getS() public pure returns (string d) {
return "hello";
}
}