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

Feat/add remove swap routes #333

Closed nseguias closed 5 months ago

nseguias commented 5 months ago

Description and Motivation

This PR implements AddSwapRoutes and RemoveSwapRoutes so that the whale lair knows how to swap things back to WHALE when performing the buybacks.

It's permissionless, and once a route is added it cannot be overriden. It needs to be removed, and added again.

Only the user who added a route and the owner of the contract can remove a route.

Related Issues

315


Checklist:

github-actions[bot] commented 5 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/pool-manager/schema/pool-manager.json
contracts/liquidity_hub/pool-manager/schema/raw/execute.json
contracts/liquidity_hub/pool-manager/schema/raw/query.json

Please run just schemas locally and upload the generated schemas.

codecov[bot] commented 5 months ago

Codecov Report

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

Project coverage is 89.67%. Comparing base (a8ebb95) to head (4f0d553). Report is 2 commits behind head on release/v2_contracts.

Files Patch % Lines
...ontracts/liquidity_hub/pool-manager/src/helpers.rs 57.89% 8 Missing :warning:
...ntracts/liquidity_hub/pool-manager/src/contract.rs 70.00% 3 Missing :warning:
...acts/liquidity_hub/pool-manager/src/tests/suite.rs 88.00% 3 Missing :warning:
...ontracts/liquidity_hub/pool-manager/src/queries.rs 81.81% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/v2_contracts #333 +/- ## ======================================================== + Coverage 89.49% 89.67% +0.17% ======================================================== Files 261 261 Lines 26646 26905 +259 ======================================================== + Hits 23848 24128 +280 + Misses 2798 2777 -21 ```

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

github-actions[bot] commented 5 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/pool-manager/schema/pool-manager.json
contracts/liquidity_hub/pool-manager/schema/raw/execute.json
contracts/liquidity_hub/pool-manager/schema/raw/query.json

Please run just schemas locally and upload the generated schemas.

github-actions[bot] commented 5 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/pool-manager/schema/pool-manager.json
contracts/liquidity_hub/pool-manager/schema/raw/execute.json
contracts/liquidity_hub/pool-manager/schema/raw/query.json

Please run just schemas locally and upload the generated schemas.

github-actions[bot] commented 5 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/pool-manager/schema/pool-manager.json
contracts/liquidity_hub/pool-manager/schema/raw/execute.json
contracts/liquidity_hub/pool-manager/schema/raw/query.json

Please run just schemas locally and upload the generated schemas.

github-actions[bot] commented 5 months ago

Schema generation had missing jobs:

contracts/liquidity_hub/pool-manager/schema/raw/response_to_simulate_swap_operations.json
contracts/liquidity_hub/pool-manager/schema/pool-manager.json
contracts/liquidity_hub/pool-manager/schema/raw/query.json

Please run just schemas locally and upload the generated schemas.

kerber0x commented 5 months ago

🚢