Skip to content

Commit

Permalink
feat: add Permit2 types
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Mar 15, 2024
1 parent 8ecb277 commit 9ab15ca
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions uniswap_sdk/permit2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from typing import List

from eip712 import EIP712Message, EIP712Type


class PermitDetails(EIP712Type):
token: "address" # type: ignore[name-defined] # noqa
amount: "uint160" # type: ignore[name-defined] # noqa
expiration: "uint48" # type: ignore[name-defined] # noqa
nonce: "uint48" # type: ignore[name-defined] # noqa


class PermitSingle(EIP712Message):
details: PermitDetails
spender: "address" # type: ignore[name-defined] # noqa
sigDeadline: "uint256" # type: ignore[name-defined] # noqa


class PermitBatch(EIP712Message):
details: List[PermitDetails]
spender: "address" # type: ignore[name-defined] # noqa
sigDeadline: "uint256" # type: ignore[name-defined] # noqa

0 comments on commit 9ab15ca

Please sign in to comment.