diff --git a/registry/1inch/calldata-AggregationRouterV6.json b/registry/1inch/calldata-AggregationRouterV6.json new file mode 100644 index 0000000..08139dc --- /dev/null +++ b/registry/1inch/calldata-AggregationRouterV6.json @@ -0,0 +1,276 @@ +{ + "$schema": "../../specs/erc7730-v1.schema.json", + "context": { + "$id": "AggregationRouterV6", + "contract": { + "abi": "https://api.etherscan.io/api?module=contract&action=getabi&address=0x111111125421cA6dc452d289314280a0f8842A65", + "deployments": [ + { "chainId": 1, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 10, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 56, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 100, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 137, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 250, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 324, "address": "0x6fd4383cB451173D5f9304F041C7BCBf27d561fF" }, + { "chainId": 8217, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 8453, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 42161, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 43114, "address": "0x111111125421cA6dc452d289314280a0f8842A65" }, + { "chainId": 1313161554, "address": "0x111111125421cA6dc452d289314280a0f8842A65" } + ] + } + }, + "metadata": { + "owner": "1inch", + "info": { "url": "https://1inch.io/", "legalName": "1inch Network", "lastUpdate": "2024-02-12T03:44:35Z" }, + "constants": { + "addressAsEth": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "addressAsNull": "0x0000000000000000000000000000000000000000" + } + }, + "display": { + "definitions": { + "sendAmount": { + "label": "Amount to Send", + "format": "tokenAmount", + "params": { "nativeCurrencyAddress": ["$.metadata.constants.addressAsEth", "$.metadata.constants.addressAsNull"] } + }, + "minReceiveAmount": { + "label": "Minimum to Receive", + "format": "tokenAmount", + "params": { "nativeCurrencyAddress": ["$.metadata.constants.addressAsEth", "$.metadata.constants.addressAsNull"] } + }, + "beneficiary": { "label": "Beneficiary", "format": "addressName" }, + "lastPool": { "label": "Last pool", "format": "addressName", "params": { "types": ["contract"] } }, + "expirationTime": { "label": "Expiration time", "format": "date", "params": { "encoding": "timestamp" } } + }, + "formats": { + "swap(address executor, (address srcToken, address dstToken, address srcReceiver, address dstReceiver, uint256 amount, uint256 minReturnAmount, uint256 flags) desc, bytes data)": { + "$id": "swap", + "intent": "Swap", + "fields": [ + { "path": "desc.amount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "desc.srcToken" } }, + { + "path": "desc.minReturnAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "desc.dstToken" } + }, + { "path": "desc.dstReceiver", "$ref": "$.display.definitions.beneficiary" } + ], + "required": ["desc.amount", "desc.minReturnAmount", "desc.dstReceiver"], + "excluded": ["executor", "desc.srcReceiver", "desc.flags", "data"] + }, + "unoswap(uint256 token, uint256 amount, uint256 minReturn, uint256 dex)": { + "$id": "unoswap", + "intent": "Swap", + "fields": [ + { "path": "amount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "token.[0:20]" } }, + { "path": "minReturn", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["amount", "minReturn", "@.from", "dex"] + }, + "unoswap2(uint256 token, uint256 amount, uint256 minReturn, uint256 dex, uint256 dex2)": { + "$id": "unoswap", + "intent": "Swap", + "fields": [ + { "path": "amount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "token.[0:20]" } }, + { "path": "minReturn", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex2.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["amount", "minReturn", "@.from", "dex2"], + "excluded": ["dex"] + }, + "unoswap3(uint256 token, uint256 amount, uint256 minReturn, uint256 dex, uint256 dex2, uint256 dex3)": { + "$id": "unoswap", + "intent": "Swap", + "fields": [ + { "path": "amount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "token.[0:20]" } }, + { "path": "minReturn", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex3.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["amount", "minReturn", "@.from", "dex3"], + "excluded": ["dex", "dex2"] + }, + "unoswapTo(uint256 to, uint256 token, uint256 amount, uint256 minReturn, uint256 dex)": { + "$id": "unoswapTo", + "intent": "Swap", + "fields": [ + { "path": "amount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "token.[0:20]" } }, + { "path": "minReturn", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "to.[0:20]", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["amount", "minReturn", "to", "dex"] + }, + "unoswapTo2(uint256 to, uint256 token, uint256 amount, uint256 minReturn, uint256 dex, uint256 dex2)": { + "$id": "unoswapTo", + "intent": "Swap", + "fields": [ + { "path": "amount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "token.[0:20]" } }, + { "path": "minReturn", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "to.[0:20]", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex2.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["amount", "minReturn", "to", "dex2"], + "excluded": ["dex"] + }, + "unoswapTo3(uint256 to, uint256 token, uint256 amount, uint256 minReturn, uint256 dex, uint256 dex2, uint256 dex3)": { + "$id": "unoswapTo", + "intent": "Swap", + "fields": [ + { "path": "amount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "token.[0:20]" } }, + { "path": "minReturn", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "to.[0:20]", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex3.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["amount", "minReturn", "to", "dex3"], + "excluded": ["dex", "dex2"] + }, + "ethUnoswap(uint256 minReturn, uint256 dex)" : { + "$id": "ethUnoswap", + "intent": "Swap", + "fields": [ + { "path": "@.value", "label": "Amount to Send", "format": "amount" }, + { "path": "minReturn.[0:20]", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["minReturn", "@.value", "@.from", "dex"] + }, + "ethUnoswap2(uint256 minReturn, uint256 dex, uint256 dex2)" : { + "$id": "ethUnoswap", + "intent": "Swap", + "fields": [ + { "path": "@.value", "label": "Amount to Send", "format": "amount" }, + { "path": "minReturn.[0:20]", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex2.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["minReturn", "@.value", "@.from", "dex2"], + "excluded": ["dex"] + }, + "ethUnoswap3(uint256 minReturn, uint256 dex, uint256 dex2, uint256 dex3)" : { + "$id": "ethUnoswap", + "intent": "Swap", + "fields": [ + { "path": "@.value", "label": "Amount to Send", "format": "amount" }, + { "path": "minReturn.[0:20]", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex3.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["minReturn", "@.value", "@.from", "dex3"], + "excluded": ["dex", "dex2"] + }, + "ethUnoswapTo(uint256 to, uint256 minReturn, uint256 dex)" : { + "$id": "ethUnoswap", + "intent": "Swap", + "fields": [ + { "path": "@.value", "label": "Amount to Send", "format": "amount" }, + { "path": "minReturn.[0:20]", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "to.[0:20]", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["minReturn", "to", "@.value", "dex"] + }, + "ethUnoswapTo2(uint256 to, uint256 minReturn, uint256 dex, uint256 dex2)" : { + "$id": "ethUnoswap", + "intent": "Swap", + "fields": [ + { "path": "@.value", "label": "Amount to Send", "format": "amount" }, + { "path": "minReturn.[0:20]", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "to.[0:20]", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex2.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["minReturn", "to", "@.value", "dex2"], + "excluded": ["dex"] + }, + "ethUnoswapTo3(uint256 to, uint256 minReturn, uint256 dex, uint256 dex2, uint256 dex3)" : { + "$id": "ethUnoswap", + "intent": "Swap", + "fields": [ + { "path": "@.value", "label": "Amount to Send", "format": "amount" }, + { "path": "minReturn.[0:20]", "$ref": "$.display.definitions.minReceiveAmount" }, + { "path": "to.[0:20]", "$ref": "$.display.definitions.beneficiary" }, + { "path": "dex3.[0:20]", "$ref": "$.display.definitions.lastPool" } + ], + "required": ["minReturn", "to", "@.value", "dex3"], + "excluded": ["dex", "dex2"] + }, + "fillOrder((uint256 salt, uint256 maker, uint256 receiver, uint256 makerAsset, uint256 takerAsset, uint256 makingAmount, uint256 takingAmount, uint256 makerTraits) order, bytes32 r, bytes32 vs, uint256 amount, uint256 takerTraits)": { + "$id": "fillOrder", + "intent": "Swap", + "fields": [ + { "path": "order.takingAmount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "order.takerAsset.[0:20]" } }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset.[0:20]" } + }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" } + ], + "required": ["order.takingAmount", "order.makingAmount", "@.from"], + "excluded": [ + "order.salt", + "order.maker", + "order.receiver", + "order.makerTraits", + "r", + "vs", + "amount", + "takerTraits" + ] + }, + "fillContractOrder((uint256 salt, uint256 maker, uint256 receiver, uint256 makerAsset, uint256 takerAsset, uint256 makingAmount, uint256 takingAmount, uint256 makerTraits) order, bytes signature, uint256 amount, uint256 takerTraits)": { + "$id": "fillOrder", + "intent": "Swap", + "fields": [ + { "path": "order.takingAmount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "order.takerAsset.[0:20]" } }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset.[0:20]" } + }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" } + ], + "required": ["order.takingAmount", "order.makingAmount", "@.from"], + "excluded": [ + "order.salt", + "order.maker", + "order.receiver", + "order.makerTraits", + "signature", + "amount", + "takerTraits" + ] + }, + "clipperSwap(address clipperExchange, address srcToken, address dstToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, bytes32 r, bytes32 vs)": { + "$id": "clipperSwap", + "intent": "Swap", + "fields": [ + { "path": "inputAmount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "srcToken" } }, + { "path": "outputAmount", "$ref": "$.display.definitions.minReceiveAmount", "params": { "tokenPath": "dstToken" } }, + { "path": "@.from", "$ref": "$.display.definitions.beneficiary" }, + { "path": "goodUntil", "$ref": "$.display.definitions.expirationTime" } + ], + "required": ["inputAmount", "outputAmount", "@.from", "goodUntil"], + "excluded": ["clipperExchange", "r", "vs"] + }, + "clipperSwapTo(address clipperExchange, address recipient, address srcToken, address dstToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, bytes32 r, bytes32 vs)": { + "$id": "clipperSwapTo", + "intent": "Swap", + "fields": [ + { "path": "inputAmount", "$ref": "$.display.definitions.sendAmount", "params": { "tokenPath": "srcToken" } }, + { "path": "outputAmount", "$ref": "$.display.definitions.minReceiveAmount", "params": { "tokenPath": "dstToken" } }, + { "path": "recipient", "$ref": "$.display.definitions.beneficiary" }, + { "path": "goodUntil", "$ref": "$.display.definitions.expirationTime" } + ], + "required": ["inputAmount", "outputAmount", "recipient", "goodUntil"], + "excluded": ["clipperExchange", "r", "vs"] + } + } + } +}