anchor
anchor copied to clipboard
Update spl-token-2022 to v1.0.0 on anchor-spl
spl-token-2022
1.0.0 introduces new ExtensionType
s, such as GroupPointer
, GroupMemberPointer
, TokenGroup
, TokenGroupMember
. These extensions are already being used in mints. Currently, anchor-spl
cannot deserialize these extensions since it is pinned to v0.9. The solution here would be to bump spl-token-2022
dependency to 1.0.0 on anchor-spl
.
Yes, will do. Does the accounts not deserialize e.g. when using TokenAccount
or is it the exported spl_token_2022
module that doesn't have the functionality to deserialize the new extensions? If it's the latter, you should be able to specify
spl-token-2022 = "1"
in your Cargo.toml
to use the latest version.
It is the former case. It happens when checking the extensions on the mint account before initializing the token account:
let mint_extensions = mint_state.get_extension_types()?;
This uses the import from:
use ::anchor_spl::token_2022::spl_token_2022::extension::{
BaseStateWithExtensions, ExtensionType, StateWithExtensions,
};
So it will require a version bump.
FYI, there is a problem with the 1.18
release which I believe is currently being worked on. The upgrade is blocked until that problem has some sort of a resolution.