|
| 1 | +// SPDX-License-Identifier: LicenseRef-DCL-1.0 |
| 2 | +// SPDX-FileCopyrightText: Copyright (c) 2020 thedavidmeister |
| 3 | +pragma solidity ^0.8.18; |
| 4 | + |
| 5 | +import {PackedFloat} from "rain.math.float/lib/LibDecimalFloat.sol"; |
| 6 | + |
| 7 | +interface IOrderBookV5OrderTaker { |
| 8 | + /// @notice Called by `IOrderBookV5` when `takeOrders` is called with |
| 9 | + /// non-zero data, if it caused a non-zero input amount. I.e. if the order(s) |
| 10 | + /// taker received some tokens. Input and output directions are relative to |
| 11 | + /// the `IOrderBookV5OrderTaker` contract. If the order(s) taker had an |
| 12 | + /// active debt from a flash loan then that debt will be paid _before_ |
| 13 | + /// calculating any input amounts sent. |
| 14 | + /// i.e. the debt is deducted from the input amount before this callback is |
| 15 | + /// called. |
| 16 | + /// @param inputToken The token that was sent to `IOrderBookV5OrderTaker`. |
| 17 | + /// @param outputToken The token that `IOrderBookV5` will attempt to pull |
| 18 | + /// from `IOrderBookV5OrderTaker` after this callback returns. |
| 19 | + /// @param inputAmountSent The amount of `inputToken` that was sent to |
| 20 | + /// `IOrderBookV5OrderTaker`. |
| 21 | + /// @param totalOutputAmount The total amount of `outputToken` that |
| 22 | + /// `IOrderBookV5` will attempt to pull from `IOrderBookV5OrderTaker` after |
| 23 | + /// this callback returns. |
| 24 | + /// @param takeOrdersData The data passed to `takeOrders` by the caller. |
| 25 | + function onTakeOrders2( |
| 26 | + address inputToken, |
| 27 | + address outputToken, |
| 28 | + PackedFloat inputAmountSent, |
| 29 | + PackedFloat totalOutputAmount, |
| 30 | + bytes calldata takeOrdersData |
| 31 | + ) external; |
| 32 | +} |
0 commit comments