首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用metaplex.nfts().create()函数将NFT添加到经过认证的集合中

使用metaplex.nfts().create()函数将NFT添加到经过认证的集合中
EN

Stack Overflow用户
提问于 2022-08-24 15:30:12
回答 1查看 204关注 0票数 0

当我创建NFT时,我在验证集合时遇到了问题。我正在使用metaplex.nfts().create()函数,并且我确信metaplex.indentity()具有集合NFT的更新权限。我得到以下错误。

代码语言:javascript
复制
 MetaplexError: TokenMetadataProgram > Cannont Verify Collection in this Instruction
>> Source: Program > TokenMetadataProgram [metaqbxx...x1s]
>> Problem: The program [TokenMetadataProgram] at address [meta...x1s] raised an error of code [74] that translates to "Cannont Verify Collection in this Instruction".
>> Solution: Check the error message provided by the program.
Caused By: CollectionCannotBeVerifiedInThisInstruction: Cannont Verify Collection in this Instruction

我还知道,与NFT的造币有关的其他一切都很好,因为当我用verified: 0添加集合时,它工作得很好。

是否能够使用metaplex.nfts().create()函数将NFT添加到现有的认证集合中?如果不允许这样做,在造币后立即这样做的最好方法是什么?

全堆栈跟踪:

代码语言:javascript
复制
at RpcClient.parseProgramError (file:///.../node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:206:28)
      at RpcClient.sendTransaction (file:///.../node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:48:18)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async RpcClient.sendAndConfirmTransaction (file:///.../node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:69:23)
      at async TransactionBuilder.sendAndConfirm (file:///.../node_modules/@metaplex-foundation/js/dist/esm/utils/TransactionBuilder.mjs:131:22)
      at async file:///.../node_modules/@metaplex-foundation/js/dist/esm/utils/Task.mjs:58:23
      at async Disposable.run (file:///.../node_modules/@metaplex-foundation/js/dist/esm/utils/Disposable.mjs:22:14)
      at async Task.callback (file:///.../node_modules/@metaplex-foundation/js/dist/esm/plugins/nftModule/NftClient.mjs:48:22)
      at async file:///.../node_modules/@metaplex-foundation/js/dist/esm/utils/Task.mjs:58:23
      at async Disposable.run (file:///.../node_modules/@metaplex-foundation/js/dist/esm/utils/Disposable.mjs:22:14)
      at async mintNft (file:///.../src/mint/mint_lib.js:46:29)
      at async mint (file:///.../src/mint/mint_lib.js:71:12)
      at async Context.<anonymous> (file:///.../test/mint-test.js:27:20)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-08-24 20:56:44

问题是,在不使用verify_collection指令的情况下,尝试将集合设置为已验证为true。这是不可能的,因为mpl_token_metadata程序检查是否有人试图在不使用该类型的指令检查这里的onchain代码的情况下验证集合。

因此,实际的方法是使用集合not (verified: 0)创建NFT,然后使用createSetAndVerifyCollectionInstruction提供各自账户

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73475899

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档