Skip to content

Commit

Permalink
Put back swap parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaireGuerreGiordano committed Nov 22, 2024
1 parent b55210a commit f7c3636
Showing 1 changed file with 171 additions and 25 deletions.
196 changes: 171 additions & 25 deletions registry/paraswap/calldata-AugustusSwapper-v5.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"context": {
"$id": "AugustusSwapper",
"contract" : {
"abi": "https://github.com/LedgerHQ/ledger-asset-dapps/blob/main/ethereum/paraswap/abis/0x1bd435f3c054b6e901b7b108a0ab7617c808677b.abi.json",
"abi": "https://github.com/LedgerHQ/ledger-asset-dapps/blob/main/ethereum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json",
"deployments": [
{
"chainId": 1,
Expand Down Expand Up @@ -40,37 +40,28 @@
"definitions": {
"amountIn": {
"label": "Income Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "amountIn"
}
"format": "amount"
},
"amountOut": {
"label": "Outcome Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "amountOut"
}
"format": "amount"
},
"amountOutIn": {
"label": "Outcome/Income Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "amountOutIn"
"tokenPath": "fromToken"
}
},
"amountInMax": {
"label": "Maximum Income Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "amountInMax"
}
"format": "amount"
},
"amountInMin": {
"label": "Minimum Income Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "amountInMin"
"tokenPath": "fromToken"
}
},
"factory": {
Expand All @@ -89,10 +80,7 @@
},
"amountOutMin": {
"label": "Minimum Outcome Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "amountOutMin"
}
"format": "amount"
},
"fromToken": {
"format": "addressName",
Expand All @@ -112,21 +100,21 @@
"format": "tokenAmount",
"label": "Income Amount",
"params": {
"tokenPath": "tokenAmount"
"tokenPath": "fromToken"
}
},
"toAmount": {
"format": "tokenAmount",
"label": "Outcome Amount",
"params": {
"tokenPath": "toAmount"
"tokenPath": "toToken"
}
},
"expectedAmount": {
"format": "tokenAmount",
"label": "Expected Amount",
"params": {
"tokenPath": "expectedAmount"
"tokenPath": "toToken"
}
},
"beneficiary": {
Expand Down Expand Up @@ -166,8 +154,148 @@
}
},
"formats": {
"0xcfc0afeb" : {
"$id": "swapOnZeroXv2",
"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": ["wallet"]
}
}
],
"required": ["amountOut", "amountInMax", "path"]
},
"0xc03786b0": {
"$id": "buyOnUniswapFork",
"fields": [
{
"path": "factory",
"$ref": "$.display.definitions.factory"
},
{
"path": "initCode",
"format": "raw",
"label": "init code"
},
{
"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"
},
{
"path": "weth",
"format": "addressName",
"label": "weth",
"params": {
"types": ["token"]
}
},
{
"path": "pools.[]",
"format": "raw",
"label": "pools"
}
],
"required": ["tokenIn", "amountIn", "amountOutMin", "weth", "pools"]
},
"0x64466805" : {
"$id": "swapOnZeroXv4",
"fields": [
{
"path": "fromToken",
Expand All @@ -176,9 +304,27 @@
{
"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"]
"required": ["fromToken", "toToken", "fromAmount", "amountOutMin", "exchange", "payload"]
}
}
}
Expand Down

0 comments on commit f7c3636

Please sign in to comment.