Token-2022
Why Token-2022 composes as a plan step with no special casing.
Token-2022 is not a special case in PTBVM. It is a program like any other, so a Token-2022 instruction is a plan step with the same shape as any step. Its program id is a constant in the client:
export const TOKEN_2022 = new PublicKey(
"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
);What this enables
- A
transfer_checkedthat carries transfer fees and hooks, run as a step, with a follow-up step keyed off the result. - Composing extension-bearing tokens into a multi-step flow without the VM needing to know anything about the extensions.