Open tadeoaguilar opened 1 year ago
Yes for me as well- Error: Invalid option tokenMint
i am using candy-machine-ui
, npm i, create .env, and insert my REACT_APP_CANDY_MACHINE_ID=***
I wonder if it has todo with candy-machine-ui using "@project-serum/anchor": "^0.17.0",
dependency - im not sure
in candy-machine-ui it looks like it is happening at getCandyMachineState
, Home.tsx
line: 99 ->
which calls candy-machine.ts
and im seeing issues resolving
const state: any = await program.account.candyMachine.fetch(candyMachineId);
program.account.candyMachine looks like it has the following attributes from logs
_coder:
_idlAccount:
_programId:
_provider:
_size:
coder: (...)
programId:(...)
provider:(...)
size:(...)
but getProgramState()
doesnt seem to get past this line await program.account.candyMachine.fetch(
I tried changing the anchor version to other stable releases but no luck at all. I found that Metaplex has recently updated the documentation. There are new ways to connect with the Cany Machine, I will try and update here. https://docs.metaplex.com/programs/candy-machine/how-to-guides/my-first-candy-machine-part2
Haha, some progress with the new Metaplex guide. I have a different error now.
:82 Uncaught (in promise) TypeError: (0 , _types_BigNumber_mjs__WEBPACK_IMPORTED_MODULE_3__.toBigNumber)(...).toBuffer is not a function at toCandyMachine (CandyMachine.mjs:82:54) at Object.handle (findCandyMachineByAddress.mjs:59:40) at async Disposable.run (Disposable.mjs:22:1) toCandyMachine @ CandyMachine.m
For those who still find the answer, the problem is using the incorrect program id (candy machine v1, v2, or v3) for the account. You can search at https://explorer.solana.com/
by your CANDY_MACHINE_ID
and find assigned program id
, the actual program id that suits your candy machine version. Then set the id to candyMachineProgram
in above snippet
I have an error when using project-serum/anchor library to fetch the status of a Candy Machine. It throws:
Unhandled Runtime Error Error: Invalid option tokenMint
My code is the following:
` const provider = getProvider();
`
Please, any help with this issue will be highly appreciated.