https://twitter.com/pencilflip/status/1459631153082552320?s=21
-
Run solana-test-validator
-
Download SPL locally https://github.com/solana-labs/solana-program-library/tree/762c584dfe88d857575d0e079a9022523670969b
-
cd /token-swap
-
cargo build-bpf
-
deploy /solana-program-library/target/deploy/spl_token_swap.so
Note that spl_token_swap.so is not the default value the SPL offers to deploy, so you need to write the deploy path manually.
-
Change
TOKEN_SWAP_PROGRAM_ID
in the index.ts file to the local Token Swap program id -
Change
IS_LOCAL_DEVELOPMENT
in the index.ts file totrue
. -
Change "@solana/spl-token-swap": "0.1.2" to "@solana/spl-token-swap": "0.1.3" in the package.json
-
Comment out the
nonce
in the TokenSwap.createTokenSwap function. I's not needed since 0.1.3.
npm install
npx ts-node -s index.ts