UMAprotocol / protocol

UMA Protocol Running on Ethereum
https://uma.xyz
GNU Affero General Public License v3.0
361 stars 175 forks source link

fix: tenderly simulation response interface #4674

Closed Reinis-FRP closed 6 months ago

Reinis-FRP commented 6 months ago

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 in simulation.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