Skip to main content
2 votes

Unable to find devnet logs for errored programs with Java client

Could be that the Java client is not skipping Preflight, aka. Transaction simulation, which means that if you have a transaction that automatically fails, the client won't even send the transaction.
Orion's user avatar
  • 124
2 votes

Testing transactions that should fail with anchor

Suppose you have your rust code like this pub fn call(ctx: Context<Call>) -> Result<()> { return Err(CallError::ErrorExpected.into()) } pub struct Call<'info> { #[account(...
chinepun.sol's user avatar
1 vote

Solana sing failing - keypair-pubkey mismatch

You're fetching a transaction from the Jupiter API, which is signed against a mainnet-beta blockhash, and then sending that transaction to devnet, where the blockhash doesn't exist. Be sure to ...
Jon C's user avatar
  • 19.6k
1 vote

How to identify failed transactions on Solana

A transaction gets confirmed and finalized, whether it's a success or a failure, since the whole network needs to run it to be sure that it fails. There is no way to only filter by success or failure ...
Jon C's user avatar
  • 19.6k
1 vote
Accepted

Attempt to debit an account but found no record of a prior credit

@vicyyn , Thanks for the help. It was a mistake in my wallet,I have commented the wrong line of code. let myWallet = new anchor.Wallet(web3js.Keypair.generate()); //let myWallet = new anchor.Wallet(...
Thiago's user avatar
  • 21
1 vote

Testing transactions that should fail with anchor

This is my code. It works well. try { ... } catch(error) { const errMsg = error.error?.errorMessage ? error.error?.errorMessage : anchor.AnchorError.parse(error.logs).error.errorMessage; assert....
lucky418's user avatar
1 vote

Testing transactions that should fail with anchor

you can assert the error logs: it("Does not allow creating a pixel out of bounds", async () => { const x = 0 const y = 200 const [pixelPublicKey] = web3.PublicKey....
Juan Marchetto's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible