ethers-rs/ethers-contract/tests/contract.sol

25 lines
581 B
Solidity
Raw Normal View History

2020-06-01 23:15:33 +00:00
pragma solidity >=0.4.24;
contract SimpleStorage {
event ValueChanged(address indexed author, string oldValue, string newValue);
address public lastSender;
2020-06-01 23:15:33 +00:00
string _value;
constructor(string memory value) public {
emit ValueChanged(msg.sender, _value, value);
_value = value;
}
function getValue() view public returns (string memory) {
return _value;
}
function setValue(string memory value) public {
emit ValueChanged(msg.sender, _value, value);
_value = value;
lastSender = msg.sender;
2020-06-01 23:15:33 +00:00
}
}