Block Matrix
Menu

Solana Token-2022 Transfer Hooks: A Devnet Tutorial on Transfer Limits

What does a Token-2022 transfer need to supply when a Transfer Hook checks its amount? A tutorial published on November 14, 2026, walks through a Devnet example that uses Anchor 0.31.1 and the SPL Transfer Hook interface to enforce a maximum transfer amount.

The tutorial covers how an ExtraAccountMetaList PDA is derived and used to resolve accounts on-chain, how its TLV data is initialized, and how Anchor’s fallback routing handles a Transfer Hook instruction whose discriminator does not match an ordinary Anchor instruction.

For the Devnet workflow, it shows how to create a Hook-enabled mint with the spl-token CLI, initialize the PDA through a TypeScript call, and test both outcomes: a transfer above the limit fails, while one within the limit succeeds. These are the tutorial’s demonstrated tests, not a claim that every Hook-enabled mint uses the same checks.