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

Update forge-std to v1.8.1 #865

Merged
merged 8 commits into from
Mar 28, 2024
Merged

Update forge-std to v1.8.1 #865

merged 8 commits into from
Mar 28, 2024

Conversation

smol-ninja
Copy link
Member

@smol-ninja smol-ninja commented Mar 23, 2024

Closes #842, #843, #866 and #747 (1st task only).

Subtasks

Notable changes

  • Remove @prb/test dep
  • Use StdAssertions log events

Other changes

  • Rename timestamp to newTimestamp in vm.warp
  • Rename assumeNoPrecompiles to assumeNotPrecompile

build: remove @prb/test dep
test: rename `timestamp` to `newTimestamp` in `vm.warp`
test: declare some functions as `pure` and `view`
test: rename `assumeNoPrecompiles` to `assumeNotPrecompile`
test: use StdAssertions log events
test: define BaseVm contract
test: define MAX_UINT256 in Constants
Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job.

We should also make sure to remove PRBTest in all upstream dependencies, e.g.

@smol-ninja
Copy link
Member Author

smol-ninja commented Mar 24, 2024

@PaulRBerg, I have incorporated your suggestions.

Copy link
Member

@andreivladbrg andreivladbrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the new forge version now we get the following log when we use changePrank: "changePrank is deprecated. Please use vm.startPrank instead"

should we implement a changeMsgSender function (or any other name) in our Utils contract?

@smol-ninja
Copy link
Member Author

Yes @andreivladbrg. I've created a separate issue for that.

Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two things to tidy up

@andreivladbrg
Copy link
Member

Yes @andreivladbrg. I've created a separate issue for that.

I am sorry. I've missed that issue.

@smol-ninja
Copy link
Member Author

In forge-std, there is a contract called CommonBase which offers vm as an internal variable.

Should I delete BaseVm and inherit from CommonBase or should we continue to keep BaseVm?

@andreivladbrg
Copy link
Member

In forge-std, there is a contract called CommonBase which offers vm as an internal variable.
Should I delete BaseVm and inherit from CommonBase or should we continue to keep BaseVm?

IMO we should delete BaseVm, and use CommonBase

@PaulRBerg
Copy link
Member

agree with @andreivladbrg

@smol-ninja smol-ninja force-pushed the test/forge-std-v1.8.1 branch from 311b3fa to 169947e Compare March 26, 2024 11:04
Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, good to merge?

@smol-ninja smol-ninja merged commit e080f20 into staging Mar 28, 2024
8 of 9 checks passed
@smol-ninja smol-ninja deleted the test/forge-std-v1.8.1 branch March 28, 2024 17:43
andreivladbrg added a commit that referenced this pull request Jul 3, 2024
* build: update forge-std to v1.8.1
build: remove @prb/test dep
test: rename `timestamp` to `newTimestamp` in `vm.warp`
test: declare some functions as `pure` and `view`
test: rename `assumeNoPrecompiles` to `assumeNotPrecompile`
test: use StdAssertions log events
test: define BaseVm contract
test: define MAX_UINT256 in Constants

* test: Use  from forge-std

* test(refactor): rename log names in Assertions

* build: update prb math peer dep version

* chore: address pr feedback

* chore: update bun.lockb file

* test: use CommonBase for vm

* test: deprecate changePrank in favor of resetPrank

---------

Co-authored-by: andreivladbrg <andreivladbrg@gmail.com>
Co-authored-by: Paul Razvan Berg <paul.razvan.berg@gmail.com>
andreivladbrg added a commit that referenced this pull request Jul 3, 2024
* build: update forge-std to v1.8.1
build: remove @prb/test dep
test: rename `timestamp` to `newTimestamp` in `vm.warp`
test: declare some functions as `pure` and `view`
test: rename `assumeNoPrecompiles` to `assumeNotPrecompile`
test: use StdAssertions log events
test: define BaseVm contract
test: define MAX_UINT256 in Constants

* test: Use  from forge-std

* test(refactor): rename log names in Assertions

* build: update prb math peer dep version

* chore: address pr feedback

* chore: update bun.lockb file

* test: use CommonBase for vm

* test: deprecate changePrank in favor of resetPrank

---------

Co-authored-by: andreivladbrg <andreivladbrg@gmail.com>
Co-authored-by: Paul Razvan Berg <paul.razvan.berg@gmail.com>
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

Successfully merging this pull request may close these issues.

3 participants