kevinheavey / solana-bankrun

Superfast Solana Tests for Node.js
https://kevinheavey.github.io/solana-bankrun/
Apache License 2.0
114 stars 12 forks source link

[Bug] VersionedTransaction Simulation Result Empty #14

Closed ngundotra closed 9 months ago

ngundotra commented 9 months ago

I am attempting to simulate a transaction against the Bank, but the result seems to be empty.

    let simulationResult = await GLOBAL_CONTEXT.banksClient.simulateTransaction(
      transaction
      "confirmed"
    );
    console.log("simulation result:", JSON.stringify(simulationResult));

The code above gives:

    simulation result: {"inner":{}}

I suspect lines here may be hiding error messages: https://github.com/kevinheavey/solana-bankrun/blob/97803fa5961bb8aaeef130da33499649a1b1d2c6/src/lib.rs#L398-L412

Would appreciate help debugging this. Much appreciated 🙏

ngundotra commented 9 months ago

I did not realize fields on simulationResult could only be accessed with getters. Nothing is wrong