Skip to content

Commit

Permalink
spl: Update mpl-token-metadata to 3.1.0 and fix `create_metadata_…
Browse files Browse the repository at this point in the history
…accounts_v3` (#2651)
  • Loading branch information
febo authored Oct 7, 2023
1 parent 25b24a1 commit b0e725b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ token_2022 = ["spl-token-2022"]
[dependencies]
anchor-lang = { path = "../lang", version = "0.28.0", features = ["derive"] }
borsh = { version = ">=0.9, <0.11", optional = true }
mpl-token-metadata = { version = "3.0.2", optional = true }
mpl-token-metadata = { version = "3.1.0", optional = true }
serum_dex = { git = "https://github.com/openbook-dex/program/", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"], optional = true }
solana-program = ">=1.14, <1.17"
spl-associated-token-account = { version = "^1.1", features = ["no-entrypoint"], optional = true }
Expand Down
6 changes: 5 additions & 1 deletion spl/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ pub fn create_metadata_accounts_v3<'info>(
ctx: CpiContext<'_, '_, '_, 'info, CreateMetadataAccountsV3<'info>>,
data: mpl_token_metadata::types::DataV2,
is_mutable: bool,
update_authority_is_signer: bool,
collection_details: Option<mpl_token_metadata::types::CollectionDetails>,
) -> Result<()> {
let ix = mpl_token_metadata::instructions::CreateMetadataAccountV3 {
Expand All @@ -115,7 +116,10 @@ pub fn create_metadata_accounts_v3<'info>(
payer: *ctx.accounts.payer.key,
rent: None,
system_program: system_program::ID,
update_authority: *ctx.accounts.update_authority.key,
update_authority: (
*ctx.accounts.update_authority.key,
update_authority_is_signer,
),
}
.instruction(
mpl_token_metadata::instructions::CreateMetadataAccountV3InstructionArgs {
Expand Down

1 comment on commit b0e725b

@vercel
Copy link

@vercel vercel bot commented on b0e725b Oct 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anchor-docs – ./

anchor-docs-200ms.vercel.app
www.anchor-lang.com
anchor-docs-git-master-200ms.vercel.app
anchor-lang.com

Please sign in to comment.