ipld-eth-server/test/contract/contracts/Greeter.sol

22 lines
401 B
Solidity
Raw Normal View History

2021-04-16 13:57:11 +00:00
//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);
}
}