solana-developers / solana-cookbook

https://solanacookbook.com/
626 stars 342 forks source link

[Reference] Simulating transactions #295

Open mcintyre94 opened 2 years ago

mcintyre94 commented 2 years ago

The simulate transaction call seems to be really powerful but I'm struggling a lot with finding documentation for making use of it. I think this is probably big enough to be a reference, but might be wrong about that. Some snippets I think we could include:

jacobcreech commented 2 years ago

This may be good as a guide! Something also covering what happens under the hood for simulate, as well as how to use for debugging(getting logs). Some snippets like suggested would also be good. Note that there is a new getEstimatedFee method on transaction though