mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-09 13:36:14 +00:00
ee77ac7f7f
Ref: #817
34 lines
573 B
Solidity
34 lines
573 B
Solidity
pragma solidity ^0.4.17;
|
|
|
|
import "ownable.sol";
|
|
|
|
contract SimpleStorage is Ownable {
|
|
uint public storedData;
|
|
|
|
function() public payable { }
|
|
|
|
constructor(uint initialValue) public {
|
|
storedData = initialValue;
|
|
}
|
|
|
|
function set(uint x) public {
|
|
storedData = x;
|
|
for(uint i = 0; i < 1000; i++) {
|
|
storedData += i;
|
|
}
|
|
}
|
|
|
|
function set2(uint x) public onlyOwner {
|
|
storedData = x;
|
|
}
|
|
|
|
function get() public view returns (uint retVal) {
|
|
return storedData;
|
|
}
|
|
|
|
function getS() public pure returns (string d) {
|
|
return "hello";
|
|
}
|
|
|
|
}
|