Skip to content

Commit

Permalink
chore: format descriptors - 2024-11-26 07:07 (#97)
Browse files Browse the repository at this point in the history
Co-authored-by: ldg-github-ci <[email protected]>
  • Loading branch information
ldg-github-ci and ldg-github-ci authored Nov 26, 2024
1 parent 7d810eb commit 63eafb1
Showing 1 changed file with 89 additions and 256 deletions.
345 changes: 89 additions & 256 deletions registry/paraswap/calldata-AugustusSwapper-v5.json
Original file line number Diff line number Diff line change
@@ -1,260 +1,93 @@
{

Check notice on line 1 in registry/paraswap/calldata-AugustusSwapper-v5.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Proxy contract

Contract https://etherscan.io/address/0xdef171fe48cf0115b1d80b88dc8eab59176fee57#code is likely to be a proxy, validation of descriptor ABIs skipped
"context": {
"$id": "AugustusSwapper",
"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"
}
]
}
},

"metadata": {
"owner": "Paraswap"
"context": {
"$id": "AugustusSwapper",
"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" }
]
}
},
"metadata": { "owner": "Paraswap" },
"display": {
"definitions": {
"amountIn": { "label": "Income Amount", "format": "amount" },
"amountOut": { "label": "Outcome Amount", "format": "amount" },
"amountOutIn": { "label": "Outcome/Income Amount", "format": "tokenAmount", "params": { "tokenPath": "fromToken" } },
"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"] } }
},

"display": {
"definitions": {
"amountIn": {
"label": "Income Amount",
"format": "amount"
},
"amountOut": {
"label": "Outcome Amount",
"format": "amount"
},
"amountOutIn": {
"label": "Outcome/Income Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "fromToken"
}
},
"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"]
}
}
},
"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"]
}
}
],
"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"]
}
}
],
"required": ["factory", "initCode", "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"]
}
}
],
"required": ["amountOut", "amountInMax", "path"]
},
"0xc03786b0": {
"$id": "buyOnUniswapFork",
"fields": [
{
"path": "amountOut",
"$ref": "$.display.definitions.amountOut"
},
{
"path": "amountInMax",
"$ref": "$.display.definitions.amountInMax"
},
{
"path": "path.[]",
"label": "Array of addresses",
"format": "addressName",
"params": {
"types": ["wallet"]
}
}
],
"required": ["factory", "initCode", "amountOut", "amountInMax", "path"]
},
"0x0b86a4c1" : {
"$id": "swapOnUniswapV2Fork",
"fields": [
{
"path": "tokenIn",
"$ref": "$.display.definitions.tokenIn"
},
{
"path": "amountIn",
"$ref": "$.display.definitions.amountIn",
"params": {
"tokenPath": "tokenIn"
}
},
{
"path": "amountOutMin",
"$ref": "$.display.definitions.amountOutMin"
}
],
"required": ["tokenIn", "amountIn", "amountOutMin", "weth", "pools"]
},
"0x64466805" : {
"$id": "swapOnZeroXv4",
"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"
},
{
"path": "payload",
"format": "raw",
"label": "payload"
}

],
"required": ["fromToken", "toToken", "fromAmount", "amountOutMin", "exchange", "payload"]
}
}
"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"] } }
],
"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"] } }
],
"required": ["factory", "initCode", "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"] } }
],
"required": ["amountOut", "amountInMax", "path"]
},
"0xc03786b0": {
"$id": "buyOnUniswapFork",
"fields": [
{ "path": "amountOut", "$ref": "$.display.definitions.amountOut" },
{ "path": "amountInMax", "$ref": "$.display.definitions.amountInMax" },
{ "path": "path.[]", "label": "Array of addresses", "format": "addressName", "params": { "types": ["wallet"] } }
],
"required": ["factory", "initCode", "amountOut", "amountInMax", "path"]
},
"0x0b86a4c1": {
"$id": "swapOnUniswapV2Fork",
"fields": [
{ "path": "tokenIn", "$ref": "$.display.definitions.tokenIn" },
{ "path": "amountIn", "$ref": "$.display.definitions.amountIn", "params": { "tokenPath": "tokenIn" } },
{ "path": "amountOutMin", "$ref": "$.display.definitions.amountOutMin" }
],
"required": ["tokenIn", "amountIn", "amountOutMin", "weth", "pools"]
},
"0x64466805": {
"$id": "swapOnZeroXv4",
"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" },
{ "path": "payload", "format": "raw", "label": "payload" }
],
"required": ["fromToken", "toToken", "fromAmount", "amountOutMin", "exchange", "payload"]
}
}
}
}

0 comments on commit 63eafb1

Please sign in to comment.