presign_and_broadcast

Documentation for eth_defi.erc_4626.vault_protocol.lagoon.cowswap.presign_and_broadcast function.

presign_and_broadcast(asset_manager, vault, buy_token, sell_token, amount_in, min_amount_out, broadcast_callback=<function _default_broadcast_callback>)

Broadcast presigned transcation onchain and return order payload.

  • Create an order using onchain TradingStrategyModuleV0

  • Broadcast the onchain transaction

  • Extract the order data from the event log after the transaction is confirmed

Note

You need to approve the correct amount from the vault on CoW Swap settlemetn contract before executing this.

Returns

Order data

Parameters
Return type

eth_defi.cow.order.GPv2OrderData