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.
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(...
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 ...
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 ...
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(...
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....
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....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
failed × 22transactions × 5
error × 5
transaction × 5
solana-program × 4
web3.js × 3
swap × 3
anchor × 2
transfer × 2
liquiditypool × 2
raydium × 2
rust × 1
account × 1
wallet × 1
testing × 1
phantom × 1
javascript × 1
security × 1
solana-test-validator × 1
sol × 1
fees × 1
smart-contract × 1
slots × 1
sendtransactionerror × 1
solana-cli × 1