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

Invariant Test Suite #62

Merged
merged 3 commits into from May 19, 2023
Merged

Invariant Test Suite #62

merged 3 commits into from May 19, 2023

Conversation

alexroan
Copy link
Contributor

@alexroan alexroan commented Mar 29, 2023

During an audit by the Cyfrin team, we built a series of invariants tests to help us find and POC issues. We're making these available in this PR.

Description of changes:

  • Upgrade lib/forge-std to v1.5.2 for Invariant support.
  • Append invariant configuration to foundry.toml.
  • Introduce test/invariant/ directory that has:
    • Invariants.t.sol - defines invariants that should hold.
    • Handler.t.sol - defines actions that can be performed on a Well.

These tests run with forge test, but to target invariants specifically, use forge test --match-contract Invariants.

@publiuss publiuss merged commit 928415c into BeanstalkFarms:master May 19, 2023
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.

None yet

3 participants