omni-network / omni

Monorepo for Omni node, contracts and other related tools
https://omni.network
GNU General Public License v3.0
75 stars 42 forks source link

Add gas limit estimation to typescript library #1448

Open corverroos opened 2 months ago

corverroos commented 2 months ago

Problem to Solve

Developers need to specify a gas limit for an xmsg. If they submit too low, it fails, if they submit too high, they overpay. We should make it easy to estimate the expected gas limit. This can be parameterized and submitted by a user, but this is currently difficult to do because there is no easy way to simulate how much a an xmsgs will cost.

Proposed Solution

Add the ability to compute the expected gas limit of an XMsg on a destination chain in a typescript library.

arajasek commented 1 month ago

Note: Part of the bigger effort of typescript tooling, we need to work on this during Public Omega in order to have ready for Mainnet.