2018-04-20 15:39:17 +00:00
|
|
|
pragma solidity ^0.4.17;
|
|
|
|
|
|
|
|
import "https://github.com/embark-framework/embark/blob/develop/test_apps/contracts_app/contracts/ownable.sol";
|
2018-09-12 18:08:11 +00:00
|
|
|
import "https://github.com/embark-framework/embark/blob/develop/test_apps/contracts_app/contracts/contract_args.sol";
|
2018-04-20 15:39:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
contract SimpleStorageWithHttpImport is Ownable {
|
|
|
|
uint public storedData;
|
|
|
|
|
|
|
|
function() public payable { }
|
|
|
|
|
2018-09-14 18:20:41 +00:00
|
|
|
constructor(uint initialValue) public {
|
2018-04-20 15:39:17 +00:00
|
|
|
storedData = initialValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
function set(uint x) public {
|
|
|
|
storedData = x;
|
|
|
|
for(uint i = 0; i < 1000; i++) {
|
|
|
|
storedData += i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-14 18:20:41 +00:00
|
|
|
function set2(uint x) public onlyOwner {
|
2018-04-20 15:39:17 +00:00
|
|
|
storedData = x;
|
|
|
|
}
|
|
|
|
|
|
|
|
function get() public view returns (uint retVal) {
|
|
|
|
return storedData;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getS() public pure returns (string d) {
|
|
|
|
return "hello";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|