diff --git a/registry/paraswap/calldata-AugustusSwapper-v5.json b/registry/paraswap/calldata-AugustusSwapper-v5.json index 952577d..c88c8ca 100644 --- a/registry/paraswap/calldata-AugustusSwapper-v5.json +++ b/registry/paraswap/calldata-AugustusSwapper-v5.json @@ -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, @@ -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": { @@ -89,10 +80,7 @@ }, "amountOutMin": { "label": "Minimum Outcome Amount", - "format": "tokenAmount", - "params": { - "tokenPath": "amountOutMin" - } + "format": "amount" }, "fromToken": { "format": "addressName", @@ -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": { @@ -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", @@ -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"] } } }