Reputation: 141
The title may be a bit misleading, but I'll try to explain what the problem is and the steps to reproduce.
The Problem
Whitelisted users (WL token holders) can't mint an NFT when the gatekeeper is enabled.
Error message: Program returned error: Failed to serialize or deserialize account data: Unknown
Whitelist {burnEveryTime: true} && Gatekeeper: true are interfering with the mint process.
I posted this question on the Metaplex discord server, and after discussions with Metaplex devs, we have decided to post it here to help users facing the same issue.
If you are looking to enable whitelist
functionality and the gatekeeper
challenge for your CandyMachine-v2, then you may come across the issue of not being able to mint even with a WL token.
config.json
looks like this:
{
"price": 0.1,
"number": 1500,
"gatekeeper": {
"gatekeeperNetwork" : "ignREusXmGrscGNUesoU9mxfds9AiYTezUKex2PsZV6",
"expireOnUse" : true
},
"solTreasuryAccount": "FYUfLoqD33rfsYGeEuisLGQhQiifGKrnjmcTQAyjQDUL",
"splTokenAccount": null,
"splToken": null,
"goLiveDate": "01 Jun 2022 00:00:00 GMT",
"endSettings": null,
"whitelistMintSettings": {
"mode" : { "burnEveryTime": true },
"mint" : "DJd3vbwoZgf6V5o9NdpxRVn82PKK7k7KQsRtU9VvjmoK",
"presale" : true,
"discountPrice" : null
},
"hiddenSettings": null,
"storage": "arweave-sol",
"ipfsInfuraProjectId": null,
"ipfsInfuraSecret": null,
"awsS3Bucket": null,
"noRetainAuthority": false,
"noMutable": false
}
You may possibly even get an error message like this:
Program returned error: Failed to serialize or deserialize account data: Unknown
Found in:
https://solscan.io/tx/4Qfxi9As8973AFQ3uCGqcPhvGhiEQdejsnvZ7MEfeGnyvddR4if5f1HKLPSx5S2Nf8w9Ybv4bWkooANwFTSMtrbY?cluster=devnet
Till now, you may have already guessed part of the problem with this configuration and probably thinking 'why the heck do you need a gatekeeper when your whitelist config has "burnEveryTime": true
'.
The Solution
In order to be able to work around this issue, it is best to disable the gatekeeper and proceed to mint without a gatekeeper challenge when your whitelist token will burnEveryTime.
This way, bots won't be able to do their thing since their WL token would burn after initial use.
Steps to reproduce
metaplex
and do the initial setup and installationburnEveryTime: true
cli
or metaplex's front-end candy-machine-ui
Upvotes: 2
Views: 430