gagliardetto / metaplex-go

Go clients for the Metaplex Solana programs
MIT License
39 stars 30 forks source link

support for setCollection during mint #18

Open nftechie opened 2 years ago

nftechie commented 2 years ago

Hello! We hit an issue today during a mint, and realized we needed to set the collection ID during mint.

Here is an example transaction that was bot penaltied: https://explorer.solana.com/tx/2zP6tEw9vzGxGkPSDTyLKEzJieuP57LvzN8ddDbhm2cxaQR3PReqmA8pKLgYQYQP9sBbbABGFnZYqQuSMm6USjBV

You can see the error at the bottom of that tx:

Missing set collection during mint IX for Candy Machine with collection set, Candy Machine Botting is taxed at 10000000 lamports

In early March, it looks like Metaplex added a setCollection method: https://github.com/metaplex-foundation/metaplex/commit/58679aa432fed281cd4a7189123df397a5a266fe

Is there any chance you could add support for this?

nftechie commented 2 years ago

That above metaplex link I sent was for setCollection, but it looks like there's instruction we'd need to set specifically during mint. Here's an example metaplex uses in their typescript client: https://github.com/metaplex-foundation/metaplex/blob/ffd3372a0c5e1700ebc70f8b8835083685eb65ca/js/packages/cli/src/commands/mint.ts#L371