Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix option account of verify collection #168

Merged
merged 1 commit into from
May 16, 2024
Merged

Conversation

Trisato
Copy link
Contributor

@Trisato Trisato commented May 15, 2024

Fix the option account of verify collection. Sorry for the oversight.

@Trisato
Copy link
Contributor Author

Trisato commented May 15, 2024

By the way, I just asked a question about how to get master edition data in the discord, would u pls help check that.
Thank u so much!!! @yihau

@yihau
Copy link
Collaborator

yihau commented May 16, 2024

thank you for your contributions! tbh, I'm not sure which channel you mean. if you wanna get a master edition in this SDK, you will need to

  1. get the address
    func GetMasterEdition(mint common.PublicKey) (common.PublicKey, error) {
    msaterEdtion, _, err := common.FindProgramAddress(
    [][]byte{
    []byte("metadata"),
    common.MetaplexTokenMetaProgramID.Bytes(),
    mint.Bytes(),
    []byte("edition"),
    },
    common.MetaplexTokenMetaProgramID,
    )
    if err != nil {
    return common.PublicKey{}, err
    }
    return msaterEdtion, nil
    }
  2. get account data from the address
  3. for parsing, I haven't integrated this one. you will need to decode the data by yourself. you can check https://github.com/metaplex-foundation/mpl-token-metadata/blob/main/idls/token_metadata.json#L4858-L4880. it won't be too hard to do. hope I can finish the anchor feature asap 😞

@yihau yihau merged commit d16de8d into blocto:main May 16, 2024
9 checks passed
@Trisato
Copy link
Contributor Author

Trisato commented May 17, 2024

Actually, I just sent you private msg in discord. But u already reply me here, I will try to implement it and will raise pr if i can work out.
Thanks You!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants