Skip to content

Commit

Permalink
fix: add missing parameters for addressName formats (#67)
Browse files Browse the repository at this point in the history
* fix: add missing parameters for `addressName` formats

`types` and `sources` are mandatory for `addressName` format

(actual values I used probably needs some refinement)

* fix: fix Paraswap invalid params
  • Loading branch information
jnicoulaud-ledger authored Oct 23, 2024
1 parent 13b6249 commit 465137f
Show file tree
Hide file tree
Showing 15 changed files with 528 additions and 70 deletions.
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
60 changes: 54 additions & 6 deletions registry/aave/calldata-lpv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,16 @@
{
"path": "onBehalfOf",
"format": "addressName",
"label": "For debt holder"
"label": "For debt holder",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["amount", "rateMode", "onBehalfOf"]
Expand All @@ -71,7 +80,13 @@
"format": "addressName",
"label": "For asset",
"params": {
"types": ["token"]
"types": [
"token"
],
"sources": [
"local",
"ens"
]
}
},
{
Expand All @@ -98,7 +113,16 @@
{
"path": "to",
"format": "addressName",
"label": "To recipient"
"label": "To recipient",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["amount", "to"]
Expand All @@ -111,7 +135,13 @@
"format": "addressName",
"label": "For asset",
"params": {
"types": ["token"]
"types": [
"token"
],
"sources": [
"local",
"ens"
]
}
},
{
Expand Down Expand Up @@ -147,7 +177,16 @@
{
"path": "onBehalfOf",
"format": "addressName",
"label": "Debtor"
"label": "Debtor",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["amount", "onBehalfOf", "interestRateMode"]
Expand All @@ -167,7 +206,16 @@
{
"path": "onBehalfOf",
"format": "addressName",
"label": "Collateral recipient"
"label": "Collateral recipient",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["amount", "onBehalfOf"]
Expand Down
77 changes: 70 additions & 7 deletions registry/lido/calldata-OssifiableProxy.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@
{
"path": "_owner",
"label": "Beneficiary",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["_amounts", "_owner"]
Expand All @@ -62,7 +71,16 @@
{
"path": "_owner",
"label": "Beneficiary",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["_amounts", "_owner"],
Expand All @@ -82,7 +100,16 @@
{
"path": "_owner",
"label": "Beneficiary",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["_amounts", "_owner"]
Expand All @@ -101,7 +128,16 @@
{
"path": "_owner",
"label": "Beneficiary",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["_amounts", "_owner"],
Expand All @@ -118,7 +154,16 @@
{
"path": "@.from",
"label": "Beneficiary",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["_requestId", "@.from"]
Expand All @@ -134,7 +179,16 @@
{
"path": "@.from",
"label": "Beneficiary",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["_requestIds", "@.from"],
Expand All @@ -151,7 +205,16 @@
{
"path": "_recipient",
"label": "Beneficiary",
"format": "addressName"
"format": "addressName",
"params": {
"types": [
"eoa"
],
"sources": [
"local",
"ens"
]
}
}
],
"required": ["_requestIds", "_recipient"],
Expand Down
Loading

0 comments on commit 465137f

Please sign in to comment.