-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Use dict[str, Any] as type for screen * Mode prettydiff to dev dependencies * ERC-7730 to EIP-712 conversion allows invalid paths #27 * Fix glob pattern --------- Co-authored-by: jnicoulaud-ledger <102984500+jnicoulaud-ledger@users.noreply.github.com>
- Loading branch information
1 parent
7e43103
commit f56c9d0
Showing
5 changed files
with
225 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
{ | ||
"$schema": "../../clear-signing-erc7730-registry/specs/erc7730-v1.schema.json", | ||
|
||
"metadata": { | ||
"owner": "Uniswap", | ||
"info": { | ||
"legalName": "Uniswap Labs", | ||
"lastUpdate": "2021-12-14T00:00:00Z", | ||
"url": "https://uniswap.org/" | ||
} | ||
}, | ||
|
||
"context": { | ||
"eip712": { | ||
"domain": { | ||
"name": "Permit2" | ||
}, | ||
"deployments": [ | ||
{ | ||
"chainId": 1, | ||
"address": "0x000000000022D473030F116dDEE9F6B43aC78BA3" | ||
} | ||
], | ||
"schemas": [ | ||
{ | ||
"types": { | ||
"EIP712Domain": [ | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "chainId", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "verifyingContract", | ||
"type": "address" | ||
} | ||
], | ||
"PermitDetails": [ | ||
{ | ||
"name": "token", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "amount", | ||
"type": "uint160" | ||
}, | ||
{ | ||
"name": "expiration", | ||
"type": "uint48" | ||
}, | ||
{ | ||
"name": "nonce", | ||
"type": "uint48" | ||
} | ||
], | ||
"PermitBatch": [ | ||
{ | ||
"name": "details", | ||
"type": "PermitDetails[]" | ||
}, | ||
{ | ||
"name": "spender", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "sigDeadline", | ||
"type": "uint256" | ||
} | ||
] | ||
}, | ||
"primaryType": "PermitBatch" | ||
}, | ||
{ | ||
"types": { | ||
"EIP712Domain": [ | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "chainId", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "verifyingContract", | ||
"type": "address" | ||
} | ||
], | ||
"PermitDetails": [ | ||
{ | ||
"name": "token", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "amount", | ||
"type": "uint160" | ||
}, | ||
{ | ||
"name": "expiration", | ||
"type": "uint48" | ||
}, | ||
{ | ||
"name": "nonce", | ||
"type": "uint48" | ||
} | ||
], | ||
"PermitSingle": [ | ||
{ | ||
"name": "details", | ||
"type": "PermitDetails" | ||
}, | ||
{ | ||
"name": "spender", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "sigDeadline", | ||
"type": "uint256" | ||
} | ||
] | ||
}, | ||
"primaryType": "PermitSingle" | ||
} | ||
] | ||
} | ||
}, | ||
|
||
"display": { | ||
"formats": { | ||
|
||
"PermitSingle": { | ||
"$id": "Permit2 Permit Single", | ||
"intent": "Authorize spending of token", | ||
"fields": [ | ||
{ | ||
"path": "@spender", | ||
"label": "Spender", | ||
"format": "addressName" | ||
}, | ||
{ | ||
"path": "details.amount[]", | ||
"label": "Amount allowance", | ||
"format": "tokenAmount", | ||
"params": { | ||
"tokenPath": "details.token" | ||
} | ||
}, | ||
{ | ||
"path": "details$.expiration", | ||
"label": "Approval expires", | ||
"format": "date", | ||
"params": { | ||
"encoding": "timestamp" | ||
} | ||
} | ||
], | ||
"required": [ | ||
"spender", | ||
"details.amount" | ||
], | ||
"screens": {} | ||
}, | ||
|
||
"PermitBatch": { | ||
"$id": "Permit2 Permit Batch", | ||
"intent": "Authorize spending of tokens", | ||
"fields": [ | ||
{ | ||
"path": ";spender", | ||
"label": "Spender", | ||
"format": "addressName" | ||
}, | ||
{ | ||
"path": "|details.[]", | ||
"fields": [ | ||
{ | ||
"path": "#amount", | ||
"label": "Amount allowance", | ||
"format": "tokenAmount", | ||
"params": { | ||
"tokenPath": "token" | ||
} | ||
}, | ||
{ | ||
"path": "%expiration", | ||
"label": "Approval expires", | ||
"format": "date", | ||
"params": { | ||
"encoding": "timestamp" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"required": [ | ||
"spender", | ||
"details" | ||
], | ||
"screens": {} | ||
} | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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