Toolbox

Transaction Memo

The SPL Memo program allows you to attach text notes - i.e. memos - to transactions. You can learn more about this program in Solana's official documentation.

Add memos to transactions

This instruction allows you to add a memo to a transaction.

import { transactionBuilder } from '@metaplex-foundation/umi'
import { addMemo } from '@metaplex-foundation/mpl-toolbox'

await transactionBuilder()
  .add(...) // Any instruction(s) here.
  .add(addMemo(umi, { memo: 'Hello world!' })) // Add a memo to the transaction.
  .sendAndConfirm(umi)
Previous
Address Lookup Table