solana-program-library
solana-program-library copied to clipboard
transfer-hook: Relax requirement of validation account
Problem
It's possible to write a perfectly good transfer hook without the extra account metas, and just the transfer hook program. For example, if you add a field to the metadata portion of the mint, a transfer hook program can check only that, so it has no need for anything else.
Summary of changes
Relax the requirement that the extra account metas account is provided. This was surprisingly straightforward, but maybe a little brittle, so let me know what you think.