embark/dapps/templates/demo/contracts/simple_storage.sol
Jonathan Rainville 5592753116 fix(@embark/blockchain-api): add back contract event listen and log
Adds back the watch on contract events and writes them to a file
with the same method as contract logs from transaction-logger, so
I extracted those methods to utils/file so that both could use the
same functions.
2020-02-07 14:24:03 -05:00

21 lines
366 B
Solidity

pragma solidity ^0.6.0;
contract SimpleStorage {
uint public storedData;
event Set(address caller, uint _value);
constructor(uint initialValue) public {
storedData = initialValue;
}
function set(uint x) public {
storedData = x;
emit Set(msg.sender, x);
}
function get() public view returns (uint retVal) {
return storedData;
}
}