Merged
Conversation
Greptile SummaryThis PR adds a new manual test script for the Uniswap v4 integration ( Key findings:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant T as Test Script
participant U4 as Uniswap4
participant Q as QuoterV2 Contract
participant SV as StateView Contract
participant LC as _load_contract (lru_cache)
T->>U4: estimate_price_impact(token0, token1, qty)
U4->>U4: get_token_token_spot_price(token0, token1)
U4->>Q: getQuoteExactInputSingle(...)
Q-->>U4: quote_amount
U4->>U4: get_token(token0) ← str passed (no _str_to_addr)
U4->>LC: _load_contract(w3, "erc20", "0xABC..." str key)
Note over LC: Cache miss – different key type than Address bytes
LC-->>U4: contract
U4->>U4: get_token(_str_to_addr(token1)) ← Address bytes
U4->>LC: _load_contract(w3, "erc20", b'\xAB\xC...' bytes key)
LC-->>U4: contract
U4-->>T: price_impact_real
T->>U4: get_liquidity_stateview(token0, token1, fee, tick_spacing, hooks)
U4->>SV: getLiquidity(poolId)
SV-->>U4: liquidity
U4-->>T: test_result
T->>U4: get_slot0_stateview(token0, token1, fee, tick_spacing, hooks)
U4->>SV: getSlot0(poolId)
SV-->>U4: slot0 data (test_result1)
U4-->>T: test_result1
Note over T: BUG: prints test_result instead of test_result1
Last reviewed commit: "v4 test prototype" |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
No description provided.