-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-spec-eip712-schemas
- Loading branch information
Showing
6 changed files
with
995 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.