gnolang / gnonative

Develop for Gno using your app's native language
Apache License 2.0
9 stars 9 forks source link

Estimating gas fees #9

Open jefft0 opened 10 months ago

jefft0 commented 10 months ago

GnoMobile is a framework to help developers deploy their Gno apps on mobile. A Gno app calls realm functions which subtract gas from the user's account. Some functions may require extra gas, for example to post a message with a large document. Therefore, it is useful to estimate the gas that will be used before calling the function. This presents special issues for mobile apps, as mentioned below.

Possible methods to estimate gas fees are:

In the end, we need to decide on one or more methods and have API support in Gno plus support for mobile app development in GnoMobile.

jefft0 commented 10 months ago

We need to resolve the related issue https://github.com/gnolang/gno/issues/1070 about getting the correct "gas used" from the realm function call.