Is there a way to add a message to a send transaction on solana? And how can this be viewed and what is the max message length?
2 Answers
The Memo program exists for this purpose. You can:
- use the memo program to produce a log in the transaction
- leave evidence that the memo was approved by up to 12 signers
Regarding the message length; from the docs:
As of v1.5.1, an unsigned instruction can support single-byte UTF-8 of up to 566 bytes. An instruction with a simple memo of 32 bytes can support up to 12 signers.
Read more here: https://spl.solana.com/memo
There is no feature in core Solana to attach a message to transactions.
However, it can be easily implemented in apps if needed.
Also, the transactions in most apps write message to their log (the log itself is off-chain, though), and standard explorers in the Solana ecosystems display these log messages.