Skip to content

Commit

Permalink
BACK-8066: One deployment per chain + exhaustive list of selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaireGuerreGiordano committed Nov 28, 2024
1 parent b971178 commit fff5257
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 20 deletions.
121 changes: 121 additions & 0 deletions registry/paraswap/calldata-AugustusSwapper-v4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.callees.[]` in function 0xa27e8b6b. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.callees.[]` in function 0xcfc0afeb. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.data.beneficiary` in function 0xec1d21dd. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.data.beneficiary` in function 0xf95a49eb. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.data.expectedAmount` in function 0x8f00eccb. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.data.expectedAmount` in function 0xec1d21dd. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.data.fromAmount` in function 0x8f00eccb. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.data.fromAmount` in function 0xec1d21dd. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.data.fromAmount` in function 0xf95a49eb. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.data.fromToken` in function 0x8f00eccb. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.beneficiary`, but it does not exist in function 0xec1d21dd ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.beneficiary`, but it does not exist in function 0xf95a49eb ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.expectedAmount`, but it does not exist in function 0x8f00eccb ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.fromAmount`, but it does not exist in function 0x8f00eccb ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.fromAmount`, but it does not exist in function 0xec1d21dd ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.fromAmount`, but it does not exist in function 0xf95a49eb ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.fromToken`, but it does not exist in function 0x8f00eccb ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.fromToken`, but it does not exist in function 0xec1d21dd ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.fromToken`, but it does not exist in function 0xf95a49eb ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/paraswap/calldata-AugustusSwapper-v4.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.path.[]`, but it does not exist in function 0x8f00eccb ABI. Please check the field path is valid according to the ABI.
"context": {
"$id": "AugustusSwapper",
"contract": {
"abi": "https://github.com/LedgerHQ/ledger-asset-dapps/blob/main/ethereum/paraswap/abis/0x1bd435f3c054b6e901b7b108a0ab7617c808677b.abi.json",
"deployments": [
{ "chainId": 1, "address": "0x1bd435f3c054b6e901b7b108a0ab7617c808677b" }
]
}
},
"metadata": { "owner": "Paraswap" },
"display": {
"definitions": {
"amountIn": { "label": "Income Amount", "format": "amount" },
"amountOut": { "label": "Outcome Amount", "format": "amount" },
"amountInMax": { "label": "Maximum Income Amount", "format": "amount" },
"factory": { "label": "Factory", "format": "addressName", "params": { "types": ["contract"] } },
"amountOutMin": { "label": "Minimum Outcome Amount", "format": "amount" },
"expectedAmount": { "label": "Expected Amount", "format": "amount" },
"fromToken": { "format": "addressName", "label": "Origin Token", "params": { "types": ["token"] } },
"toToken": { "format": "addressName", "label": "Destination Token", "params": { "types": ["token"] } },
"fromAmount": { "format": "tokenAmount", "label": "Income Amount", "params": { "tokenPath": "fromToken" } },
"toAmount": { "format": "tokenAmount", "label": "Outcome Amount", "params": { "tokenPath": "toToken" } },
"beneficiary": { "format": "addressName", "label": "Beneficiary address", "params": { "types": ["eoa"] } }
},
"formats": {
"0x58b9d179": {
"$id": "swapOnUniswap",
"fields": [
{ "path": "amountIn", "$ref": "$.display.definitions.amountIn" },
{ "path": "amountOutMin", "$ref": "$.display.definitions.amountOutMin" },
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["amountIn", "amountOutMin", "path"]
},
"0x0863b7ac": {
"$id": "swapOnUniswapFork",
"fields": [
{ "path": "amountIn", "$ref": "$.display.definitions.amountIn" },
{ "path": "amountOutMin", "$ref": "$.display.definitions.amountOutMin" },
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["amountIn", "amountOutMin", "path"]
},
"0xf9355f72": {
"$id": "buyOnUniswap",
"fields": [
{ "path": "amountOut", "$ref": "$.display.definitions.amountOut" },
{ "path": "amountInMax", "$ref": "$.display.definitions.amountInMax" },
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["amountOut", "amountInMax", "path"]
},
"0x33635226": {
"$id": "buyOnUniswapFork",
"fields": [
{ "path": "amountOut", "$ref": "$.display.definitions.amountOut" },
{ "path": "amountInMax", "$ref": "$.display.definitions.amountInMax" },
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["factory", "initCode", "amountOut", "amountInMax", "path"]
},
"0x8f00eccb": {
"$id": "multiSwap",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "expectedAmount", "$ref": "$.display.definitions.expectedAmount" },
{ "path": "data.beneficiary", "$ref": "$.display.definitions.beneficiary" },
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["fromToken", "fromAmount", "toAmount", "expectedAmount", "beneficiary", "path"]
},
"0xa27e8b6b": {
"$id": "simpleBuy",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "beneficiary", "$ref": "$.display.definitions.beneficiary" }
],
"required": ["fromToken", "fromAmount", "toAmount", "beneficiary"]
},
"0xcfc0afeb": {
"$id": "simpleSwap",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "beneficiary", "$ref": "$.display.definitions.beneficiary" }
],
"required": ["fromToken", "fromAmount", "toAmount", "beneficiary"]
},
"0xec1d21dd": {
"$id": "megaSwap",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "beneficiary", "$ref": "$.display.definitions.beneficiary" },
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["fromToken", "toToken", "fromAmount", "toAmount", "beneficiary", "path"]
},
"0xf95a49eb": {
"$id": "buy",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "beneficiary", "$ref": "$.display.definitions.beneficiary" } ],
"required": ["fromToken", "toToken", "fromAmount", "toAmount", "beneficiary"]
}
}
}
}
91 changes: 71 additions & 20 deletions registry/paraswap/calldata-AugustusSwapper-v5.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
"contract": {
"abi": "https://github.com/LedgerHQ/ledger-asset-dapps/blob/main/ethereum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json",
"deployments": [
{ "chainId": 1, "address": "0x1bd435f3c054b6e901b7b108a0ab7617c808677b" },
{ "chainId": 1, "address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57" },
{ "chainId": 56, "address": "0x55a0e3b6579972055faa983482aceb4b251dcf15" },
{ "chainId": 56, "address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57" },
{ "chainId": 137, "address": "0x90249ed4d69d70e709ffcd8bee2c5a566f65dade" },
{ "chainId": 137, "address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57" }
{ "chainId": 1, "address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57" }
]
}
},
Expand All @@ -19,41 +14,41 @@
"amountIn": { "label": "Income Amount", "format": "amount" },
"amountOut": { "label": "Outcome Amount", "format": "amount" },
"amountInMax": { "label": "Maximum Income Amount", "format": "amount" },
"factory": { "label": "Factory", "format": "addressName", "params": { "types": ["contract"] } },
"tokenIn": { "label": "Inbound token", "format": "addressName", "params": { "types": ["token"] } },
"amountOutMin": { "label": "Minimum Outcome Amount", "format": "amount" },
"fromToken": { "format": "addressName", "label": "Origin Token", "params": { "types": ["token"] } },
"toToken": { "format": "addressName", "label": "Destination Token", "params": { "types": ["token"] } },
"fromAmount": { "format": "tokenAmount", "label": "Income Amount", "params": { "tokenPath": "fromToken" } },
"exchange": { "format": "addressName", "label": "Exchange address", "params": { "types": ["wallet"] } }
"exchange": { "format": "addressName", "label": "Exchange address", "params": { "types": ["wallet"] } },
"beneficiary": { "format": "addressName", "label": "Beneficiary address", "params": { "types": ["eoa"] } },
"toAmount": { "format": "tokenAmount", "label": "Outcome Amount", "params": { "tokenPath": "toToken" } },
"expectedAmount": { "label": "Expected Amount", "format": "amount" }
},
"formats": {
"0x54840d1a": {
"$id": "swapOnUniswap",
"fields": [
{ "path": "amountIn", "$ref": "$.display.definitions.amountIn" },
{ "path": "amountOutMin", "$ref": "$.display.definitions.amountOutMin" },
{ "path": "path.[]", "label": "Array of addresses", "format": "addressName", "params": { "types": ["wallet"] } }
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["amountIn", "amountOutMin", "path"]
},
"0xf5661034": {
"$id": "swapOnUniswapFork",
"fields": [
{ "path": "factory", "$ref": "$.display.definitions.factory" },
{ "path": "initCode", "format": "raw", "label": "init code" },
{ "path": "amountIn", "$ref": "$.display.definitions.amountIn" },
{ "path": "amountOutMin", "$ref": "$.display.definitions.amountOutMin" },
{ "path": "path.[]", "label": "Array of addresses", "format": "addressName", "params": { "types": ["wallet"] } }
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["factory", "initCode", "amountIn", "amountOutMin", "path"]
"required": ["amountIn", "amountOutMin", "path"]
},
"0x935fb84b": {
"$id": "buyOnUniswap",
"fields": [
{ "path": "amountOut", "$ref": "$.display.definitions.amountOut" },
{ "path": "amountInMax", "$ref": "$.display.definitions.amountInMax" },
{ "path": "path.[]", "label": "Array of addresses", "format": "addressName", "params": { "types": ["contract"] } }
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["amountOut", "amountInMax", "path"]
},
Expand All @@ -62,9 +57,9 @@
"fields": [
{ "path": "amountOut", "$ref": "$.display.definitions.amountOut" },
{ "path": "amountInMax", "$ref": "$.display.definitions.amountInMax" },
{ "path": "path.[]", "label": "Array of addresses", "format": "addressName", "params": { "types": ["wallet"] } }
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["factory", "initCode", "amountOut", "amountInMax", "path"]
"required": ["amountOut", "amountInMax", "path"]
},
"0x0b86a4c1": {
"$id": "swapOnUniswapV2Fork",
Expand All @@ -73,7 +68,7 @@
{ "path": "amountIn", "$ref": "$.display.definitions.amountIn", "params": { "tokenPath": "tokenIn" } },
{ "path": "amountOutMin", "$ref": "$.display.definitions.amountOutMin" }
],
"required": ["tokenIn", "amountIn", "amountOutMin", "weth", "pools"]
"required": ["tokenIn", "amountIn", "amountOutMin"]
},
"0x64466805": {
"$id": "swapOnZeroXv4",
Expand All @@ -82,10 +77,66 @@
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "amountOutMin", "$ref": "$.display.definitions.amountOutMin" },
{ "path": "exchange", "$ref": "$.display.definitions.exchange" },
{ "path": "payload", "format": "raw", "label": "payload" }
{ "path": "exchange", "$ref": "$.display.definitions.exchange" }
],
"required": ["fromToken", "toToken", "fromAmount", "amountOutMin", "exchange"]
},
"0x2298207a": {
"$id": "simpleBuy",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "beneficiary", "$ref": "$.display.definitions.beneficiary" }
],
"required": ["fromToken", "toToken", "fromAmount", "toAmount", "beneficiary"]
},
"0x46c67b6d": {
"$id": "megaSwap",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "beneficiary", "$ref": "$.display.definitions.beneficiary" },
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["fromToken", "toToken", "fromAmount", "toAmount", "beneficiary", "path"]
},
"0x54e3f31b": {
"$id": "simpleSwap",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "beneficiary", "$ref": "$.display.definitions.beneficiary" }
],
"required": ["fromToken", "toToken", "fromAmount", "toAmount", "beneficiary"]
},
"0xa94e78ef": {
"$id": "multiSwap",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "toAmount", "$ref": "$.display.definitions.toAmount" },
{ "path": "expectedAmount", "$ref": "$.display.definitions.expectedAmount" },
{ "path": "beneficiary", "$ref": "$.display.definitions.beneficiary" },
{ "path": "path.[]", "label": "Assets paths", "format": "addressName", "params": { "types": ["token"] } }
],
"required": ["fromToken", "toToken", "fromAmount", "amountOutMin", "exchange", "payload"]
"required": ["fromToken", "fromAmount", "toAmount", "expectedAmount", "beneficiary", "path"]
},
"0x81033120": {
"$id": "swapOnZeroXv2",
"fields": [
{ "path": "fromToken", "$ref": "$.display.definitions.fromToken" },
{ "path": "toToken", "$ref": "$.display.definitions.toToken" },
{ "path": "fromAmount", "$ref": "$.display.definitions.fromAmount" },
{ "path": "amountOutMin", "$ref": "$.display.definitions.amountOutMin" },
{ "path": "exchange", "$ref": "$.display.definitions.exchange" }
],
"required": ["fromToken", "toToken", "fromAmount", "amountOutMin", "exchange"]
}
}
}
Expand Down

0 comments on commit fff5257

Please sign in to comment.