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

refactor: bonding manager #352

Closed kerber0x closed 2 months ago

kerber0x commented 2 months ago

Description and Motivation

This PR refactors the bonding manager, fixing a couple of issues with the bonding and claiming mechanisms. It also refactors the state, using an IndexedMap to hold both bonds and unbonds operations by a user.

Related Issues


Checklist:

kerber0x commented 2 months ago

This is turning to be an overhaul of the bonding manager, not just removing a single msg 😅

github-actions[bot] commented 2 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/bonding-manager/schema/bonding-manager.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_claimable.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_global_index.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_unbonding.json

Please run just schemas locally and upload the generated schemas.

github-actions[bot] commented 2 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/bonding-manager/schema/bonding-manager.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_claimable.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_global_index.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_unbonding.json

Please run just schemas locally and upload the generated schemas.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 97.92576% with 57 lines in your changes are missing coverage. Please review.

Project coverage is 91.15%. Comparing base (0f77427) to head (1ac4516). Report is 4 commits behind head on release/v2_contracts.

:exclamation: Current head 1ac4516 differs from pull request most recent head 61ed894

Please upload reports for the commit 61ed894 to get more accurate results.

Files Patch % Lines
...y_hub/bonding-manager/src/tests/unbond_withdraw.rs 98.83% 10 Missing :warning:
...racts/liquidity_hub/bonding-manager/src/helpers.rs 93.75% 9 Missing :warning:
...s/liquidity_hub/bonding-manager/src/tests/suite.rs 85.48% 9 Missing :warning:
...s/liquidity_hub/bonding-manager/src/tests/claim.rs 99.22% 5 Missing :warning:
...acts/liquidity_hub/pool-manager/src/tests/suite.rs 86.48% 5 Missing :warning:
...acts/liquidity_hub/bonding-manager/src/contract.rs 89.74% 4 Missing :warning:
...uidity_hub/bonding-manager/src/bonding/commands.rs 97.47% 3 Missing :warning:
...ts/liquidity_hub/bonding-manager/src/tests/bond.rs 92.68% 3 Missing :warning:
...liquidity_hub/bonding-manager/src/tests/queries.rs 99.07% 2 Missing :warning:
...ity_hub/bonding-manager/src/tests/update_config.rs 97.40% 2 Missing :warning:
... and 4 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/v2_contracts #352 +/- ## ======================================================== + Coverage 90.09% 91.15% +1.05% ======================================================== Files 278 279 +1 Lines 29604 31113 +1509 ======================================================== + Hits 26673 28361 +1688 + Misses 2931 2752 -179 ```

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

github-actions[bot] commented 2 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/bonding-manager/schema/bonding-manager.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_bonded.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_claimable.json
contracts/liquidity_hub/bonding-manager/schema/raw/response_to_unbonding.json

Please run just schemas locally and upload the generated schemas.