Add Token-2022 group Pinocchio example - #704
Conversation
Greptile SummaryThe PR adds a Pinocchio implementation of the Token-2022 group example, creating a PDA-owned mint with a self-referential GroupPointer extension.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or non-blocking defects identified. The PDA derivation and signing scheme are aligned, the extended mint is allocated and initialized in the required order, the hand-built instruction layouts match established sibling implementations, and the test covers the resulting on-chain account shape. Important Files Changed
Reviews (1): Last reviewed commit: "token-2022 group: add pinocchio example" | Re-trigger Greptile |
|
@amilz could you take a look at this one when you get a chance? No open review threads left on it, so it is ready for maintainer review. It is one of 23 open Pinocchio ports I have up — they are independent and self-contained, so they can be reviewed and merged in any order: https://github.com/solana-developers/program-examples/pulls/MarkFeder |
Pinocchio port of
tokens/token-2022/group, mirroring the anchor example.[b"group"]PDA) carrying the GroupPointer extension, pointing at itself as both pointer authority and group address.GroupPointer(discriminator 40 / sub 0) is initialized beforeInitializeMint2; the mint is created via a PDA-signedCreateAccount(invoke_signed).TokenGroupInitializeout — the group/member data instructions aren't live on Token-2022 yet.GroupPointerextension (authority + group address both the mint PDA).All CPIs are hand-built (no pinocchio Token-2022 crate).