mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-13 06:06:51 +00:00
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.
21 lines
366 B
Solidity
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;
|
|
}
|
|
}
|