add pinocchio multiple-extensions example - #682
Conversation
Greptile SummaryAdds the missing Pinocchio variant of the Token-2022 multiple-extensions example.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "add pinocchio multiple-extensions exampl..." | Re-trigger Greptile |
| "tokens/token-2022/default-account-state/native/program", | ||
| "tokens/token-2022/default-account-state/pinocchio/program", | ||
| "tokens/token-2022/transfer-fee/native/program", | ||
| "tokens/token-2022/transfer-fee/pinocchio/program", |
There was a problem hiding this comment.
Commit f3ac044af7521baf8d9d60091baf0b428d16646d has no signature, violating the repository requirement that pull request commits have verified signatures and blocking this change from being merged.
Context Used: Request changes if the commits are not signed (ver... (source)
There was a problem hiding this comment.
This is a false positive — the commit is signed and GitHub reports it verified. gh api repos/solana-foundation/program-examples/pulls/682/commits returns verification.verified = true, reason = valid for f3ac044a, signed with my registered ED25519 SSH key (SHA256:UVyyOf24fM8y73sfUoms0okbKMJobxlKQjwweQs4BhU); the commit shows a Verified badge in the PR. No re-sign needed.
There was a problem hiding this comment.
You're right, I apologize for the false positive. The GitHub API confirms verification.verified = true with reason = valid for f3ac044a, and the commit shows the Verified badge on the PR. My original comment was incorrect — no action needed on your end.
dev-jodee
left a comment
There was a problem hiding this comment.
can you fix the merge conflicts pls :)
f3ac044 to
ebad3a3
Compare
|
Rebased onto latest |
|
@MarkFeder youll ahve to again ahah |
Port the token-2022/multiple-extensions example to pinocchio. Creates a Token-2022 mint that carries both the MintCloseAuthority and NonTransferable extensions, initialized via hand-built CPIs before InitializeMint (there is no pinocchio crate for Token-2022). Mirrors the native example's instruction wire format and the structure of the merged pinocchio token-2022 siblings. The litesvm test decodes the resulting mint with the official Token-2022 codec and asserts both extensions are present (close authority set, non-transferable), plus the extended mint size (206 bytes).
ebad3a3 to
05bb8f6
Compare
|
Rebased onto |
Adds a pinocchio port of
tokens/token-2022/multiple-extensions, filling the last missing variant for this example (previously native-only).What it does
Creates a Token-2022 mint carrying two extensions at once —
MintCloseAuthorityandNonTransferable— both initialized via hand-built CPIs beforeInitializeMint(Token-2022 rejects initializing extensions once the mint is initialized). There is no pinocchio crate for Token-2022, so the instructions are serialized by hand, consistent with the mergedmint-close-authority,non-transferable,default-account-state, andtransfer-feepinocchio examples.Notes
[token_decimals: u8]) matches the native example.MINT_SIZE = 206= base 165 + account-type 1 + MintCloseAuthority TLV (36) + NonTransferable TLV (4), mirroringExtensionType::try_calculate_account_len::<Mint>(&[MintCloseAuthority, NonTransferable]).@solana/kit^7, litesvm); the test decodes the mint with the official Token-2022 codec and asserts both extensions are present and the extended size.Testing
cargo build-sbf+ litesvm test pass on the Linux/Docker path;cargo clippy -- -D warnings,cargo fmt --check,tsc --noEmit, and prettier (root 3.9.6) all clean.