Skip to content

Commit 0dec349

Browse files
Merge pull request #30 from rainlanguage/2025-03-15-v5ot
2025 03 15 v5ot
2 parents 0163dcb + 2412fbe commit 0dec349

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

foundry.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@ optimizer_runs = 1000000
2121
bytecode_hash = "none"
2222
cbor_metadata = false
2323

24+
remappings = [
25+
"rain.math.float/=lib/rain.interpreter.interface/lib/rain.math.float/src/"
26+
]
27+
2428
[fuzz]
2529
runs = 2048

slither.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"detectors_to_exclude": "assembly-usage,solc-version,unused-imports,pragma",
3-
"filter_paths": "forge-std,openzeppelin"
3+
"filter_paths": "forge-std,openzeppelin,rain.math.float"
44
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

Comments
 (0)