Version 1 - testnet - 0x24...f167ce
Readme
Versions
1
Dependencies
0
Dependents
0
Analytics
On the way
Memo is an on-chain message board smart contract built on Sui Move. It allows users to publish messages that are permanently stored on the Sui blockchain. The project includes functionality for creating and managing message boards, publishing messages, and supports basic permission control.
MemoBoard: Shared object that stores all message informationMessage: Stores the content, author, and creation time of a single messageAdminCap: Administrator permission object, holders can manage the message boardpost_message: Publish a new message on the message boardget_message: Retrieve a specific message by IDmessage_count: Get the total number of messages on the message boardupdate_max_message_length: Update the maximum message length (admin only)get_max_message_length: Get the current maximum message length limitMessagePosted: Event triggered when a user publishes a new messagesui move build
sui client publish
Below are the key object addresses for the deployed contract:
0x247410b4f7861651cd9af1487c93b67790b4fc94bd44c85c635a976381f167ce0xc98f2a6b0cbd1b64a741afc38a8c212ef55efe6c230c8e989a96e0c54caaf3930xb5340ab36702d74285d218698df2918a804705617aa31de7d7f1358f0264c9fc0xce1169c4cd8e2fecdba4677604b4f2ddd6b4ba60d535e73024860f2980788507sui client call --package <PACKAGE_ID> --module memo --function post_message \
--args <MEMO_BOARD_ID> <MESSAGE_CONTENT>
Example using the deployed contract address on testnet:
sui client call \
--package 0x247410b4f7861651cd9af1487c93b67790b4fc94bd44c85c635a976381f167ce \
--module memo \
--function post_message \
--args \
0xc98f2a6b0cbd1b64a741afc38a8c212ef55efe6c230c8e989a96e0c54caaf393 \
"Hello World" \
0x6
sui client call --package <PACKAGE_ID> --module memo --function update_max_message_length \
--args <ADMIN_CAP_ID> <MEMO_BOARD_ID> <NEW_LENGTH>
Example using the deployed contract address on testnet:
sui client call \
--package 0x247410b4f7861651cd9af1487c93b67790b4fc94bd44c85c635a976381f167ce \
--module memo \
--function update_max_message_length \
--args \
0xb5340ab36702d74285d218698df2918a804705617aa31de7d7f1358f0264c9fc \
0xc98f2a6b0cbd1b64a741afc38a8c212ef55efe6c230c8e989a96e0c54caaf393 \
2048
The project includes a complete test suite, testing the following functionality:
Run tests:
sui move test
AdminCap for permission control, ensuring only administrators can change system settingsone-time witness pattern to ensure safe initializationPull Requests and Issues to improve this project are welcome.
You can install this package in your Move project by calling
mvr add @pkg/memoMemo is an on-chain message board. It allows users to publish messages that are permanently stored on the Sui blockchain.
0xdwong@gmail.com