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

feat: incentive manager #323

Merged
merged 38 commits into from
Apr 12, 2024
Merged

Conversation

kerber0x
Copy link
Contributor

@kerber0x kerber0x commented Apr 9, 2024

Description and Motivation

This PR adds the incentive manager to the v2 branch.

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.

@kerber0x kerber0x requested a review from 0xFable as a code owner April 9, 2024 16:30
@kerber0x kerber0x changed the title Feat/incentive manager feat: incentive manager Apr 9, 2024
@kerber0x kerber0x requested a review from nseguias April 9, 2024 16:31
Copy link

codecov bot commented Apr 9, 2024

Codecov Report

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

Project coverage is 89.42%. Comparing base (755c4bd) to head (64ec60f).
Report is 7 commits behind head on release/v2_contracts.

Files Patch % Lines
...uidity_hub/incentive-manager/tests/common/suite.rs 80.71% 43 Missing ⚠️
packages/white-whale-std/src/pool_network/asset.rs 0.00% 8 Missing ⚠️
...ckages/white-whale-std/src/epoch_manager/common.rs 33.33% 6 Missing ⚠️
...ty_hub/incentive-manager/src/incentive/commands.rs 96.77% 4 Missing ⚠️
...racts/liquidity_hub/incentive-manager/src/state.rs 94.02% 4 Missing ⚠️
...dity_hub/incentive-manager/src/manager/commands.rs 98.30% 3 Missing ⚠️
...ity_hub/incentive-manager/src/position/commands.rs 98.02% 3 Missing ⚠️
...dity_hub/incentive-manager/src/position/helpers.rs 91.66% 3 Missing ⚠️
packages/white-whale-std/src/incentive_manager.rs 70.00% 3 Missing ⚠️
...racts/liquidity_hub/incentive-manager/src/error.rs 0.00% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@                   Coverage Diff                    @@
##           release/v2_contracts     #323      +/-   ##
========================================================
+ Coverage                 88.56%   89.42%   +0.85%     
========================================================
  Files                       243      260      +17     
  Lines                     23584    26656    +3072     
========================================================
+ Hits                      20887    23836    +2949     
- Misses                     2697     2820     +123     

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

@kerber0x kerber0x force-pushed the feat/incentive-manager branch from 8af4d1a to 2cb67f4 Compare April 9, 2024 16:55
Copy link

Schema generation had missing jobs:


Please run just schemas locally and upload the generated schemas.

Copy link
Contributor

@kaimen-sano kaimen-sano left a comment

Choose a reason for hiding this comment

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

I had a quick skim through the contract and didn't find anything major. A few other comments about merging with release/v2_contracts branch though.

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.

Gonna keep looking through the massive test you did.
Pr looks very good curious about the Epoch change

.query_current_epoch(|result| {
let epoch_response = result.unwrap();
assert_eq!(epoch_response.epoch.id, 40);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Had a proper look through this test.
Having done so, I think we should do more of these. Make proper scenarios for our interactions between contracts or even just for any case we want to ensure performs as expected.

Maybe we do something eventually which tests everything in tandem. All part of other PRs though makes no sense to hold this one up. Very impressive

Copy link
Contributor Author

@kerber0x kerber0x Apr 12, 2024

Choose a reason for hiding this comment

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

Is there a way you see we can leverage the test_case lib you used somewhere else? @0xFable

Copy link

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/response_to_pair.json

Please run just schemas locally and upload the generated schemas.

1 similar comment
Copy link

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/response_to_pair.json

Please run just schemas locally and upload the generated schemas.

@kerber0x kerber0x force-pushed the feat/incentive-manager branch from 465e116 to 64ec60f Compare April 12, 2024 14:06
Copy link

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/response_to_pair.json

Please run just schemas locally and upload the generated schemas.

@kerber0x kerber0x merged commit 62a82ed into release/v2_contracts Apr 12, 2024
6 of 7 checks passed
@kerber0x kerber0x deleted the feat/incentive-manager branch April 12, 2024 15:51
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.

3 participants