You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to create an nft with @metaplex-foundation/js. It works fine on the devnet, however does not work on the testnet.
Code snippet:
asyncfunctionmain(){// create a new connection to the cluster's APIconstconnection=newConnection(clusterApiUrl('testnet'),'confirmed');// initialize a keypair for the userconstuser=awaitinitializeKeypair(connection);console.log("PublicKey:",user.publicKey.toBase58());constmetaplex=Metaplex.make(connection).use(keypairIdentity(user)).use(nftStorage({token: process.env.NFT_STORAGE_TOKEN}));// upload NFT data and get the URI for the metadata// Till this point everything is fine on testnetconsturi=awaituploadMetadata(metaplex,carNftData);// create an NFT using the helper function and the URI from the metadataconstnft=awaitmetaplex.nfts().create({uri: uri,name: carNftData.name,sellerFeeBasisPoints: carNftData.sellerFeeBasisPoints,symbol: carNftData.symbol,},{commitment: "finalized"},);console.log(`NFT mintAddress: ${nft.mintAddress}`);console.log(`NFT metadataAddress: ${nft.metadataAddress}`);console.log(`NFT masterEditionAddress: ${nft.masterEditionAddress}`);console.log(`NFT tokenAddress: ${nft.tokenAddress}`);console.log(`NFT response blockhash: ${nft.response.blockhash}`);console.log(`NFT response signature: ${nft.response.signature}`);console.log(`Token Mint: https://explorer.solana.com/address/${nft.mintAddress}?cluster=testnet`);}
Error:
cause: SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Failed to serialize or deserialize account data: Unknown
at Connection.sendEncodedTransaction (/home/solana/solana-workspace/solana-airdrop/node_modules/@solana/web3.js/lib/index.cjs.js:8026:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Connection.sendRawTransaction (/home/solana/solana-workspace/solana-airdrop/node_modules/@solana/web3.js/lib/index.cjs.js:7992:20)
at async RpcClient.sendTransaction (/home/solana/solana-workspace/solana-airdrop/node_modules/@metaplex-foundation/js/dist/cjs/plugins/rpcModule/RpcClient.cjs:69:14)
at async RpcClient.sendAndConfirmTransaction (/home/solana/solana-workspace/solana-airdrop/node_modules/@metaplex-foundation/js/dist/cjs/plugins/rpcModule/RpcClient.cjs:96:23)
at async TransactionBuilder.sendAndConfirm (/home/solana/solana-workspace/solana-airdrop/node_modules/@metaplex-foundation/js/dist/cjs/utils/TransactionBuilder.cjs:115:22)
at async Object.handle (/home/solana/solana-workspace/solana-airdrop/node_modules/@metaplex-foundation/js/dist/cjs/plugins/nftModule/operations/createNft.cjs:71:20)
at async Disposable.run (/home/solana/solana-workspace/solana-airdrop/node_modules/@metaplex-foundation/js/dist/cjs/utils/Disposable.cjs:26:14)
at async main (/home/solana/solana-workspace/solana-airdrop/createNFT.js:67:17) {
logs: [
'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s invoke [1]',
'Program log: Error: BorshIoError',
'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s consumed 3504 of 400000 compute units',
'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s failed: Failed to serialize or deserialize account data: Unknown'
]
},
program: {
name: 'TokenMetadataProgram',
address: PublicKey [PublicKey(metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s)] {
_bn: <BN: b7065b1e3d17c45389d527f6b04c3cd58b86c731aa0fdb549b6d1bc03f82946>
},
errorResolver: [Function: errorResolver]
},
logs: [
'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s invoke [1]',
'Program log: Error: BorshIoError',
'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s consumed 3504 of 400000 compute units',
'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s failed: Failed to serialize or deserialize account data: Unknown'
]
Hi @davidespataro, looks like metaplex features are not loaded on testnet. So, we can only use devnet or mainnet-beta for testing our development features. As per solana developers, testnet is used for validator testing only.
Hi, I am trying to create an nft with
@metaplex-foundation/js
. It works fine on thedevnet
, however does not work on thetestnet
.Code snippet:
Error:
Versions:
node.js: v18.17.1
@metaplex-foundation/js: 0.20.1
@metaplex-foundation/js-plugin-nft-storage: 0.20.0
@solana/spl-token: 0.3.11
@solana/web3.js: 1.89.1
Is this feature supported on testnet? Is there any issue with this?
The text was updated successfully, but these errors were encountered: