Skip to content

Instantly share code, notes, and snippets.

@nazreen
Last active March 3, 2026 18:27
Show Gist options
  • Select an option

  • Save nazreen/b4928fd1375a50945fc8992b7dbfa1de to your computer and use it in GitHub Desktop.

Select an option

Save nazreen/b4928fd1375a50945fc8992b7dbfa1de to your computer and use it in GitHub Desktop.
upgrading to anchor 0.32.1

Upgrading to Anchor 0.32.1 / Supporting the Pausable extension for Solana OFTs

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_version from 0.31.1 to 0.32.1
  • in package.json:
    • update the value of "@coral-xyz/anchor" from ^0.31.1 to ^0.32.1
  • switch solana CLI from 2.2.20 to 2.3.0
  • in programs/oft/Cargo.toml
    • update the anchor-lang version value from 0.31.1 to 0.32.1
    • update the anchor-spl version value from 0.31.1 to 0.32.1
    • update the rev value for oapp and utils from c09287a to 401e23d
  • 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.rs and lz_receive_types.rs , make the following changes:
    • modify the line token_2022::spl_token_2022::{self, solana_program::program_option::COption}, to be just token_2022::spl_token_2022,
    • add use solana_program::program_option::COption; (above the existing use oapp::endpoint_cpi::LzAccount; line)
  • run pnpm i or npm 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment