-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add hackathon sample * fix path * fix enums
- Loading branch information
1 parent
2c1bc50
commit 61fee49
Showing
1 changed file
with
123 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
"$schema": "../../specs/erc7730-v1.schema.json", | ||
|
||
"context" : { | ||
"eip712" : { | ||
"deployments": [ | ||
{ | ||
"chainId": 1, | ||
"address": "0x4c415552454e5400000000000000000000000003" | ||
} | ||
], | ||
"domain": { | ||
"name": "LedgerClearSigning" | ||
}, | ||
"schemas": [ | ||
{ | ||
"primaryType": "PermitLike", | ||
"types": { | ||
"EIP712Domain": [ | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "chainId", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"name": "verifyingContract", | ||
"type": "address" | ||
} | ||
], | ||
"PermitLike": [ | ||
{ | ||
"name": "token", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "amount", | ||
"type": "uint160" | ||
}, | ||
{ | ||
"name": "expiration", | ||
"type": "uint48" | ||
}, | ||
{ | ||
"name": "nonce", | ||
"type": "uint48" | ||
}, | ||
{ | ||
"name": "spender", | ||
"type": "address" | ||
}, | ||
{ | ||
"name": "mode", | ||
"type": "uint48" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
|
||
"metadata" : { | ||
"owner": "LedgerHackathon", | ||
"info": { | ||
"legalName": "Ledger Inc", | ||
"url": "https://ledger.com" | ||
}, | ||
"enums": { | ||
"mode": { | ||
"0": "Strict", | ||
"1": "Allow Delegation" | ||
} | ||
} | ||
}, | ||
|
||
"display": { | ||
"formats": { | ||
"PermitLike": { | ||
"intent": "Authorize spending", | ||
"required": [ | ||
"amount", "spender" | ||
], | ||
"excluded": [ | ||
"nonce" | ||
], | ||
"fields": [ | ||
{ | ||
"path": "amount", | ||
"label": "Amount to delegate", | ||
"format": "tokenAmount", | ||
"params": { | ||
"tokenPath": "token" | ||
} | ||
}, | ||
{ | ||
"path": "spender", | ||
"label": "Allowed Spender", | ||
"format": "addressName" | ||
}, | ||
{ | ||
"path": "expiration", | ||
"label": "Expires", | ||
"format": "date", | ||
"params": { | ||
"encoding": "timestamp" | ||
} | ||
}, | ||
{ | ||
"path": "mode", | ||
"label": "Delegation mode", | ||
"format": "enum", | ||
"params": { | ||
"$ref": "$.metadata.mode" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |