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.
23 lines
519 B
23 lines
519 B
6 years ago
|
pragma solidity ^0.5.1;
|
||
|
|
||
|
contract SimpleStorage {
|
||
|
|
||
|
event ValueChanged(address indexed author, string oldValue, string newValue);
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
}
|