-
Notifications
You must be signed in to change notification settings - Fork 10
fix: simulate and compute total gas usage before token distribution #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: simulate and compute total gas usage before token distribution #89
Conversation
|
@zivkovicmilos |
89a0129 to
ecdad57
Compare
|
The current work looks good. The only need is to fix the linter problems. Can you provide the error you are getting when testing on staging? Thanks. |
I added this into a previous PR don't know if I made it better or worse |
Thanks for the review: |
5978fcb to
5a9cfbe
Compare
MikaelVallenet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
zivkovicmilos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 💯
Just a few minor things to resolve 🙏
3349c82 to
257fe9d
Compare
While working on #79, I encountered several issues that needed to be addressed before reaching the out-of-gas for transactions part:
unable to construct transactions, unable to estimate gas, error encountered during gas estimation: out of gas error 🤠I received an InternalError:
/std.InternalError"�0recovered: gnomod.toml not found for package "gno.land/r/g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5/stress_1756304458"It seems that all packages are now required to have a gnomod.toml.
When simulating with REALM_CALL mode, I got:
/std.InternalError"�-recovered: wrong number of arguments in call to SayHello: want 1 got 2This was caused by the cross-realm modification, where realms now automatically receive a first parameter of type realm.
To fix this, I updated the function signatures across all realms.
After resolving the above, I was able to focus on the out-of-gas transaction issue.
I introduced a new method on the Runtime interface that allows us to simulate and compute the total cost of all future transactions (based on the chosen Mode for the stress test).
Instead of funding test accounts with a fixed amount, we now: