White-Whale-Defi-Platform / white-whale-core

Core contracts for White Whale, The Interchain Liquidity Protocol for the Cosmos.
https://whitewhale.money
MIT License
36 stars 23 forks source link

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

Closed kerber0x closed 3 months ago

kerber0x commented 3 months ago

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:

codecov[bot] commented 3 months ago

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 :warning:
...acts/liquidity_hub/bonding-manager/src/contract.rs 96.42% 1 Missing :warning:
...racts/liquidity_hub/bonding-manager/src/helpers.rs 94.73% 1 Missing :warning:
...s/liquidity_hub/bonding-manager/src/tests/claim.rs 95.45% 1 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 3 months ago

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.

github-actions[bot] commented 3 months ago

Schema generation had missing jobs:

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

Please run just schemas locally and upload the generated schemas.