From acc895f36dc2b16c2df1fe20784f16bce7b11805 Mon Sep 17 00:00:00 2001 From: MikeDiam Date: Tue, 19 Mar 2024 18:28:22 +0300 Subject: [PATCH] [cow protocol] update fetching eth flow order --- src/contracts/abis/EthFlowAbi.json | 273 +++++++++++++++++++++++++++++ 1 file changed, 273 insertions(+) diff --git a/src/contracts/abis/EthFlowAbi.json b/src/contracts/abis/EthFlowAbi.json index 2835cb8d..7e223986 100644 --- a/src/contracts/abis/EthFlowAbi.json +++ b/src/contracts/abis/EthFlowAbi.json @@ -1,4 +1,217 @@ [ + { + "inputs": [ + { + "internalType": "contract ICoWSwapSettlement", + "name": "_cowSwapSettlement", + "type": "address" + }, + { + "internalType": "contract IWrappedNativeToken", + "name": "_wrappedNativeToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "EthTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "IncorrectEthAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "NotAllowedToInvalidateOrder", + "type": "error" + }, + { + "inputs": [], + "name": "NotAllowedZeroSellAmount", + "type": "error" + }, + { + "inputs": [], + "name": "OrderIsAlreadyExpired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "OrderIsAlreadyOwned", + "type": "error" + }, + { + "inputs": [], + "name": "ReceiverMustBeSet", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "orderUid", + "type": "bytes" + } + ], + "name": "OrderInvalidation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract IERC20", + "name": "sellToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "buyToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sellAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "buyAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "validTo", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "appData", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "kind", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "partiallyFillable", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "sellTokenBalance", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "buyTokenBalance", + "type": "bytes32" + } + ], + "indexed": false, + "internalType": "struct GPv2Order.Data", + "name": "order", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "enum ICoWSwapOnchainOrders.OnchainSigningScheme", + "name": "scheme", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct ICoWSwapOnchainOrders.OnchainSignature", + "name": "signature", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OrderPlacement", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "orderUid", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "refunder", + "type": "address" + } + ], + "name": "OrderRefund", + "type": "event" + }, + { + "inputs": [], + "name": "cowSwapSettlement", + "outputs": [ + { + "internalType": "contract ICoWSwapSettlement", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -65,6 +278,66 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "buyToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sellAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "buyAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "appData", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "validTo", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "partiallyFillable", + "type": "bool" + }, + { + "internalType": "int64", + "name": "quoteId", + "type": "int64" + } + ], + "internalType": "struct EthFlowOrder.Data", + "name": "order", + "type": "tuple" + } + ], + "name": "invalidateOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "wrappedNativeToken",