Skip to content

Commit

Permalink
add okx on mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienlacombe committed Dec 18, 2023
1 parent a0c825a commit 764aed8
Show file tree
Hide file tree
Showing 4 changed files with 578 additions and 0 deletions.
323 changes: 323 additions & 0 deletions ethereum/okx/abis/0x3b3ae790df4f312e745d270119c6052904fb6790.abi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
[
{
"inputs": [
{
"internalType": "uint256",
"name": "orderId",
"type": "uint256"
},
{
"components": [
{
"internalType": "uint256",
"name": "fromToken",
"type": "uint256"
},
{
"internalType": "address",
"name": "toToken",
"type": "address"
},
{
"internalType": "uint256",
"name": "fromTokenAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minReturnAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadLine",
"type": "uint256"
}
],
"internalType": "struct DexRouter.BaseRequest",
"name": "baseRequest",
"type": "tuple"
},
{
"internalType": "uint256[]",
"name": "batchesAmount",
"type": "uint256[]"
},
{
"components": [
{
"internalType": "address[]",
"name": "mixAdapters",
"type": "address[]"
},
{
"internalType": "address[]",
"name": "assetTo",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "rawData",
"type": "uint256[]"
},
{
"internalType": "bytes[]",
"name": "extraData",
"type": "bytes[]"
},
{
"internalType": "uint256",
"name": "fromToken",
"type": "uint256"
}
],
"internalType": "struct DexRouter.RouterPath[][]",
"name": "batches",
"type": "tuple[][]"
},
{
"components": [
{
"internalType": "uint256",
"name": "pathIndex",
"type": "uint256"
},
{
"internalType": "address",
"name": "payer",
"type": "address"
},
{
"internalType": "address",
"name": "fromToken",
"type": "address"
},
{
"internalType": "address",
"name": "toToken",
"type": "address"
},
{
"internalType": "uint256",
"name": "fromTokenAmountMax",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "toTokenAmountMax",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "salt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadLine",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isPushOrder",
"type": "bool"
},
{
"internalType": "bytes",
"name": "extension",
"type": "bytes"
}
],
"internalType": "struct PMMLib.PMMSwapRequest[]",
"name": "extraData",
"type": "tuple[]"
}
],
"name": "smartSwapByOrderId",
"outputs": [
{
"internalType": "uint256",
"name": "returnAmount",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "orderId",
"type": "uint256"
},
{
"components": [
{
"internalType": "uint256",
"name": "fromTokenAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minReturnAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadLine",
"type": "uint256"
},
{
"internalType": "bool",
"name": "fromNative",
"type": "bool"
},
{
"internalType": "bool",
"name": "toNative",
"type": "bool"
}
],
"internalType": "struct PMMLib.PMMBaseRequest",
"name": "baseRequest",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "pathIndex",
"type": "uint256"
},
{
"internalType": "address",
"name": "payer",
"type": "address"
},
{
"internalType": "address",
"name": "fromToken",
"type": "address"
},
{
"internalType": "address",
"name": "toToken",
"type": "address"
},
{
"internalType": "uint256",
"name": "fromTokenAmountMax",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "toTokenAmountMax",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "salt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadLine",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isPushOrder",
"type": "bool"
},
{
"internalType": "bytes",
"name": "extension",
"type": "bytes"
}
],
"internalType": "struct PMMLib.PMMSwapRequest",
"name": "request",
"type": "tuple"
}
],
"name": "PMMV2Swap",
"outputs": [
{
"internalType": "uint256",
"name": "returnAmount",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "srcToken",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minReturn",
"type": "uint256"
},
{
"internalType": "bytes32[]",
"name": "pools",
"type": "bytes32[]"
}
],
"name": "unxswapByOrderId",
"outputs": [
{
"internalType": "uint256",
"name": "returnAmount",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "recipient",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minReturn",
"type": "uint256"
},
{
"internalType": "uint256[]",
"name": "pools",
"type": "uint256[]"
}
],
"name": "uniswapV3SwapTo",
"outputs": [
{
"internalType": "uint256",
"name": "returnAmount",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[
{
"inputs": [
{
"components": [
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "to",
"type": "address"
}
],
"internalType": "struct Entrance.TokenInInfo[]",
"name": "tokenIn",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct Entrance.TokenAmount[]",
"name": "tokenOut",
"type": "tuple[]"
}
],
"internalType": "struct Entrance.BaseRequest",
"name": "request",
"type": "tuple"
},
{
"components": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "bytes",
"name": "callData",
"type": "bytes"
}
],
"internalType": "struct Entrance.Call[]",
"name": "calls",
"type": "tuple[]"
}
],
"name": "execute",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
]
Loading

0 comments on commit 764aed8

Please sign in to comment.