Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why test doesn't run on localnet? #7

Open
torquedrop opened this issue Jul 20, 2022 · 9 comments
Open

Why test doesn't run on localnet? #7

torquedrop opened this issue Jul 20, 2022 · 9 comments

Comments

@torquedrop
Copy link

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.

@anharu2394
Copy link

i have same issue

@torquedrop
Copy link
Author

torquedrop commented Jul 20, 2022

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?

@anharu2394
Copy link

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.

@torquedrop
Copy link
Author

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

@anharu2394
Copy link

anharu2394 commented Jul 22, 2022

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

@torquedrop
Copy link
Author

Thanks @anharu2394

@anoushk1234
Copy link
Owner

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

@anoushk1234
Copy link
Owner

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

@ThunderCross
Copy link

#6 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants