remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/libs/remix-tests/tests/examples_1/simple_storage.sol

22 lines
389 B

pragma solidity >= 0.5.0 < 0.8.0;
7 years ago
contract SimpleStorage {
uint public storedData;
event Stored(uint256 value);
constructor() public {
7 years ago
storedData = 100;
}
function set(uint x) public {
storedData = x;
emit Stored(x);
emit Stored(x+10); // for testing multiple events only
7 years ago
}
function get() public view returns (uint retVal) {
return storedData;
}
}