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

Medusa swap tests #1167

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Medusa swap tests #1167

wants to merge 39 commits into from

Conversation

elshan-eth
Copy link
Contributor

Description

Add medusa swap tests to check that the invariant never decreases.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Code refactor / cleanup
  • Optimization: [ ] gas / [ ] bytecode
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • Tests have 100% code coverage
  • The base branch is either main, or there's a description of how to merge

Issue Resolution

@elshan-eth elshan-eth changed the base branch from main to medusa-add-remove-test December 5, 2024 12:42
Base automatically changed from medusa-add-remove-test to main December 9, 2024 17:29
Copy link
Contributor

@joaobrunoah joaobrunoah left a comment

Choose a reason for hiding this comment

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

Nice! I just commented on the property and optimization, but overall looks good!

@@ -8,7 +8,7 @@
"callSequenceLength": 10,
"corpusDirectory": "medusa-corpus",
"coverageEnabled": true,
"targetContracts": ["AddAndRemoveLiquidityStableMedusaTest"],
"targetContracts": ["AddAndRemoveLiquidityStableMedusaTest", "SwapMedusaTest"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Older versions of Medusa conflicted here (I was using 0.1.16 and it did not work), but upgrading to 0.1.18 made it work. Much better to have actions in different files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you mean we need to have two medusa.json settings for each medusa test file?

pkg/vault/test/foundry/fuzz/Swap.medusa.sol Outdated Show resolved Hide resolved
pkg/vault/test/foundry/fuzz/Swap.medusa.sol Outdated Show resolved Hide resolved
pkg/vault/test/foundry/fuzz/Swap.medusa.sol Outdated Show resolved Hide resolved
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.

4 participants