diff --git a/registry/1inch/calldata-AggregationRouterV3.json b/registry/1inch/calldata-AggregationRouterV3.json new file mode 100644 index 0000000..e0ece27 --- /dev/null +++ b/registry/1inch/calldata-AggregationRouterV3.json @@ -0,0 +1,132 @@ +{ + "$schema": "../../specs/erc7730-v1.schema.json", + + "context": { + "$id": "AggregationRouterV3", + "contract": { + "abi": "https://api.etherscan.io/api?module=contract&action=getabi&address=0x11111112542d85b3ef69ae05771c2dccff4faa26", + "deployments": [ + { + "chainId": 1, + "address": "0x11111112542D85B3EF69AE05771c2dCCff4fAa26" + }, + { + "chainId": 56, + "address": "0x11111112542D85B3EF69AE05771c2dCCff4fAa26" + }, + { + "chainId": 137, + "address": "0x11111112542D85B3EF69AE05771c2dCCff4fAa26" + } + ] + } + }, + + "metadata": { + "owner": "1inch", + "info": { + "url": "https://1inch.io/", + "legalName": "1inch Network", + "lastUpdate": "2021-03-14T20:28:50Z" + }, + "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" + } + }, + "formats": { + "swap(address caller, (address srcToken, address dstToken, address srcReceiver, address dstReceiver, uint256 amount, uint256 minReturnAmount, uint256 flags, bytes permit) 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": ["caller", "desc.srcReceiver", "desc.flags", "desc.permit", "data"] + }, + "unoswap(address srcToken, uint256 amount, uint256 minReturn, bytes32[] pools)" : { + "$id": "unoswap", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "@.from"], + "excluded": ["pools"] + }, + "unoswapWithPermit(address srcToken, uint256 amount, uint256 minReturn, bytes32[] pools, bytes permit)" : { + "$id": "unoswapWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "@.from"], + "excluded": ["pools", "permit"] + } + } + } +} diff --git a/registry/1inch/calldata-AggregationRouterV4-eth.json b/registry/1inch/calldata-AggregationRouterV4-eth.json new file mode 100644 index 0000000..8d82166 --- /dev/null +++ b/registry/1inch/calldata-AggregationRouterV4-eth.json @@ -0,0 +1,86 @@ +{ + "$schema": "../../specs/erc7730-v1.schema.json", + "includes": "common-AggregationRouterV4.json", + + "context": { + "$id": "AggregationRouterV4", + "contract": { + "abi": "https://api.etherscan.io/api?module=contract&action=getabi&address=0x1111111254fb6c44bac0bed2854e76f90643097d", + "deployments": [ + { + "chainId": 1, + "address": "0x1111111254fb6c44bAC0beD2854e76F90643097d" + } + ] + } + }, + + "display": { + "formats": { + "clipperSwap(address srcToken, address dstToken, uint256 amount, uint256 minReturn)" : { + "$id": "clipperSwap", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "dstToken" } + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "@.from"] + }, + "clipperSwapTo(address recipient, address srcToken, address dstToken, uint256 amount, uint256 minReturn)" : { + "$id": "clipperSwapTo", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "dstToken" } + }, + { + "path": "recipient", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "recipient"] + }, + "clipperSwapToWithPermit(address recipient, address srcToken, address dstToken, uint256 amount, uint256 minReturn, bytes permit)" : { + "$id": "clipperSwapToWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "dstToken" } + }, + { + "path": "recipient", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "recipient"], + "excluded": ["permit"] + } + } + } +} diff --git a/registry/1inch/calldata-AggregationRouterV4.json b/registry/1inch/calldata-AggregationRouterV4.json new file mode 100644 index 0000000..3477807 --- /dev/null +++ b/registry/1inch/calldata-AggregationRouterV4.json @@ -0,0 +1,21 @@ +{ + "$schema": "../../specs/erc7730-v1.schema.json", + "includes": "common-AggregationRouterV4.json", + + "context": { + "$id": "AggregationRouterV4", + "contract": { + "abi": "https://api.etherscan.io/v2/api?module=contract&action=getabi&chainid=56&address=0x1111111254fb6c44bac0bed2854e76f90643097d", + "deployments": [ + { + "chainId": 56, + "address": "0x1111111254fb6c44bAC0beD2854e76F90643097d" + }, + { + "chainId": 137, + "address": "0x1111111254fb6c44bAC0beD2854e76F90643097d" + } + ] + } + } +} diff --git a/registry/1inch/calldata-AggregationRouterV5.json b/registry/1inch/calldata-AggregationRouterV5.json new file mode 100644 index 0000000..baa44bf --- /dev/null +++ b/registry/1inch/calldata-AggregationRouterV5.json @@ -0,0 +1,461 @@ +{ + "$schema": "../../specs/erc7730-v1.schema.json", + + "context": { + "$id": "AggregationRouterV5", + "contract": { + "abi": "https://api.etherscan.io/api?module=contract&action=getabi&address=0x1111111254eeb25477b68fb85ed929f73a960582", + "deployments": [ + { + "chainId": 1, + "address": "0x1111111254EEB25477B68fb85Ed929f73A960582" + }, + { + "chainId": 10, + "address": "0x1111111254EEB25477B68fb85Ed929f73A960582" + }, + { + "chainId": 56, + "address": "0x1111111254EEB25477B68fb85Ed929f73A960582" + }, + { + "chainId": 137, + "address": "0x1111111254EEB25477B68fb85Ed929f73A960582" + }, + { + "chainId": 42161, + "address": "0x1111111254EEB25477B68fb85Ed929f73A960582" + } + ] + } + }, + + "metadata": { + "owner": "1inch", + "info": { + "url": "https://1inch.io/", + "legalName": "1inch Network", + "lastUpdate": "2022-11-04T06:04:59Z" + }, + "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" + }, + "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 permit, 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", "permit", "data"] + }, + "unoswap(address srcToken, uint256 amount, uint256 minReturn, uint256[] pools)" : { + "$id": "unoswap", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "@.from"], + "excluded": ["pools"] + }, + "unoswapTo(address recipient, address srcToken, uint256 amount, uint256 minReturn, uint256[] pools)" : { + "$id": "unoswapTo", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "recipient", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "recipient"], + "excluded": ["pools"] + }, + "unoswapToWithPermit(address recipient, address srcToken, uint256 amount, uint256 minReturn, uint256[] pools, bytes permit)" : { + "$id": "unoswapToWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "recipient", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "recipient"], + "excluded": ["pools", "permit"] + }, + "uniswapV3Swap(uint256 amount, uint256 minReturn, uint256[] pools)" : { + "$id": "uniswapV3Swap", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount" + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "@.from"], + "excluded": ["pools"] + }, + "uniswapV3SwapTo(address recipient, uint256 amount, uint256 minReturn, uint256[] pools)" : { + "$id": "uniswapV3SwapTo", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount" + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "recipient", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "recipient"], + "excluded": ["pools"] + }, + "uniswapV3SwapToWithPermit(address recipient, address srcToken, uint256 amount, uint256 minReturn, uint256[] pools, bytes permit)" : { + "$id": "uniswapV3SwapToWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "recipient", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "recipient"], + "excluded": ["pools", "permit"] + }, + "fillOrder((uint256 salt, address makerAsset, address takerAsset, address maker, address receiver, address allowedSender, uint256 makingAmount, uint256 takingAmount, uint256 offsets, bytes interactions) order, bytes signature, bytes interaction, uint256 makingAmount, uint256 takingAmount, uint256 skipPermitAndThresholdAmount)" : { + "$id": "fillOrder", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "@.from"], + "excluded": ["order.salt", "order.maker", "order.receiver", "order.allowedSender", "order.offsets", "order.interactions", "signature", "interaction", "makingAmount", "takingAmount", "skipPermitAndThresholdAmount"] + }, + "fillOrderTo((uint256 salt, address makerAsset, address takerAsset, address maker, address receiver, address allowedSender, uint256 makingAmount, uint256 takingAmount, uint256 offsets, bytes interactions) order_, bytes signature, bytes interaction, uint256 makingAmount, uint256 takingAmount, uint256 skipPermitAndThresholdAmount, address target)" : { + "$id": "fillOrderTo", + "intent": "Swap", + "fields": [ + { + "path": "order_.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order_.takerAsset" } + }, + { + "path": "order_.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order_.makerAsset" } + }, + { + "path": "target", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order_.takingAmount", "order_.makingAmount", "target"], + "excluded": ["order_.salt", "order_.maker", "order_.receiver", "order_.allowedSender", "order_.offsets", "order_.interactions", "signature", "interaction", "makingAmount", "takingAmount", "skipPermitAndThresholdAmount"] + }, + "fillOrderToWithPermit((uint256 salt, address makerAsset, address takerAsset, address maker, address receiver, address allowedSender, uint256 makingAmount, uint256 takingAmount, uint256 offsets, bytes interactions) order, bytes signature, bytes interaction, uint256 makingAmount, uint256 takingAmount, uint256 skipPermitAndThresholdAmount, address target, bytes permit)" : { + "$id": "fillOrderToWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "target", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "target"], + "excluded": ["order.salt", "order.maker", "order.receiver", "order.allowedSender", "order.offsets", "order.interactions", "signature", "interaction", "makingAmount", "takingAmount", "skipPermitAndThresholdAmount", "permit"] + }, + "fillOrderRFQ((uint256 info, address makerAsset, address takerAsset, address maker, address allowedSender, uint256 makingAmount, uint256 takingAmount) order, bytes signature, uint256 flagsAndAmount)" : { + "$id": "fillOrderRFQ", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "@.from"], + "excluded": ["order.info", "order.maker", "order.allowedSender", "signature", "flagsAndAmount"] + }, + "fillOrderRFQCompact((uint256 info, address makerAsset, address takerAsset, address maker, address allowedSender, uint256 makingAmount, uint256 takingAmount) order, bytes32 r, bytes32 vs, uint256 flagsAndAmount)" : { + "$id": "fillOrderRFQCompact", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "@.from"], + "excluded": ["order.info", "order.maker", "order.allowedSender", "r", "vs", "flagsAndAmount"] + }, + "fillOrderRFQTo((uint256 info, address makerAsset, address takerAsset, address maker, address allowedSender, uint256 makingAmount, uint256 takingAmount) order, bytes signature, uint256 flagsAndAmount, address target)" : { + "$id": "fillOrderRFQTo", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "target", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "target"], + "excluded": ["order.info", "order.maker", "order.allowedSender", "signature", "flagsAndAmount"] + }, + "fillOrderRFQToWithPermit((uint256 info, address makerAsset, address takerAsset, address maker, address allowedSender, uint256 makingAmount, uint256 takingAmount) order, bytes signature, uint256 flagsAndAmount, address target, bytes permit)" : { + "$id": "fillOrderRFQToWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "target", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "target"], + "excluded": ["order.info", "order.maker", "order.allowedSender", "signature", "flagsAndAmount", "permit"] + }, + "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"] + }, + "clipperSwapToWithPermit(address clipperExchange, address recipient, address srcToken, address dstToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, bytes32 r, bytes32 vs, bytes permit)" : { + "$id": "clipperSwapToWithPermit", + "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", "permit"] + } + } + } +} diff --git a/registry/1inch/common-AggregationRouterV4.json b/registry/1inch/common-AggregationRouterV4.json new file mode 100644 index 0000000..024b1e3 --- /dev/null +++ b/registry/1inch/common-AggregationRouterV4.json @@ -0,0 +1,238 @@ +{ + "$schema": "../../specs/erc7730-v1.schema.json", + + "metadata": { + "owner": "1inch", + "info": { + "url": "https://1inch.io/", + "legalName": "1inch Network", + "lastUpdate": "2021-11-05T10:18:09Z" + }, + "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" + } + }, + "formats": { + "swap(address caller, (address srcToken, address dstToken, address srcReceiver, address dstReceiver, uint256 amount, uint256 minReturnAmount, uint256 flags, bytes permit) 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": ["caller", "desc.srcReceiver", "desc.flags", "desc.permit", "data"] + }, + "unoswap(address srcToken, uint256 amount, uint256 minReturn, bytes32[] pools)" : { + "$id": "unoswap", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "@.from"], + "excluded": ["pools"] + }, + "unoswapWithPermit(address srcToken, uint256 amount, uint256 minReturn, bytes32[] pools, bytes permit)" : { + "$id": "unoswapWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "@.from"], + "excluded": ["pools", "permit"] + }, + "uniswapV3Swap(uint256 amount, uint256 minReturn, uint256[] pools)" : { + "$id": "uniswapV3Swap", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount" + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "@.from"], + "excluded": ["pools"] + }, + "uniswapV3SwapTo(address recipient, uint256 amount, uint256 minReturn, uint256[] pools)" : { + "$id": "uniswapV3SwapTo", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount" + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "recipient", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "recipient"], + "excluded": ["pools"] + }, + "uniswapV3SwapToWithPermit(address recipient, address srcToken, uint256 amount, uint256 minReturn, uint256[] pools, bytes permit)" : { + "$id": "uniswapV3SwapToWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "amount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "srcToken" } + }, + { + "path": "minReturn", + "$ref": "$.display.definitions.minReceiveAmount" + }, + { + "path": "recipient", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["amount", "minReturn", "recipient"], + "excluded": ["pools", "permit"] + }, + "fillOrderRFQ((uint256 info, address makerAsset, address takerAsset, address maker, address allowedSender, uint256 makingAmount, uint256 takingAmount) order, bytes signature, uint256 makingAmount, uint256 takingAmount)" : { + "$id": "fillOrderRFQ", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "@.from", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "@.from"], + "excluded": ["order.info", "order.maker", "order.allowedSender", "signature", "makingAmount", "takingAmount"] + }, + "fillOrderRFQTo((uint256 info, address makerAsset, address takerAsset, address maker, address allowedSender, uint256 makingAmount, uint256 takingAmount) order, bytes signature, uint256 makingAmount, uint256 takingAmount, address target)" : { + "$id": "fillOrderRFQTo", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "target", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "target"], + "excluded": ["order.info", "order.maker", "order.allowedSender", "signature", "makingAmount", "takingAmount"] + }, + "fillOrderRFQToWithPermit((uint256 info, address makerAsset, address takerAsset, address maker, address allowedSender, uint256 makingAmount, uint256 takingAmount) order, bytes signature, uint256 makingAmount, uint256 takingAmount, address target, bytes permit)" : { + "$id": "fillOrderRFQToWithPermit", + "intent": "Swap", + "fields": [ + { + "path": "order.takingAmount", + "$ref": "$.display.definitions.sendAmount", + "params": { "tokenPath": "order.takerAsset" } + }, + { + "path": "order.makingAmount", + "$ref": "$.display.definitions.minReceiveAmount", + "params": { "tokenPath": "order.makerAsset" } + }, + { + "path": "target", + "$ref": "$.display.definitions.beneficiary" + } + ], + "required": ["order.takingAmount", "order.makingAmount", "target"], + "excluded": ["order.info", "order.maker", "order.allowedSender", "signature", "makingAmount", "takingAmount", "permit"] + } + } + } +} diff --git a/registry/starkgate/calldata-StarkGate-STRK.json b/registry/starkgate/calldata-StarkGate-STRK.json new file mode 100644 index 0000000..2ec861a --- /dev/null +++ b/registry/starkgate/calldata-StarkGate-STRK.json @@ -0,0 +1,57 @@ +{ + "$schema": "../../specs/erc7730-v1.schema.json", + + "context": { + "$id": "L1StarkGateSTRKbridge", + "contract": { + "abi": "https://api.etherscan.io/api?module=contract&action=getabi&address=0x6ad74D4B79A06A492C288eF66Ef868Dd981fdC85", + "deployments": [ + { + "chainId": 1, + "address": "0xcE5485Cfb26914C5dcE00B9BAF0580364daFC7a4" + } + ] + } + }, + + "metadata": { + "owner": "Starknet", + "info": { + "url": "https://starkgate.starknet.io/", + "legalName": "StarkWare", + "lastUpdate": "2024-10-01T00:00:00Z" + } + }, + + "display": { + "formats": { + "deposit(address token, uint256 amount, uint256 l2Recipient)" : { + "$id": "deposit", + "intent": "Bridge", + "fields": [ + { + "path": "token", + "label": "Token", + "format": "addressName", + "params": { + "types": [ + "token" + ] + } + }, + { + "path": "amount", + "label": "Amount", + "format": "amount" + }, + { + "path": "l2Recipient", + "label": "Recipient", + "format": "raw" + } + ], + "required": ["token", "amount", "l2Recipient"] + } + } + } +}