IOrderBookV3OrderTaker

Git Source

Functions

onTakeOrders

Called by OrderBookV3 when takeOrders is called with non-zero data, if it caused a non-zero input amount. I.e. if the order(s) taker received some tokens. Input and output directions are relative to the IOrderBookV3OrderTaker contract. If the order(s) taker had an active debt from a flash loan then that debt will be paid before calculating any input amounts sent. i.e. the debt is deducted from the input amount before this callback is called.

function onTakeOrders(
    address inputToken,
    address outputToken,
    uint256 inputAmountSent,
    uint256 totalOutputAmount,
    bytes calldata takeOrdersData
) external;

Parameters

NameTypeDescription
inputTokenaddressThe token that was sent to IOrderBookV3OrderTaker.
outputTokenaddressThe token that IOrderBookV3 will attempt to pull from IOrderBookV3OrderTaker after this callback returns.
inputAmountSentuint256The amount of inputToken that was sent to IOrderBookV3OrderTaker.
totalOutputAmountuint256The total amount of outputToken that IOrderBookV3 will attempt to pull from IOrderBookV3OrderTaker after this callback returns.
takeOrdersDatabytesThe data passed to takeOrders by the caller.