Skip to content

Conversation

@antibagr
Copy link
Contributor

@antibagr antibagr commented Dec 4, 2023

Solves #355
Partially solves #356

What's new?

  • uniswap.fee.FeeTier enum added with all available tiers combined
  • InvalidFeeTier raised when Uniswap v3 is used without explicitly providing a fee argument
  • InvalidFeeTier raised when the fee is invalid (not a number, not a FeeTier's member)

@antibagr
Copy link
Contributor Author

antibagr commented Dec 4, 2023

Additionally, I updated the changelog and the project's version and added tests for new functionality. Feel free to let me know if any changes are desirable!

@antibagr antibagr changed the title Make fee a required argument with Uniswap V3 fix: Make fee a required argument with Uniswap V3 Dec 4, 2023
@ErikBjare
Copy link
Member

Beautiful PR!

Thanks a lot for this. Will give it a final review and merge tomorrow :)

# ("ETH", "UNI", int(0.000001 * ONE_ETH), ZERO_ADDRESS),
# ("UNI", "ETH", int(0.000001 * ONE_ETH), ZERO_ADDRESS),
# ("DAI", "UNI", int(0.000001 * ONE_ETH), ZERO_ADDRESS),
(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I fixed the failing tests, though I ask you to take a look at the deleted test line. It was failing because InsufficientBalance wasn't raised during the tests.

Copy link
Member

Choose a reason for hiding this comment

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

Strange, I will add this back in a new PR and sort it out later.

@codecov
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ad8c8a1) 83.84% compared to head (eb744d7) 84.20%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #358      +/-   ##
==========================================
+ Coverage   83.84%   84.20%   +0.36%     
==========================================
  Files          10       11       +1     
  Lines        1052     1057       +5     
==========================================
+ Hits          882      890       +8     
+ Misses        170      167       -3     

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

@ErikBjare
Copy link
Member

The Arbitrum test fails due to "rate limit exceeded", which we will ignore, so all is good!

Thanks for your contribution! ❤️

@ErikBjare ErikBjare merged commit cd5d95e into uniswap-python:master Dec 6, 2023
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.

2 participants