Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into demo
Browse files Browse the repository at this point in the history
  • Loading branch information
fsamier committed Nov 15, 2024
2 parents 0ba303f + 5f4bed3 commit 8ef615b
Show file tree
Hide file tree
Showing 25 changed files with 1,714 additions and 259 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ jobs:
repository: LedgerHQ/crypto-assets
event-type: submodules

- name: Trigger update on LedgerHQ/crypto-assets-clear-signing-initiative
if: ${{ !cancelled() }}
timeout-minutes: 60
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.CI_BOT_TOKEN }}
repository: LedgerHQ/crypto-assets-clear-signing-initiative
event-type: submodules

- name: Trigger update on LedgerHQ/python-erc7730
if: ${{ !cancelled() }}
timeout-minutes: 60
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ERC-7730 (Clear Signing Metadata) Registry

The objective of ERC-7730 is to establish a standardized method for clear signing contracts and messages on EVM chains, by offering metadata formatting that complements ABIs and message types. To learn more about the ERC-7730 standard, visit [Ledger Developer Portal](https://developers.ledger.com/docs/clear-signing/eip7730).
The objective of ERC-7730 is to establish a standardized method for clear signing contracts and messages on EVM chains, by offering metadata formatting that complements ABIs and message types. To learn more about the ERC-7730 standard, visit [Ledger Developer Portal](https://developers.ledger.com/docs/clear-signing/erc7730).

This repository maintains records of past and current metadata files in the `registry` directory.

Expand Down
23 changes: 21 additions & 2 deletions ercs/calldata-erc20-tokens.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../specs/erc7730-v1.schema.json",
"context": {
"contract" : {
"abi": [
Expand Down Expand Up @@ -60,7 +61,16 @@
{
"path": "_to",
"label": "To",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
},
{
"path": "_value",
Expand All @@ -79,7 +89,16 @@
{
"path": "_spender",
"label": "Spender",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
},
{
"path": "_value",
Expand Down
46 changes: 40 additions & 6 deletions ercs/calldata-erc721-nfts.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../specs/erc7730-v1.schema.json",
"context": {
"contract" : {
"abi": [
Expand Down Expand Up @@ -83,15 +84,42 @@
"definitions": {
"from" : {
"label": "From",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
},
"to" : {
"label": "To",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
},
"operator":{
"operator":{
"label": "Operator",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"contract"
],
"sources": [
"local",
"ens"
]
}
},
"tokenId" : {
"label": "NFT",
Expand Down Expand Up @@ -131,12 +159,18 @@
"$id": "setApprovalForAll",
"intent": "Manage operator rights for",
"fields": [
{
{
"path": "@.to",
"label": "Collection",
"format": "addressName",
"params": {
"types": ["collection"]
"types": [
"collection"
],
"sources": [
"local",
"ens"
]
}
},
{ "path": "_operator", "$ref": "$.display.definitions.operator" },
Expand Down
12 changes: 11 additions & 1 deletion ercs/eip712-erc2612-permit.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../specs/erc7730-v1.schema.json",
"context": {
"eip712": {
"schemas": [
Expand Down Expand Up @@ -58,7 +59,16 @@
{
"path": "spender",
"label": "Spender",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"contract"
],
"sources": [
"local",
"ens"
]
}
},
{
"path": "value",
Expand Down
132 changes: 132 additions & 0 deletions registry/1inch/calldata-AggregationRouterV3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"$schema": "../../specs/erc7730-v1.schema.json",

"context": {
"$id": "AggregationRouterV3",
"contract": {
"abi": "https://api.etherscan.io/api?module=contract&action=getabi&address=0x11111112542d85b3ef69ae05771c2dccff4faa26",
"deployments": [
{
"chainId": 1,
"address": "0x11111112542D85B3EF69AE05771c2dCCff4fAa26"
},
{
"chainId": 56,
"address": "0x11111112542D85B3EF69AE05771c2dCCff4fAa26"
},
{
"chainId": 137,
"address": "0x11111112542D85B3EF69AE05771c2dCCff4fAa26"
}
]
}
},

"metadata": {
"owner": "1inch",
"info": {
"url": "https://1inch.io/",
"legalName": "1inch Network",
"lastUpdate": "2021-03-14T20:28:50Z"
},
"constants": {
"addressAsEth": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"addressAsNull": "0x0000000000000000000000000000000000000000"
}
},

"display": {
"definitions": {
"sendAmount": {
"label": "Amount to Send",
"format": "tokenAmount",
"params": {
"nativeCurrencyAddress": [
"$.metadata.constants.addressAsEth",
"$.metadata.constants.addressAsNull"
]
}
},
"minReceiveAmount": {
"label": "Minimum to Receive",
"format": "tokenAmount",
"params": {
"nativeCurrencyAddress": [
"$.metadata.constants.addressAsEth",
"$.metadata.constants.addressAsNull"
]
}
},
"beneficiary": {
"label": "Beneficiary",
"format": "addressName"
}
},
"formats": {
"swap(address caller, (address srcToken, address dstToken, address srcReceiver, address dstReceiver, uint256 amount, uint256 minReturnAmount, uint256 flags, bytes permit) desc, bytes data)" : {
"$id": "swap",
"intent": "Swap",
"fields": [
{
"path": "desc.amount",
"$ref": "$.display.definitions.sendAmount",
"params": { "tokenPath": "desc.srcToken" }
},
{
"path": "desc.minReturnAmount",
"$ref": "$.display.definitions.minReceiveAmount",
"params": { "tokenPath": "desc.dstToken" }
},
{
"path": "desc.dstReceiver",
"$ref": "$.display.definitions.beneficiary"
}
],
"required": ["desc.amount", "desc.minReturnAmount", "desc.dstReceiver"],
"excluded": ["caller", "desc.srcReceiver", "desc.flags", "desc.permit", "data"]
},
"unoswap(address srcToken, uint256 amount, uint256 minReturn, bytes32[] pools)" : {
"$id": "unoswap",
"intent": "Swap",
"fields": [
{
"path": "amount",
"$ref": "$.display.definitions.sendAmount",
"params": { "tokenPath": "srcToken" }
},
{
"path": "minReturn",
"$ref": "$.display.definitions.minReceiveAmount"
},
{
"path": "@.from",
"$ref": "$.display.definitions.beneficiary"
}
],
"required": ["amount", "minReturn", "@.from"],
"excluded": ["pools"]
},
"unoswapWithPermit(address srcToken, uint256 amount, uint256 minReturn, bytes32[] pools, bytes permit)" : {
"$id": "unoswapWithPermit",
"intent": "Swap",
"fields": [
{
"path": "amount",
"$ref": "$.display.definitions.sendAmount",
"params": { "tokenPath": "srcToken" }
},
{
"path": "minReturn",
"$ref": "$.display.definitions.minReceiveAmount"
},
{
"path": "@.from",
"$ref": "$.display.definitions.beneficiary"
}
],
"required": ["amount", "minReturn", "@.from"],
"excluded": ["pools", "permit"]
}
}
}
}
86 changes: 86 additions & 0 deletions registry/1inch/calldata-AggregationRouterV4-eth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$schema": "../../specs/erc7730-v1.schema.json",
"includes": "common-AggregationRouterV4.json",

"context": {
"$id": "AggregationRouterV4",
"contract": {
"abi": "https://api.etherscan.io/api?module=contract&action=getabi&address=0x1111111254fb6c44bac0bed2854e76f90643097d",
"deployments": [
{
"chainId": 1,
"address": "0x1111111254fb6c44bAC0beD2854e76F90643097d"
}
]
}
},

"display": {
"formats": {
"clipperSwap(address srcToken, address dstToken, uint256 amount, uint256 minReturn)" : {
"$id": "clipperSwap",
"intent": "Swap",
"fields": [
{
"path": "amount",
"$ref": "$.display.definitions.sendAmount",
"params": { "tokenPath": "srcToken" }
},
{
"path": "minReturn",
"$ref": "$.display.definitions.minReceiveAmount",
"params": { "tokenPath": "dstToken" }
},
{
"path": "@.from",
"$ref": "$.display.definitions.beneficiary"
}
],
"required": ["amount", "minReturn", "@.from"]
},
"clipperSwapTo(address recipient, address srcToken, address dstToken, uint256 amount, uint256 minReturn)" : {
"$id": "clipperSwapTo",
"intent": "Swap",
"fields": [
{
"path": "amount",
"$ref": "$.display.definitions.sendAmount",
"params": { "tokenPath": "srcToken" }
},
{
"path": "minReturn",
"$ref": "$.display.definitions.minReceiveAmount",
"params": { "tokenPath": "dstToken" }
},
{
"path": "recipient",
"$ref": "$.display.definitions.beneficiary"
}
],
"required": ["amount", "minReturn", "recipient"]
},
"clipperSwapToWithPermit(address recipient, address srcToken, address dstToken, uint256 amount, uint256 minReturn, bytes permit)" : {
"$id": "clipperSwapToWithPermit",
"intent": "Swap",
"fields": [
{
"path": "amount",
"$ref": "$.display.definitions.sendAmount",
"params": { "tokenPath": "srcToken" }
},
{
"path": "minReturn",
"$ref": "$.display.definitions.minReceiveAmount",
"params": { "tokenPath": "dstToken" }
},
{
"path": "recipient",
"$ref": "$.display.definitions.beneficiary"
}
],
"required": ["amount", "minReturn", "recipient"],
"excluded": ["permit"]
}
}
}
}
Loading

0 comments on commit 8ef615b

Please sign in to comment.