ipld-eth-server/test/contract/contracts/Greeter.sol
2021-04-16 16:57:11 +03:00

22 lines
401 B
Solidity

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.0;
contract Greeter {
string greeting;
event Greet(string value);
constructor(string memory _greeting) {
greeting = _greeting;
}
function greet() public view returns (string memory) {
return greeting;
}
function setGreeting(string memory _greeting) public {
greeting = _greeting;
emit Greet(greeting);
}
}