2018-11-19 10:29:02 +00:00
|
|
|
pragma solidity ^0.5.0;
|
2018-05-04 01:00:38 +00:00
|
|
|
|
2015-05-24 13:07:19 +00:00
|
|
|
contract SimpleStorage {
|
2015-06-20 12:36:40 +00:00
|
|
|
uint public storedData;
|
2015-06-15 01:38:00 +00:00
|
|
|
|
2018-05-04 01:00:38 +00:00
|
|
|
constructor(uint initialValue) public {
|
2015-06-20 12:36:40 +00:00
|
|
|
storedData = initialValue;
|
2015-06-15 01:38:00 +00:00
|
|
|
}
|
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function set(uint x) public {
|
2016-08-18 00:29:41 +00:00
|
|
|
storedData = x;
|
2015-05-24 13:07:19 +00:00
|
|
|
}
|
2016-08-18 00:29:41 +00:00
|
|
|
|
2017-10-21 19:01:09 +00:00
|
|
|
function get() public view returns (uint retVal) {
|
2015-05-24 13:07:19 +00:00
|
|
|
return storedData;
|
|
|
|
}
|
2019-03-05 22:45:18 +00:00
|
|
|
}
|