metaplex-anchor-nft icon indicating copy to clipboard operation
metaplex-anchor-nft copied to clipboard

Why test doesn't run on localnet?

Open vadymsidachenko opened this issue 2 years ago • 9 comments

I tried to do test on local net.

But it's failed. error output:

Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: instruction expected an executable account
      at Connection.sendEncodedTransaction (node_modules/@solana/web3.js/src/connection.ts:4480:13)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at Connection.sendRawTransaction (node_modules/@solana/web3.js/src/connection.ts:4439:20)
      at sendAndConfirmRawTransaction (node_modules/@project-serum/anchor/src/provider.ts:284:21)
      at AnchorProvider.sendAndConfirm (node_modules/@project-serum/anchor/src/provider.ts:144:14)
      at MethodsBuilder.rpc [as _rpcFn] (node_modules/@project-serum/anchor/src/program/namespace/rpc.ts:29:16)

And another questions: 1.Why you don't create associate token on contract? 2.Can I change this contract to do batch mint?

I'm beginner at solana. so I need you help now. Please give me a hand.

vadymsidachenko avatar Jul 20 '22 11:07 vadymsidachenko

i have same issue

anharu2394 avatar Jul 20 '22 16:07 anharu2394

I think it doesn't run on localnet because TOKEN_METADATA_PROGRAM_ID. I tried it on devnet and it runs correctly. But I can't find that test signature on devnet solcsan. What's the problem?

vadymsidachenko avatar Jul 20 '22 17:07 vadymsidachenko

I've solved and passed the test. You can check up Token metadata program id on localnet by using Solana explorer. https://explorer.solana.com/address/metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s?cluster=devnet

Make sure token metadata program is correct.

anharu2394 avatar Jul 21 '22 03:07 anharu2394

I think it's just devent, not localnet? How do explorer localnet transaction?

vadymsidachenko avatar Jul 21 '22 09:07 vadymsidachenko

You can set the Custom rpc url, so you can explorer on localnet. image

anharu2394 avatar Jul 22 '22 16:07 anharu2394

Thanks @anharu2394

vadymsidachenko avatar Jul 22 '22 23:07 vadymsidachenko

You have to deploy the metaplex program on localnet for it to work, i used a tool called Amman that does that

anoushk1234 avatar Jul 28 '22 15:07 anoushk1234

Look at how Metaplex has implemented it https://github.com/metaplex-foundation/js/blob/main/.ammanrc.js

anoushk1234 avatar Jul 28 '22 15:07 anoushk1234

https://github.com/anoushk1234/metaplex-anchor-nft/issues/6#issuecomment-1231194670

ThunderCross avatar Aug 30 '22 06:08 ThunderCross