These instructions assume that you want to deploy a Solana OFT in MABA mode and require support of the Pausable extension.
For extensions such as Pausable (which appears as PausableConfig on the Mint Account's list of extensions), Anchor 0.32.1 is needed.
The current Solana OFT program is on Anchor 0.31.1. In order to bump it to Anchor 0.32.1 so that the Pausable extension can be supported, several steps need to be carried out:
- in
Anchor.toml:- update the value of
anchor_versionfrom0.31.1to0.32.1
- update the value of
- in
package.json:- update the value of
"@coral-xyz/anchor"from^0.31.1to^0.32.1
- update the value of
- switch solana CLI from
2.2.20to2.3.0- sh -c "$(curl -sSfL https://release.anza.xyz/v2.3.0/install)"
- in
programs/oft/Cargo.toml- update the
anchor-langversion value from0.31.1to0.32.1 - update the
anchor-splversion value from0.31.1to0.32.1 - update the
revvalue foroappandutilsfromc09287ato401e23d
- update the
- run
cargo update - run:
cargo update -p blake3 --precise 1.5.5-cargo update -p constant_time_eq --precise 0.3.1
- in both
lz_receive.rsandlz_receive_types.rs, make the following changes:- modify the line
token_2022::spl_token_2022::{self, solana_program::program_option::COption},to be justtoken_2022::spl_token_2022, - add
use solana_program::program_option::COption;(above the existinguse oapp::endpoint_cpi::LzAccount;line)
- modify the line
- run
pnpm iornpm i
You can now proceed with running
anchor build -v -e OFT_ID=<OFT_PROGRAM_ID>and the rest of the instructions in the README.md
Note: remember to pass in the --token-program param when testing the send command. Leaving it out would result in an ATA not found error.