Skip to main content

Crate cow_ethflow

Crate cow_ethflow 

Source
Expand description

cow-ethflow — Layer 2 EthFlow contract helpers for the CoW Protocol SDK.

Encode createOrder calldata for native-currency orders.

When a user wants to sell ETH (or another chain’s native currency) instead of an ERC-20, the order is submitted through the EthFlow contract rather than the standard GPv2Settlement flow. This module provides the types and encoding functions for that path.

§Key items

ItemPurpose
EthFlowOrderDataParameters for a native-currency sell order
EthFlowTransactionReady-to-send transaction (to, data, value)
encode_eth_flow_create_orderABI-encode createOrder(...) calldata
build_eth_flow_transactionBuild the complete transaction
is_eth_flow_order_dataCheck if on-chain data indicates an EthFlow order

Structs§

EthFlowOrderData
Parameters for a native-currency sell order submitted through the EthFlow contract.
EthFlowTransaction
Ready-to-send transaction for submitting a native-currency order.

Functions§

build_eth_flow_transaction
Build a complete EthFlowTransaction for contract_address.
encode_eth_flow_create_order
Encode the EthFlow.createOrder(order, quoteId) calldata.
is_eth_flow_order_data
Check whether on-chain data is present, indicating an EthFlow order.