Closed andreisilviudragnea closed 3 months ago
@danenbm Any idea about supporting this in the future again?
Out of curiosity, what are the helper methods?
Edit: The reason I'm asking is some of the helper methods have been moved to other places in the code, something I found out when I upgraded a project to use the new SDK crate.
Yes, please let us know the helper methods you are missing. We would prefer to make sure the Rust client crate works for everyone's use cases rather than publishing the program crate again. We have migrated a few projects from using the program crate to the Rust client crate, and can help with this process.
Hello, @danenbm @samuelvanderwaal @blockiosaurus. We are using some items from token_metadata
Solana program for emulating some token_metadata
instructions on our side: https://github.com/neonlabsorg/neon-evm/blob/develop/evm_loader/program/src/external_programs/metaplex.rs
I also tried adding token_metadata = { git = "https://github.com/metaplex-foundation/mpl-token-metadata.git" }
as a dependency to Cargo.toml
, but I cannot do that because of Solana v1.17 version mismatch, since token_metadata
crate does not support Solana v1.17 (as many other Metaplex dependencies of token_metadata
).
My trials so far can be checked on this branch: https://github.com/neonlabsorg/neon-evm/tree/solana-1.17.6
same here, the PDA utils would be super helpful
@null-prophet all of the PDA helpers should be present in the new clients.
@null-prophet all of the PDA helpers should be present in the new clients.
can you show me where as I searched the code for specific references and looked at the rust docs.
find_master_edition_account
I couldn't find anywhere in the crate code.
Am I looking in the wrong place?
PDA finders now live on their respective accounts. https://docs.rs/mpl-token-metadata/latest/mpl_token_metadata/accounts/struct.MasterEdition.html#method.find_pda
Thanks @blockiosaurus
How would I then access these if I was using these accounts or the original PDA methods in the checks for an account struct in Anchor? Sorry, I'm just new to this ecosystem and finding it hard to find any up to date information on the best way to do things. I'm following along with some NFT minting tutorials to get me up to speed but they are relying on much older v1.x
instances of this crate.
/// CHECK - address
#[account(
mut,
address=find_metadata_account(&mint.key()).0,
)]
pub metadata_account: AccountInfo<'info>, // new
/// CHECK: address
#[account(
mut,
address=find_master_edition_account(&mint.key()).0,
)]
pub master_edition_account: AccountInfo<'info>,
Thanks @blockiosaurus
How would I then access these if I was using these accounts or the original PDA methods in the checks for an account struct in Anchor? Sorry, I'm just new to this ecosystem and finding it hard to find any up to date information on the best way to do things. I'm following along with some NFT minting tutorials to get me up to speed but they are relying on much older
v1.x
instances of this crate./// CHECK - address #[account( mut, address=find_metadata_account(&mint.key()).0, )] pub metadata_account: AccountInfo<'info>, // new /// CHECK: address #[account( mut, address=find_master_edition_account(&mint.key()).0, )] pub master_edition_account: AccountInfo<'info>,
It would be Metadata::find_pda(&mint.key()).0
and MasterEdition::find_pda(&mint.key()).0
@blockiosaurus @danenbm @samuelvanderwaal In my case, we are missing some helpers and some constants present in mpl-token-metadata v1.13.2:
use mpl_token_metadata::assertions::collection::assert_collection_update_is_valid;
use mpl_token_metadata::assertions::uses::assert_valid_use;
use mpl_token_metadata::utils::{assert_data_valid, assert_initialized, puff_out_data_fields};
use mpl_token_metadata::state::{CREATE_FEE, MAX_MASTER_EDITION_LEN, MAX_METADATA_LEN};
use mpl_token_metadata::instruction::{
CreateMasterEditionArgs, CreateMetadataAccountArgsV3, MetadataInstruction,
};
We use them in this file here: https://github.com/neonlabsorg/neon-evm/blob/develop/evm_loader/program/src/external_programs/metaplex.rs
Sorry for the delayed response. You have probably already worked around this by now, but wanted to let you know that at this point we are pretty far down the path of not releasing program crates. I think the best bet for your use case is forking it. And since cargo supports GitHub deps it should be fairly straightforward. Can that work for your scenario?
We just duplicated some missing constants from the program code, it should be ok for us for now.
Since v2.0.0,
mpl-token-metadata
is an SDK crate. The crate versions before that included the program code itself too.Is there any other crate which now contains the removed
mpl-token-metadata
program code? Our project depends on some helper methods from thempl-token-metadata
program itself and we cannot update our codebase to Solana v1.17 because of this problem, sincempl-token-metadata
v1.13.2 does not suport Solana v1.17.