Tenderly / tenderly-sdk

With the Tenderly SDK, you can simulate individual transactions or bundles of transactions, manage contracts and wallets, and verify contracts from your code.
https://docs.tenderly.co/tenderly-sdk
MIT License
37 stars 12 forks source link

SimulationCallArguments value type should be string not number #90

Closed marcusmolchany closed 1 year ago

marcusmolchany commented 1 year ago

https://github.com/Tenderly/tenderly-sdk/blob/master/lib/executors/Simulator.types.ts#L57

should this value type be string? wei values can overflow as numbers in js.

(i can make this pr if we agree on the change)

maleksandar commented 1 year ago

Hi @marcusmolchany! First of all, sorry for the late reply!

It does seem that string or BigInt would be a better option here. We can add this to our own backlog and address this in the coming weeks, but if you have a PR ready, you are more than welcome to submit it! 🙌

Thank you for catching this and for making Tenderly SDK a more complete tool, We really appreciate it! 🙏

marcusmolchany commented 1 year ago

would you prefer string, BigInt, or string | BigInt?

marcusmolchany commented 1 year ago

^opened a pr that uses string as the type

maleksandar commented 1 year ago

Hi, @marcusmolchany! We had some issues with running the tests on our CI. We resolved that and the tests are passing, so I have merged your changes! Thanks for the PR, and thank you for your patience as well!

marcusmolchany commented 1 year ago

thank you @maleksandar!