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

No gas metering methods in Vm #23

Closed
urataps opened this issue Apr 18, 2023 · 2 comments
Closed

No gas metering methods in Vm #23

urataps opened this issue Apr 18, 2023 · 2 comments

Comments

@urataps
Copy link

urataps commented Apr 18, 2023

Hello, I've been using PRBTest for a project where we need to do some gas calculations, but there are no methods to pause and resume gas metering, i.e. pauseGasMetering() and resumeGasMetering(), as in Vm from forge-std.

Thought I should let you know.

@PaulRBerg
Copy link
Owner

PaulRBerg commented Apr 18, 2023

Thank you for taking the time to report this.

The problem is that I have to maintain a copy of the Vm interface, and I sometimes miss the latest updates in Forge Std. It looks like these gas metering cheats have been added in this PR.

I will add them shortly in PRBTest and ship a new version (v0.5.5) so you can start using them right away.

Related: I just made a proposal in the Forge Std repo to modularize the Vm interface to a dedicated repo:

foundry-rs/forge-std#353

@PaulRBerg
Copy link
Owner

Done in v0.5.5

@urataps - after upgrading, you should be able to use the pauseGasMetering and resumeGasMetering cheatcodes with PRBTest.

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

2 participants