Last active
July 4, 2022 08:37
-
-
Save blutarche/e2d180e79148f0ebbf47df7c46b27b16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract LoveLetter { | |
... | |
function readMessage(uint256 id) | |
external | |
view | |
returns (string memory message) | |
{ | |
message = letters[id].message; | |
} | |
function checkOpened(uint256 id) external view returns (bool opened) { | |
opened = letters[id].opened; | |
} | |
function getEtherAmount(uint256 id) | |
external | |
view | |
returns (uint256 etherAmount) | |
{ | |
etherAmount = letters[id].etherAmount; | |
} | |
function getSender(uint256 id) external view returns (address sender) { | |
sender = senders[id]; | |
} | |
function getReceiver(uint256 id) external view returns (address receiver) { | |
receiver = receivers[id]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment