Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
520 B
1
Indexable
Never
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "./OwnableUpgradeable.sol";

contract Greeter is OwnableUpgradeable {
    mapping(address=> string) public greetings;

    function __Greeter_init() public initializer {
        __Ownable_init(msg.sender);
    }

    function greet() public view returns (string memory) {
        return greetings[_msgSender()];
    }

    function setGreeting(string memory _greeting) public {
        greetings[_msgSender()] = _greeting;
    }
}