program-examples icon indicating copy to clipboard operation
program-examples copied to clipboard

token-2022/cpi-guard: add a Pinocchio version

Open MarkFeder opened this issue 4 weeks ago • 0 comments

tokens/token-2022/cpi-guard ships only an Anchor version. This proposes a Pinocchio version, matching the other Token-2022 extension examples that already have one.

CpiGuard can't be toggled through a CPI, so the program exposes one TransferChecked CPI and the test shows the guard's effect: the CPI transfer is rejected while the guard is enabled on the source account, and goes through (balance moves) once it is disabled.

Implementation is ready in #701.

MarkFeder avatar Nov 04 '26 18:11 MarkFeder