- I am trying to interact with a basic counter program using coral-xyz, deployed it in localnet and devnet but failed to interact with both.
- following soldev/course
- Error: Simulation failed.
Message: Transaction simulation failed: Attempt to load a program that does not exist.
Logs:
[].
Catch the
SendTransactionError
and callgetLogs()
on it for full details.
1 Answer
I am going to assume that you are using Anchor.
The attempt to load a program that does not exists
indicates that perhaps you didn't deploy the program in the cluster your are trying to access it from.
If deploying your program from devnet make sure you've updated your Anchor.toml
to reflect this change
[provider]
cluster = "devnet"
wallet = "~/.config/solana/id.json"
Also make sure you have enough devnet SOL to deploy the program.
You can airdrop yourself some using solana airdrop 5
when your local solana config is set to devnet.
Do not also forget to use an updated IDL of the deployed program on the client side with. anchor build
will usually updated your IDL