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

1inch routers #2

Merged
merged 48 commits into from
May 23, 2023
Merged

1inch routers #2

merged 48 commits into from
May 23, 2023

Conversation

alexkeating
Copy link
Collaborator

@alexkeating alexkeating commented Apr 30, 2023

Description

  • A router for the v4 aggregation swap
  • A router for the v5 aggregation swap

Recommended review order

Group 1

  1. V5Router.sol
  2. RouterFactory.sol
  3. RouterFactory.t.sol
  4. V5Router.t.sol

Group 2

  1. V4Router.sol
  2. V4Router.t.sol

Group 3

  1. Deploy.s.sol
  2. Benchmark.s.sol

Notes

  • V4 and the V5 router are very similar the main differences will be that the args are slightly different and that the interfaces are slightly different.

@alexkeating alexkeating marked this pull request as ready for review May 1, 2023 13:29
@alexkeating alexkeating requested review from mds1 and apbendi May 2, 2023 02:10
src/AggregationBaseRouter.sol Outdated Show resolved Hide resolved
src/AggregationBaseRouter.sol Outdated Show resolved Hide resolved
src/V5Router.sol Outdated Show resolved Hide resolved
src/V5Router.sol Outdated Show resolved Hide resolved
src/V5Router.sol Outdated Show resolved Hide resolved
src/RouterFactory.sol Outdated Show resolved Hide resolved
src/RouterFactory.sol Outdated Show resolved Hide resolved
src/RouterFactory.sol Show resolved Hide resolved
test/RouterFactory.t.sol Show resolved Hide resolved
test/V5Router.t.sol Outdated Show resolved Hide resolved
@alexkeating
Copy link
Collaborator Author

Should be ready for a re-review

@alexkeating alexkeating requested a review from mds1 May 8, 2023 18:58
Copy link

@mds1 mds1 left a comment

Choose a reason for hiding this comment

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

left a few comments that probably apply to multiple test files, but I haven't looked at V5Router.t.sol closely yet

test/RouterFactory.t.sol Outdated Show resolved Hide resolved
test/RouterFactory.t.sol Show resolved Hide resolved
test/RouterFactory.t.sol Outdated Show resolved Hide resolved
test/RouterFactory.t.sol Outdated Show resolved Hide resolved
test/RouterFactory.t.sol Outdated Show resolved Hide resolved
test/V4Router.t.sol Outdated Show resolved Hide resolved
test/V4Router.t.sol Outdated Show resolved Hide resolved
test/V4Router.t.sol Outdated Show resolved Hide resolved
test/V4Router.t.sol Outdated Show resolved Hide resolved
test/V4Router.t.sol Outdated Show resolved Hide resolved
@alexkeating alexkeating requested a review from mds1 May 11, 2023 00:34
@alexkeating alexkeating requested a review from davidlaprade May 19, 2023 14:06
Copy link

@davidlaprade davidlaprade left a comment

Choose a reason for hiding this comment

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

Code looks great!

Just a couple questions and some test assertions I'd like to see us add

test/V5Router.t.sol Outdated Show resolved Hide resolved
test/V5Router.t.sol Outdated Show resolved Hide resolved
test/V5Router.t.sol Outdated Show resolved Hide resolved
src/AggregationBaseRouter.sol Show resolved Hide resolved
test/V5Router.t.sol Show resolved Hide resolved
@github-actions
Copy link

Coverage after merging feature/v5-router into main will be

88.46%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   RouterFactory.sol86.67%75%100%88.24%59, 68, 77, 84
   V4Router.sol100%100%100%100%
   V5Router.sol100%100%100%100%
src/lib
   Create2.sol0%100%0%0%11

Copy link

@davidlaprade davidlaprade left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, lgtm

@alexkeating alexkeating merged commit a4f4d27 into main May 23, 2023
@alexkeating alexkeating mentioned this pull request May 31, 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.

3 participants