Skip to content

Commit

Permalink
add paraswap on arbitrum and optimism
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienlacombe committed Aug 21, 2023
1 parent fe95449 commit d446466
Show file tree
Hide file tree
Showing 9 changed files with 2,524 additions and 0 deletions.

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions arbitrum/paraswap/b2c.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"blockchainName": "arbitrum",
"chainId": 421611,
"contracts": [
{
"address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"contractName": "AugustusSwapper",
"selectors": {
"0x0b86a4c1": {
"erc20OfInterest": [
"tokenIn"
],
"method": "swapOnUniswapV2Fork",
"plugin": "Paraswap"
},
"0x2298207a": {
"erc20OfInterest": [
"data.fromToken",
"data.toToken"
],
"method": "simpleBuy",
"plugin": "Paraswap"
},
"0x46c67b6d": {
"erc20OfInterest": [
"data.fromToken",
"data.path.0.path.-1.to"
],
"method": "megaSwap",
"plugin": "Paraswap"
},
"0x54840d1a": {
"erc20OfInterest": [
"path.0",
"path.-1"
],
"method": "swapOnUniswap",
"plugin": "Paraswap"
},
"0x54e3f31b": {
"erc20OfInterest": [
"data.fromToken",
"data.toToken"
],
"method": "simpleSwap",
"plugin": "Paraswap"
},
"0x64466805": {
"erc20OfInterest": [
"fromToken",
"toToken"
],
"method": "swapOnZeroXv4",
"plugin": "Paraswap"
},
"0x81033120": {
"erc20OfInterest": [
"fromToken",
"toToken"
],
"method": "swapOnZeroXv2",
"plugin": "Paraswap"
},
"0x935fb84b": {
"erc20OfInterest": [
"path.0",
"path.-1"
],
"method": "buyOnUniswap",
"plugin": "Paraswap"
},
"0xa94e78ef": {
"erc20OfInterest": [
"data.fromToken",
"data.path.-1.to"
],
"method": "multiSwap",
"plugin": "Paraswap"
},
"0xc03786b0": {
"erc20OfInterest": [
"path.0",
"path.-1"
],
"method": "buyOnUniswapFork",
"plugin": "Paraswap"
},
"0xf5661034": {
"erc20OfInterest": [
"path.0",
"path.-1"
],
"method": "swapOnUniswapFork",
"plugin": "Paraswap"
}
}
}
],
"name": "Paraswap"
}
215 changes: 215 additions & 0 deletions arbitrum/paraswap/eip712.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
{
"blockchainName": "arbitrum",
"chainId": 421611,
"contracts": [
{
"address": "0x0927fd43a7a87e3e8b81df2c44b03c4756849f6d",
"contractName": "AugustusRFQ",
"messages": [
{
"mapper": {
"fields": [
{
"label": "Nonce and metadata",
"path": "nonceAndMeta"
},
{
"label": "Expiration time",
"path": "expiry"
},
{
"label": "Maker asset address",
"path": "makerAsset"
},
{
"label": "Taker asset address",
"path": "takerAsset"
},
{
"label": "Maker address",
"path": "maker"
},
{
"label": "Taker address",
"path": "taker"
},
{
"label": "Maker amount",
"path": "makerAmount"
},
{
"label": "Taker amount",
"path": "takerAmount"
}
],
"label": "AugustusRFQ ERC20 order"
},
"schema": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Order": [
{
"name": "nonceAndMeta",
"type": "uint256"
},
{
"name": "expiry",
"type": "uint128"
},
{
"name": "makerAsset",
"type": "address"
},
{
"name": "takerAsset",
"type": "address"
},
{
"name": "maker",
"type": "address"
},
{
"name": "taker",
"type": "address"
},
{
"name": "makerAmount",
"type": "uint256"
},
{
"name": "takerAmount",
"type": "uint256"
}
]
}
},
{
"mapper": {
"fields": [
{
"label": "Nonce and metadata",
"path": "nonceAndMeta"
},
{
"label": "Expiration time",
"path": "expiry"
},
{
"label": "Maker asset encoded",
"path": "makerAsset"
},
{
"label": "Maker asset NFT ID",
"path": "makerAssetId"
},
{
"label": "Taker asset encoded",
"path": "takerAsset"
},
{
"label": "Taker asset NFT ID",
"path": "takerAssetId"
},
{
"label": "Maker address",
"path": "maker"
},
{
"label": "Taker address",
"path": "taker"
},
{
"label": "Maker amount",
"path": "makerAmount"
},
{
"label": "Taker amount",
"path": "takerAmount"
}
],
"label": "AugustusRFQ NFT order"
},
"schema": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"OrderNFT": [
{
"name": "nonceAndMeta",
"type": "uint256"
},
{
"name": "expiry",
"type": "uint128"
},
{
"name": "makerAsset",
"type": "uint256"
},
{
"name": "makerAssetId",
"type": "uint256"
},
{
"name": "takerAsset",
"type": "uint256"
},
{
"name": "takerAssetId",
"type": "uint256"
},
{
"name": "maker",
"type": "address"
},
{
"name": "taker",
"type": "address"
},
{
"name": "makerAmount",
"type": "uint256"
},
{
"name": "takerAmount",
"type": "uint256"
}
]
}
}
]
}
],
"name": "ParaSwap"
}
73 changes: 73 additions & 0 deletions optimism/b2c.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"blockchainName": {
"enum": [
"optimism"
]
},
"chainId": {
"enum": [
10
]
},
"contracts": {
"items": {
"properties": {
"address": {
"pattern": "^0x[a-z0-9]{40}$",
"type": "string"
},
"contractName": {
"type": "string"
},
"selectors": {
"additionalProperties": false,
"patternProperties": {
"^0x[a-z0-9]{8}$": {
"properties": {
"erc20OfInterest": {
"items": [
{
"type": "string"
}
],
"type": "array"
},
"method": {
"type": "string"
},
"plugin": {
"type": "string"
}
},
"required": [
"plugin"
],
"type": "object"
}
},
"type": "object"
}
},
"required": [
"address",
"contractName",
"selectors"
],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
}
},
"required": [
"blockchainName",
"contracts",
"name",
"chainId"
],
"type": "object"
}
Loading

0 comments on commit d446466

Please sign in to comment.