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

fix(bonding_manager): fix validation of epoch when bonding/unbonding #371

Merged
merged 5 commits into from
Jul 1, 2024

Conversation

kerber0x
Copy link
Contributor

Description and Motivation

This PR improves the validation when bonding/unbonding so it makes sure not only that a new epoch has been created but that the system is up to date, i.e. if an epoch is due to be created the contract won't let you bond or unbond.

Related Issues


Checklist:

  • I have read Migaloo's contribution guidelines.
  • My pull request has a sound title and description (not something vague like Update index.md)
  • All existing and new tests are passing.
  • I updated/added relevant documentation.
  • The code is formatted properly cargo fmt --all --.
  • Clippy doesn't report any issues cargo clippy -- -D warnings.
  • I have regenerated the schemas if needed cargo schema.

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

Attention: Patch coverage is 95.65217% with 6 lines in your changes missing coverage. Please review.

Project coverage is 90.92%. Comparing base (2f40957) to head (8670d58).
Report is 1 commits behind head on release/v2_contracts.

Files Patch % Lines
...s/liquidity_hub/bonding-manager/src/tests/suite.rs 57.14% 3 Missing ⚠️
...acts/liquidity_hub/bonding-manager/src/contract.rs 96.42% 1 Missing ⚠️
...racts/liquidity_hub/bonding-manager/src/helpers.rs 94.73% 1 Missing ⚠️
...s/liquidity_hub/bonding-manager/src/tests/claim.rs 95.45% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##           release/v2_contracts     #371      +/-   ##
========================================================
+ Coverage                 90.90%   90.92%   +0.02%     
========================================================
  Files                       280      280              
  Lines                     31830    31917      +87     
========================================================
+ Hits                      28936    29022      +86     
- Misses                     2894     2895       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kerber0x kerber0x marked this pull request as ready for review July 1, 2024 11:29
Copy link

github-actions bot commented Jul 1, 2024

Schema generation had missing jobs:

contracts/liquidity_hub/bonding-manager/schema/bonding-manager.json
contracts/liquidity_hub/bonding-manager/schema/raw/execute.json

Please run just schemas locally and upload the generated schemas.

Copy link

github-actions bot commented Jul 1, 2024

Schema generation had missing jobs:

contracts/liquidity_hub/bonding-manager/schema/bonding-manager.json

Please run just schemas locally and upload the generated schemas.

@kerber0x kerber0x force-pushed the fix/epoch-validation-on-bond branch from 6577a07 to 8670d58 Compare July 1, 2024 12:12
Copy link
Contributor

@0xFable 0xFable left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@kerber0x kerber0x merged commit 0fa6df4 into release/v2_contracts Jul 1, 2024
7 checks passed
@kerber0x kerber0x deleted the fix/epoch-validation-on-bond branch July 1, 2024 13:15
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.

2 participants