4673 introduced bug when adding Tenderly fork management as its API response interface differs whether doing regular or forked simulation.
Summary
Fixes the issue by type checking both potential API response interfaces when creating the simulation request.
Details
Forked simulation response had its gas usage encoded as hex string in simulation.receipt.gasUsed while for regular simulations it was returned as number in simulation.gas_used.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
[ ] Ran end-to-end test, running the code as in production
[ ] New unit tests created
[ ] Existing tests adequate, no new tests required
Motivation
4673 introduced bug when adding Tenderly fork management as its API response interface differs whether doing regular or forked simulation.
Summary
Fixes the issue by type checking both potential API response interfaces when creating the simulation request.
Details
Forked simulation response had its gas usage encoded as hex string in
simulation.receipt.gasUsed
while for regular simulations it was returned as number insimulation.gas_used
.Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
Issue(s)
Fixes #XXXX