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: implement router for LBP #565

Merged
merged 38 commits into from
Oct 28, 2022
Merged

feat: implement router for LBP #565

merged 38 commits into from
Oct 28, 2022

Conversation

dmoka
Copy link
Contributor

@dmoka dmoka commented Oct 3, 2022

Description

Added implementation and integration tests for router in the context of LBP

Related Issue

Motivation and Context

How Has This Been Tested?

Checklist:

  • I have updated the documentation if necessary.
  • I have added tests to cover my changes, regression test if fixing an issue.
  • This is a breaking change.

)
.map_err(|_| ExecutorError::Error(Error::<T>::Overflow.into()))?;

Ok(calculated_in) //TODO: Double check with someone if this is correct
Copy link
Contributor Author

@dmoka dmoka Oct 3, 2022

Choose a reason for hiding this comment

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

I am not sure about this. Although it seems it works with this according to the integration tests, I expected to remove the fee from this amount, like in calculate_sell line 46, as the pool is responsible for sending the fee to the fee-collector

What do you guys think?

Copy link
Member

Choose a reason for hiding this comment

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

checks out, looks the same as lbp impl, pls remove TODO

@github-actions
Copy link

github-actions bot commented Oct 3, 2022

Crate versions that have been updated:

  • runtime-integration-tests: v0.7.6 -> v0.7.7
  • pallet-duster: v3.1.3 -> v3.1.4
  • pallet-exchange: v5.3.11 -> v5.3.12
  • pallet-exchange-benchmarking: v3.3.20 -> v3.3.21
  • pallet-lbp: v4.4.11 -> v4.5.0
  • pallet-marketplace: v4.0.0 -> v4.0.1
  • pallet-xyk: v5.1.2 -> v5.1.3
  • primitives: v6.3.3 -> v6.3.4
  • basilisk-runtime: v78.0.0 -> v79.0.0
  • common-runtime: v2.2.1 -> v2.2.2
  • testing-basilisk-runtime: v78.0.0 -> v79.0.0

Runtime version has been increased.

@dmoka dmoka changed the title fead: implement router for LBP feat: implement router for LBP Oct 4, 2022
@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Base: 79.24% // Head: 78.75% // Decreases project coverage by -0.48% ⚠️

Coverage data is based on head (b16ff92) compared to base (6c242fe).
Patch coverage: 58.82% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #565      +/-   ##
==========================================
- Coverage   79.24%   78.75%   -0.49%     
==========================================
  Files          21       22       +1     
  Lines        2038     2104      +66     
==========================================
+ Hits         1615     1657      +42     
- Misses        423      447      +24     
Impacted Files Coverage Δ
pallets/lbp/src/lib.rs 82.86% <ø> (+0.46%) ⬆️
pallets/lbp/src/trade_execution.rs 57.57% <57.57%> (ø)
pallets/xyk/src/trade_execution.rs 84.00% <100.00%> (+4.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

pallets/lbp/src/trade_execution.rs Outdated Show resolved Hide resolved
integration-tests/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@mrq1911 mrq1911 left a comment

Choose a reason for hiding this comment

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

i would prefer instead of rewriting existing tests to include LBP write new ones specifically for it

@mrq1911 mrq1911 merged commit 6ee172d into master Oct 28, 2022
@jak-pan jak-pan deleted the feat/add-router-for-lbp branch February 22, 2024 10:59
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.

None yet

4 participants