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

Create lib to handle Weth in routers #1295

Merged
merged 4 commits into from
Feb 18, 2025
Merged

Create lib to handle Weth in routers #1295

merged 4 commits into from
Feb 18, 2025

Conversation

joaobrunoah
Copy link
Contributor

Description

Some routers (like CowRouter) will need to handle Native ETH, but don't need extra features from RouterCommon (like Permit2 or some transient states).

This PR decouples the logic to handle Weth from RouterCommon, so it can be reused by other routers.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Code refactor / cleanup
  • Optimization: [ ] gas / [ ] bytecode
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • Tests have 100% code coverage
  • The base branch is either main, or there's a description of how to merge

Copy link
Collaborator

@EndymionJkb EndymionJkb left a comment

Choose a reason for hiding this comment

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

Great simplification!

Copy link
Contributor

@jubeira jubeira left a comment

Choose a reason for hiding this comment

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

Thanks @joaobrunoah, looks good for the most part! I have a few observations; other than that this makes sense.

Copy link
Contributor

@elshan-eth elshan-eth left a comment

Choose a reason for hiding this comment

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

Maybe small unit test would be good for this lib but in general LGTM!

Copy link
Contributor

@jubeira jubeira left a comment

Choose a reason for hiding this comment

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

LGTM!

@joaobrunoah joaobrunoah merged commit 2894149 into main Feb 18, 2025
16 checks passed
@joaobrunoah joaobrunoah deleted the refactor-router-weth branch February 18, 2025 13: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.

4 participants