Skip to content
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

Add support to fake gas consumption on mocked function calls #119

Open
wei3erHase opened this issue Jun 17, 2022 · 0 comments
Open

Add support to fake gas consumption on mocked function calls #119

wei3erHase opened this issue Jun 17, 2022 · 0 comments

Comments

@wei3erHase
Copy link
Member

When faking a return fake.function.returns(1) allow the developer to explicit the gas consumption that he wants that return to use fake.function.returns(1, { gasUsed: 1e6 })

With this feature, a developer can add all the gas settings for the fakes (transfer uses 20k, approve uses 10k, …) and get a more realistic outcome in the gas test for each function.

It should allow to explicit gasUsed for a particular call (fake.function.returnsAtCall(… { gasUsed: 1e6}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant