refactor(tokens): use kit codecs for instruction data in Token-2022 and create-token examples - #676
refactor(tokens): use kit codecs for instruction data in Token-2022 and create-token examples#676amilz wants to merge 1 commit into
Conversation
…nd create-token examples Replace the borsh instruction-data serializer with @solana/kit codecs in nine token example test suites and drop the borsh dependency from each package. Part of DEV-838
Greptile SummaryThe PR replaces Borsh-based instruction-data serialization with equivalent
Confidence Score: 4/5The code changes appear behaviorally sound, but the unsigned commit must be replaced with a signed, verified commit before merging. The new codecs preserve the existing instruction wire formats, while the sole PR commit reports no signature and therefore violates the repository's mandatory commit-verification policy. Important Files Changed
Reviews (1): Last reviewed commit: "refactor(tokens): use kit codecs for ins..." | Re-trigger Greptile |
| "@solana-program/token": "^0.15.0", | ||
| "@solana/kit": "^7.0.0", | ||
| "borsh": "^2.0.0" | ||
| "@solana/kit": "^7.0.0" |
There was a problem hiding this comment.
Unsigned commit violates policy
Commit feb93df76b435904addf167ef7a6aa90b93c3798 has no signature, so this PR does not satisfy the repository's requirement for signed, verified commits and must be re-signed before approval.
Context Used: Request changes if the commits are not signed (ver... (source)
What changed
Instruction data in these example test suites was built with the
borshpackage. This swaps that for@solana/kitcodecs (getStructEncoder+getU8Encoder, plusaddEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())for the string fields in the create-token examples), so the examples rely on a single serialization library instead of two.borshremoved fromdependenciesin all nine packages (no borsh usage remains in any of them)pnpm@10.33.0stringFollows the pattern established in #675.
Packages
tokens/token-2022/default-account-state/nativetokens/token-2022/mint-close-authority/nativetokens/token-2022/mint-close-authority/pinocchiotokens/token-2022/non-transferable/nativetokens/token-2022/non-transferable/pinocchiotokens/token-2022/transfer-fee/nativetokens/token-2022/multiple-extensions/nativetokens/create-token/nativetokens/create-token/pinocchioTest evidence
For each package:
pnpm install,tsc --noEmit, andpnpm build-and-test(cargo build-sbf + mocha/LiteSVM). All nine pass.prettier --checkis clean on every changed file.Part of DEV-838