Last active
August 22, 2025 10:09
-
-
Save KBPsystem777/6789d7f31758ee36b9a3a670b018961b to your computer and use it in GitHub Desktop.
BitDev's Thanksify Smart Contract
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.19; | |
| contract Thanksify { | |
| address public owner; | |
| struct Message { | |
| string text; | |
| address sender; | |
| uint256 timestamp; | |
| } | |
| mapping(address => Message[]) public messagesByUser; | |
| event MessageSaved(address indexed sender, string message, uint256 timestamp); | |
| constructor() { | |
| owner = msg.sender; | |
| } | |
| /// @dev Insert the saveMessage function here | |
| function getMyMessages() public view returns (Message[] memory) { | |
| return messagesByUser[msg.sender]; | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sonic CodeCamp Cheatsheet
Sonicscan API key:
9IVTYAG8HTK97KENV8VII4K5K9MSQ32QYFHow to deploy and verify your NFT smart contract in Sonic Blaze Testnetwork?
1. Update your
hardhat.config.jsfile loacted in π\packages\hardhat\hardhat.config.tsand paste the code below.2. Paste this code on your
networks.tsfile located under π\packages\nextjs\utils\scaffold-eth\networks.ts3. Lastly, update your
scaffold.config.tsfile under π\packages\nextjs\scaffold.config.ts