1

Is it possible to update NFT sellerFeeBasisPoints with @metaplex-foundation/js if the collection authority is not same as nft update authority? I'm using -

const transaction = metaplex.nfts().builders().update({ nftOrSft: fetchNft, sellerFeeBasisPoints: royalty }).toTransaction();
await sendAndConfirmTransaction(connection, transaction, [ wallet ]);

Getting this error -

SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x39
    at Connection.sendEncodedTransaction (C:\Users\DELL\Discord\Bot\test\node_modules\@solana\web3.js\lib\index.cjs.js:6736:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Connection.sendRawTransaction (C:\Users\DELL\Discord\Bot\test\node_modules\@solana\web3.js\lib\index.cjs.js:6693:20)
    at async Connection.sendTransaction (C:\Users\DELL\Discord\Bot\test\node_modules\@solana\web3.js\lib\index.cjs.js:6683:12)
    at async sendAndConfirmTransaction (C:\Users\DELL\Discord\Bot\test\node_modules\@solana\web3.js\lib\index.cjs.js:2210:21)
    at async C:\Users\DELL\Discord\Bot\test\solana.js:17:20 {
  logs: [
    'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s invoke [1]',
    'Program log: Instruction: Unverify Collection',
    'Program log: Incorrect account owner',
    'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s consumed 2785 of 400000 compute units',
    'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s failed: custom program error: 0x39'
  ]
}
2
  • Did you find a solution yet? Commented Dec 25, 2022 at 14:49
  • I answered to this question @Dodecahedr0x Commented Dec 26, 2022 at 15:11

1 Answer 1

2

Thanks to a person in Metaplex discord server, found what I was doing wrong. As we can also update/remove/add collection to a NFT with that method, thus the method requires a collection to be set either it's the same or updated like this -

const transaction = metaplex.nfts().builders().update({ nftOrSft: fetchNft, sellerFeeBasisPoints: royalty, collection: fetchNft?.collection?.address }).toTransaction();

In the above method, setting the collection ensures that the collection of that NFT is not being updated in the process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.