gagliardetto/metaplex-go

Question: i got a decode error when i'm using `GetAccountInfo` function to get candymachinev2 state info

gtsigner opened this issue · 11 comments

in exmaple test file
image

image

Many thanks. Could u help me or tell me how to fix this errors?

I'm very interested in your repos built recently for SOLANA, hope i can join you one day.

hey @godtoy

The data contained in the account you're fetching is not a CandyMachine.

Each type of account contains a special 8 bytes at the beginning that determine its type (so that one account type won't be accidentally parsed as another).

The CandyMachine object expects an account that starts with these first 8 bytes: [51, 173, 177, 113, 25, 241, 109, 189]

That's not the case here, which means it's not a CandyMachine.

I figure out why,haha. it's different with CandyMachineV2 IDL

https://explorer.solana.com/address/CMZYPASGWeTz7RNGHaRJfCq2XQ5pYK6nDvVQxzkH51zb/anchor-program

I solved , thank you so much

it's from magiceden, https://magiceden.io/ . could u please add it in this project?

anchor-go is also so amazing

it's from magiceden, https://magiceden.io/ . could u please add it in this project?

I don't have experience with magiceden (no idea how it works).

Same with Candymachine, it just a fork less change.
https://explorer.solana.com/address/CMZYPASGWeTz7RNGHaRJfCq2XQ5pYK6nDvVQxzkH51zb/anchor-program

U can copy this IDL json config to your anchor-go project than gen it to metaplex folder

image

works for me now.

I get it now