1

I'm working on Counter example of Solana. Everything works well on localnetwork, but when I try on devnet I got the message

Transaction simulation failed: Attempt to debit an account but found no record of a prior credit.

I send SOL to counter's public key, but it doesn't help.

What could I do and why localnet is ok but devnet failed?

1
  • Be sure to deploy the program to devnet if you haven't already!
    – Jon C
    Commented Nov 18 at 12:10

1 Answer 1

1

You do need to have devnet sol in your signer account to perform transactions on devnet. You can see that current signer like this:

solana address

then you can do

solana airdrop YourAddress -ud

Where -ud stands for devnet -um for mainnet and -ul for localnet

If that does not work your can also use faucet.solana.com

Then you can run your script again.

1
  • My account already has SOL on devnet. I try send SOL to counter's public key, but it doesn't help
    – Akkien
    Commented Nov 14 at 16:05

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.