当我创建NFT时,我在验证集合时遇到了问题。我正在使用metaplex.nfts().create()函数,并且我确信metaplex.indentity()具有集合NFT的更新权限。我得到以下错误。
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添加到现有的认证集合中?如果不允许这样做,在造币后立即这样做的最好方法是什么?
全堆栈跟踪:
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)发布于 2022-08-24 20:56:44
问题是,在不使用verify_collection指令的情况下,尝试将集合设置为已验证为true。这是不可能的,因为mpl_token_metadata程序检查是否有人试图在不使用该类型的指令检查这里的onchain代码的情况下验证集合。
因此,实际的方法是使用集合not (verified: 0)创建NFT,然后使用createSetAndVerifyCollectionInstruction提供各自账户。
https://stackoverflow.com/questions/73475899
复制相似问题