mirror of
https://github.com/tornadocash/tornado-trees.git
synced 2024-06-16 01:13:33 +02:00
23 lines
520 B
Solidity
23 lines
520 B
Solidity
|
//SPDX-License-Identifier: MIT
|
||
|
pragma solidity ^0.6.0;
|
||
|
|
||
|
import "hardhat/console.sol";
|
||
|
|
||
|
contract Greeter {
|
||
|
string greeting;
|
||
|
|
||
|
constructor(string memory _greeting) public {
|
||
|
console.log("Deploying a Greeter with greeting:", _greeting);
|
||
|
greeting = _greeting;
|
||
|
}
|
||
|
|
||
|
function greet() public view returns (string memory) {
|
||
|
return greeting;
|
||
|
}
|
||
|
|
||
|
function setGreeting(string memory _greeting) public {
|
||
|
console.log("Changing greeting from '%s' to '%s'", greeting, _greeting);
|
||
|
greeting = _greeting;
|
||
|
}
|
||
|
}
|