Reputation: 1
I have been looking for the best way to find mainnet config data given a Candy Machine ID. This config data would consist of mint price, supply, items available, and go live date. I have seen some webapps display this kind of data to a front end but I can't remember which webapp it was.
After searching, it seems like I will need to do some sort of web3 RPC magic.
Upvotes: 0
Views: 669
Reputation: 867
The easiest way to do it is using project-serum anchor with the CandyMachineIDL (you can fetch it using this). Then you just have to use the fetch function over the CandyMachine Account, in order to have an already decoded data of the CandyMachine state (check that the data that you wanna look is inside candyMachine.data
).
Here is a really good example!
Upvotes: 0
Reputation: 554
You can use the @metaplex-foundation/mpl-candy-machine
package https://www.npmjs.com/package/@metaplex-foundation/mpl-candy-machine
Here is the CandyMachine
class for reference https://github.com/metaplex-foundation/metaplex-program-library/blob/master/candy-machine/js/src/generated/accounts/CandyMachine.ts#L34=
Upvotes: 0