Open
Conversation
Pool manager contract ABI
Deleted due to naming fix
Deleted due to naming fix
Deleted due to naming fix
Deleted due to naming fix
Deleted due to naming fix
Naming fix
Liquidity pools list management class added, UniswapV4 improvements.
ErikBjare
approved these changes
Jan 16, 2026
Member
ErikBjare
left a comment
There was a problem hiding this comment.
Generally approved. Haven't checked why CI is failing yet.
Could use some auto-formatting by ruff.
Member
|
Ah, I see CI is failing due to outdated actions. I think we can merge this and address the outdated CI and any CI issues related to this PR in follow-up. |
ErikBjare
reviewed
Jan 16, 2026
ErikBjare
reviewed
Jan 16, 2026
refactor
refactor
refactor
Member
|
@greptileai review |
ErikBjare
reviewed
Feb 1, 2026
Member
There was a problem hiding this comment.
Maybe move the v4 stuff into e.g. uniswap/v4/uniswap.py for better structure
Greptile OverviewGreptile SummaryThis PR adds Uniswap V4 support to the library, introducing new classes for V4 trading operations, pool discovery, and contract interactions across 12+ blockchain networks. Key additions:
Critical issues found:
Confidence Score: 0/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Uniswap4
participant Permit2
participant Router
participant Quoter
participant StateView
participant PoolManager
participant Token
User->>Uniswap4: initialize with address and provider
Uniswap4->>Uniswap4: Load contract addresses for chain
Uniswap4->>Router: Initialize router contract
Uniswap4->>Quoter: Initialize quoter contract
Uniswap4->>StateView: Initialize stateview contract
Uniswap4->>Permit2: Initialize permit2 contract
User->>Uniswap4: approve token
Uniswap4->>Token: approve permit2 contract
Token-->>Uniswap4: transaction hash
Uniswap4->>Permit2: approve router with amount and expiration
Permit2-->>Uniswap4: transaction hash
User->>Uniswap4: get spot price for token pair
Uniswap4->>StateView: getSlot0 for pool
StateView-->>Uniswap4: sqrtPriceX96
Uniswap4-->>User: calculated spot price
User->>Uniswap4: get quote for exact input
Uniswap4->>Quoter: quoteExactInputSingle with pool key
Quoter-->>Uniswap4: output amount
Uniswap4-->>User: quote amount
User->>Uniswap4: execute swap with exact input
Uniswap4->>Uniswap4: Encode V4 SWAP command
Uniswap4->>Uniswap4: Encode actions for swap settle and take
Uniswap4->>Router: execute with commands and deadline
Router->>PoolManager: unlock and execute swap
PoolManager-->>Router: swap result
Router-->>Uniswap4: transaction hash
Uniswap4-->>User: transaction hash
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basic functionality, like price fetching, quoting, and making simple swaps etc