From b096cdecc17905e355b626c0f7eb816a9b5df84c Mon Sep 17 00:00:00 2001 From: Jon Cinque Date: Fri, 5 Aug 2022 15:21:59 +0200 Subject: [PATCH] Address feedback --- docs/src/token-2022/onchain.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/src/token-2022/onchain.md b/docs/src/token-2022/onchain.md index 98eed4d9..96a6d1a0 100644 --- a/docs/src/token-2022/onchain.md +++ b/docs/src/token-2022/onchain.md @@ -2,12 +2,15 @@ title: On-chain Program Guide --- +## Supporting Token and Token-2022 Together In Your Program + This guide is meant for on-chain program / dapp developers who want to support Token and Token-2022 concurrently. ## Prerequisites -This guide requires the Solana CLI tool suite. +This guide requires the Solana CLI tool suite, minimum version 1.10.33 in order +to support all Token-2022 features. ## Motivation @@ -21,6 +24,10 @@ Important note: if you do not wish to support Token-2022, there is nothing to do Your existing on-chain program will loudly fail if an instruction includes any Token-2022 mints / accounts. +Most likely, your program will fail with `ProgramError::IncorrectProgramId` while +trying to create a CPI instruction into the Token program, providing the Token-2022 +program id. + ## Structure of this Guide To safely code the transition, we'll follow a test-driven development approach: @@ -83,7 +90,7 @@ If you're using `solana-test-validator` for your tests, you can include it using $ solana-test-validator -c TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb ``` -Note: This step is temporary, until Token-2022 is included by default in +**Note**: This step is temporary, until Token-2022 is included by default in `program-test` and `solana-test-validator`. The token-swap does not use `program-test`, so there's a bit more