Skip to content

ABI fix#455

Merged
liquid-8 merged 2 commits into
uniswap-python:dev/v4-finfrom
liquid-8:uniswap4_RC
May 14, 2026
Merged

ABI fix#455
liquid-8 merged 2 commits into
uniswap-python:dev/v4-finfrom
liquid-8:uniswap4_RC

Conversation

@liquid-8
Copy link
Copy Markdown
Member

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.77%. Comparing base (8ac29c0) to head (11b1373).
⚠️ Report is 23 commits behind head on dev/v4-fin.

Additional details and impacted files
@@              Coverage Diff               @@
##           dev/v4-fin     #455      +/-   ##
==============================================
- Coverage       42.09%   36.77%   -5.32%     
==============================================
  Files              12       12              
  Lines            2238     2238              
==============================================
- Hits              942      823     -119     
- Misses           1296     1415     +119     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 14, 2026

Greptile Summary

This PR fixes the ABI definition for the PERMIT2_PERMIT universal router command in constants.py. The previous value only encoded the inner PermitDetails struct, omitting the spender address and sigDeadline fields required by IAllowanceTransfer.PermitSingle.

  • Replaces "(address,uint160,uint48,uint48)" with "((address,uint160,uint48,uint48),address,uint256)", correctly representing the full PermitSingle struct (details, spender, sigDeadline).
  • The fix is consistent with the existing PERMIT2_PERMIT_BATCH entry which already used the analogous array form "((address,uint160,uint48,uint48)[],address,uint256)".

Confidence Score: 5/5

Single-line ABI constant fix that corrects an incomplete struct encoding; no logic or control-flow changes.

The change correctly replaces an incomplete inner-struct-only tuple with the full PermitSingle tuple, matching the Permit2 contract definition and aligning with the already-correct PERMIT2_PERMIT_BATCH entry. The fix is minimal and targeted with no side effects.

No files require special attention.

Important Files Changed

Filename Overview
uniswap/constants.py Fixes PERMIT2_PERMIT ABI from incomplete PermitDetails-only tuple to the full PermitSingle tuple ((address,uint160,uint48,uint48),address,uint256), now consistent with PERMIT2_PERMIT_BATCH

Sequence Diagram

sequenceDiagram
    participant Caller
    participant uniswap4.py
    participant constants.py
    participant eth_abi

    Caller->>uniswap4.py: execute PERMIT2_PERMIT command
    uniswap4.py->>constants.py: lookup universal_router_commands_abis["PERMIT2_PERMIT"]
    Note over constants.py: Returns ["((address,uint160,uint48,uint48),address,uint256)", "bytes"]<br/>(PermitSingle: details tuple + spender + sigDeadline)
    constants.py-->>uniswap4.py: ABI types list
    uniswap4.py->>eth_abi: encode(types, [permitSingle, signature])
    eth_abi-->>uniswap4.py: encoded bytes
    uniswap4.py-->>Caller: calldata for UniversalRouter
Loading

Reviews (2): Last reviewed commit: "fix" | Re-trigger Greptile

Comment thread uniswap/constants.py
@liquid-8 liquid-8 merged commit a4c04b8 into uniswap-python:dev/v4-fin May 14, 2026
4 of 5 checks passed
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.

1 participant