Skip to content

Instantly share code, notes, and snippets.

@blutarche
Last active July 4, 2022 08:37
Show Gist options
  • Save blutarche/e2d180e79148f0ebbf47df7c46b27b16 to your computer and use it in GitHub Desktop.
Save blutarche/e2d180e79148f0ebbf47df7c46b27b16 to your computer and use it in GitHub Desktop.
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