错误:在将幻影钱包连接到糖果机用户界面后,选项 ‘tokenMint’ 无效。

huangapple go评论67阅读模式
英文:

Error: Invalid option 'tokenMint' after connecting phantom wallet to Candy Machine UI

问题

抱歉,这部分内容是代码,我将不会翻译它。以下是要翻译的非代码部分:

我目前正在将Candy Machine UI从QuickNode文档(链接:https://www.quicknode.com/guides/solana-development/nfts/how-to-deploy-an-nft-collection-on-solana-using-sugar-candy-machine#set-up-a-minting-site)集成到我的Web应用程序中。我已成功将我的钱包连接到了Candy Machine UI,但不幸的是,在这之后,当我尝试点击铸造按钮时,控制台中出现以下错误:

错误信息如下:

Error: Invalid option tokenMint
    at OptionLayout.decode (index.ts:148:1)
    at Structure.decode (Layout.js:1234:1)
    at AccountsCoder.decode (accounts.ts:51:1)
    at AccountClient.fetchNullable (account.ts:143:1)
    at async AccountClient.fetch (account.ts:152:1)
    at async getProgramState (candy-machine.ts:178:1)
    at async Promise.all (:3000/index 0)
    at async getCandyMachineState (candy-machine.ts:187:1)
    at async Home.tsx:99:1

我按照以下步骤进行操作:

  1. 使用 npm i 安装了依赖项。
  2. 然后使用 npm start 启动了应用程序。

但是我遇到了一个错误:Error: error:0308010C:digital envelope routines::unsupported.so。我在 package.json 中添加了 --openssl-legacy-provider,然后它就工作了。之后,我将钱包连接到了一个网页,但是出现了以下情况:

铸造按钮禁用

所以我查看了控制台,看到了 Error: Invalid option tokenMint 的错误信息。

期望的输出应该是这样的:

期望输出

英文:

I'm currently integrating the Candy Machine UI from the QuickNode documentation (link: https://www.quicknode.com/guides/solana-development/nfts/how-to-deploy-an-nft-collection-on-solana-using-sugar-candy-machine#set-up-a-minting-site) into my web application. I've successfully connected my wallet to the Candy Machine UI, but unfortunately, I encounter the following error after doing so in the console as the mint button seems disabled:

Error: Invalid option tokenMint
    at OptionLayout.decode (index.ts:148:1)
    at Structure. decode (Layout.js:1234:1)
    at AccountsCoder.decode (accounts.ts:51:1)
    at AccountClient.fetchNullable (account.ts:143:1)
    at async AccountClient.fetch (account.ts:152:1)
    at async getProgramState (candy-machine.ts:178:1)
    at async Promise.all (:3000/index 0)
    at async getCandyMachineState (candy-machine.ts:187:1)
    at async Home.tsx:99:1
  1. I installed dependencies with npm i
  2. then I started the application using npm start.

but I got an error Error: error:0308010C:digital envelope routines::unsupported.so I added --openssl-legacy-provider to package.json and it worked then I connected the wallet to a webpage after that it looked like this:
disabled mint button

so I went through the console and saw the error Error: Invalid option tokenMint.

it should look like this:
Desired Output

答案1

得分: 0

  1. 请注意,您正在使用过时的指南。您试图使用的用户界面仅支持糖果机 v2。如果您按照指南安装 Sugar,它将创建一个糖果机 v3(账户版本2)。该用户界面将无法与其配合使用。

  2. digital envelope routines::unsupported.so 错误与使用错误的节点版本有关。

  3. 错误 Error: Invalid option tokenMint 表明您正在使用白名单代币,但您的钱包中没有或在 Sugar 配置中设置错误。

与其使用这个过时的指南,我建议使用一个可以与最新的 Sugar 和糖果机版本一起使用的用户界面,例如 https://github.com/MarkSackerberg/umi-cmv3-ui-inofficial

英文:
  1. be aware that you are using a outdated guide here. The UI that you are trying to use only supports candy machine v2. If you install sugar like the guide says it will create a candy machine v3 (account version 2) though. The UI will not work with it.

  2. the digital envelope routines::unsupported.so error is related to using a wrong node version.

  1. The error Error: Invalid option tokenMint indicates that you are using a whitelist token and either do not have it in your wallet or set it incorrectly in your sugar config.

Instead of using this outdated guide i would rather use a UI that can work with the latest sugar and candy machine version. e.g. https://github.com/MarkSackerberg/umi-cmv3-ui-inofficial

huangapple
  • 本文由 发表于 2023年7月27日 23:17:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76781215.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定