Skip to content

Commit

Permalink
feat: add 1inch AggregationRouterV6 descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
paoun-ledger committed Jan 15, 2025
1 parent a34a515 commit b75c878
Showing 1 changed file with 276 additions and 0 deletions.
276 changes: 276 additions & 0 deletions registry/1inch/calldata-AggregationRouterV6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
{

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Could not fetch ABI

Fetching reference ABI for chain id 1313161554 failed, descriptor ABIs will not be validated: Received unexpected response from https://api.etherscan.io/v2/api: Missing or unsupported chainid parameter (required for v2 api), please see https://api.etherscan.io/v2/chainlist for the list of supported chainids

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Could not fetch ABI

Fetching reference ABI for chain id 43114 failed, descriptor ABIs will not be validated: contract source is not available on Etherscan

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Could not fetch ABI

Fetching reference ABI for chain id 8217 failed, descriptor ABIs will not be validated: Received unexpected response from https://api.etherscan.io/v2/api: Missing or unsupported chainid parameter (required for v2 api), please see https://api.etherscan.io/v2/chainlist for the list of supported chainids

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Extra function

Function clipperSwap(address,uint256,address,uint256,uint256,uint256,bytes32,bytes32) (selector: 0xd2d374e5) defined in descriptor ABIs does not exist in reference ABI (see https://era.zksync.network//address/0x6fd4383cb451173d5f9304f041c7bcbf27d561ff#code)

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Extra function

Function clipperSwapTo(address,address,uint256,address,uint256,uint256,uint256,bytes32,bytes32) (selector: 0xc4d652af) defined in descriptor ABIs does not exist in reference ABI (see https://era.zksync.network//address/0x6fd4383cb451173d5f9304f041c7bcbf27d561ff#code)

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.dex2` in function 0x0f449d71. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.dex2` in function 0x8770ba91. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.dex2` in function 0x89af926a. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.dex2` in function 0xea76dddf. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check warning on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Missing Display field

No display field is defined for path `#.dex3` in function 0x188ac35d. If intentionally excluded, please add it to `excluded` list to avoid this warning.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex.[]`, but it does not exist in function 0x175accdc ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex.[]`, but it does not exist in function 0x83800a8e ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex.[]`, but it does not exist in function 0xa76dfc3b ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex.[]`, but it does not exist in function 0xe2c95c82 ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex2.[]`, but it does not exist in function 0x0f449d71 ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex2.[]`, but it does not exist in function 0x8770ba91 ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex2.[]`, but it does not exist in function 0x89af926a ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex2.[]`, but it does not exist in function 0xea76dddf ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex3.[]`, but it does not exist in function 0x188ac35d ABI. Please check the field path is valid according to the ABI.

Check failure on line 1 in registry/1inch/calldata-AggregationRouterV6.json

View workflow job for this annotation

GitHub Actions / 🔎 validate descriptors

Invalid Display field

A display field is defined for `#.dex3.[]`, but it does not exist in function 0x19367472 ABI. Please check the field path is valid according to the ABI.
"$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"]
}
}
}
}

0 comments on commit b75c878

Please sign in to comment.