Skip to content

Commit a1526a8

Browse files
Merge branch 'main' into 2026-06-13-issue-951
2 parents 1d94658 + a73d439 commit a1526a8

5 files changed

Lines changed: 135 additions & 23 deletions

File tree

crates/common/src/allowance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub async fn read_allowance(
1818
read_call(rpcs, token, allowanceCall { owner, spender }).await
1919
}
2020

21-
#[cfg(test)]
21+
#[cfg(all(test, not(target_family = "wasm")))]
2222
mod tests {
2323
use super::*;
2424
use alloy::hex::encode_prefixed;

crates/common/src/raindex_client/vaults.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,7 @@ impl RaindexVault {
453453
/// Used by [`RaindexVault::get_calldatas`] so the on-chain allowance is only read once.
454454
/// It reads the allowance via [`Self::read_allowance`] (deposit-free), so it takes no
455455
/// [`DepositArgs`].
456-
async fn build_approval_calldata(
457-
&self,
458-
amount: &Float,
459-
) -> Result<Option<Bytes>, RaindexError> {
456+
async fn build_approval_calldata(&self, amount: &Float) -> Result<Option<Bytes>, RaindexError> {
460457
let allowance = self.read_allowance().await?;
461458
let allowance_float = Float::from_fixed_decimal(allowance, self.token.decimals)?;
462459

src/lib/deploy/LibRaindexDeploy.sol

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,24 @@ library LibRaindexDeploy {
105105
bytes32 constant RAINDEX_DEPLOYED_CODEHASH_0_1_7 =
106106
0x774ca4c194abf0720bca6c033580762029a80291feefd0a4b7855b16bcbbf7a9;
107107

108+
/// The deployed address of the `RaindexV6` contract at the published `0.1.8`
109+
/// tag. (Unchanged from `0.1.7`.)
110+
address constant RAINDEX_DEPLOYED_ADDRESS_0_1_8 = 0x86594ac4319230870C6E587f4ACa48FAb575619e;
111+
112+
/// The runtime code hash of the `RaindexV6` contract at the published `0.1.8`
113+
/// tag.
114+
bytes32 constant RAINDEX_DEPLOYED_CODEHASH_0_1_8 =
115+
0x774ca4c194abf0720bca6c033580762029a80291feefd0a4b7855b16bcbbf7a9;
116+
117+
/// The deployed address of the `RaindexV6` contract at the published `0.1.9`
118+
/// tag. (Unchanged from `0.1.7`.)
119+
address constant RAINDEX_DEPLOYED_ADDRESS_0_1_9 = 0x86594ac4319230870C6E587f4ACa48FAb575619e;
120+
121+
/// The runtime code hash of the `RaindexV6` contract at the published `0.1.9`
122+
/// tag.
123+
bytes32 constant RAINDEX_DEPLOYED_CODEHASH_0_1_9 =
124+
0x774ca4c194abf0720bca6c033580762029a80291feefd0a4b7855b16bcbbf7a9;
125+
108126
/// The address of the `RaindexV6SubParser` contract when deployed with
109127
/// the rain standard zoltu deployer.
110128
address constant SUB_PARSER_DEPLOYED_ADDRESS = SUB_PARSER_ADDR;
@@ -176,6 +194,24 @@ library LibRaindexDeploy {
176194
bytes32 constant SUB_PARSER_DEPLOYED_CODEHASH_0_1_7 =
177195
0x704aadc1ed56f63ff918ab219e6681a5d2851d774e2ee136bbe7904ea3b2fdcd;
178196

197+
/// The deployed address of the `RaindexV6SubParser` contract at the
198+
/// published `0.1.8` tag. (Unchanged from `0.1.2`.)
199+
address constant SUB_PARSER_DEPLOYED_ADDRESS_0_1_8 = 0x09Bc7AF266012F44fb41D8Bd682da931666605e1;
200+
201+
/// The runtime code hash of the `RaindexV6SubParser` contract at the
202+
/// published `0.1.8` tag.
203+
bytes32 constant SUB_PARSER_DEPLOYED_CODEHASH_0_1_8 =
204+
0x704aadc1ed56f63ff918ab219e6681a5d2851d774e2ee136bbe7904ea3b2fdcd;
205+
206+
/// The deployed address of the `RaindexV6SubParser` contract at the
207+
/// published `0.1.9` tag. (Unchanged from `0.1.2`.)
208+
address constant SUB_PARSER_DEPLOYED_ADDRESS_0_1_9 = 0x09Bc7AF266012F44fb41D8Bd682da931666605e1;
209+
210+
/// The runtime code hash of the `RaindexV6SubParser` contract at the
211+
/// published `0.1.9` tag.
212+
bytes32 constant SUB_PARSER_DEPLOYED_CODEHASH_0_1_9 =
213+
0x704aadc1ed56f63ff918ab219e6681a5d2851d774e2ee136bbe7904ea3b2fdcd;
214+
179215
/// The address of the `RouteProcessor4` contract when deployed with the
180216
/// rain standard zoltu deployer.
181217
address constant ROUTE_PROCESSOR_DEPLOYED_ADDRESS = ROUTE_PROCESSOR_ADDR;
@@ -247,6 +283,24 @@ library LibRaindexDeploy {
247283
bytes32 constant ROUTE_PROCESSOR_DEPLOYED_CODEHASH_0_1_7 =
248284
0xeb3745a79c6ba48e8767b9c355b8e7b79f9d6edeca004e4bb91be4de515a7eeb;
249285

286+
/// The deployed address of the `RouteProcessor4` contract at the published
287+
/// `0.1.8` tag. (Unchanged from `0.1.7`.)
288+
address constant ROUTE_PROCESSOR_DEPLOYED_ADDRESS_0_1_8 = 0x6E2d0e71d900474b262E545Bc4C98b71ab368d21;
289+
290+
/// The runtime code hash of the `RouteProcessor4` contract at the published
291+
/// `0.1.8` tag.
292+
bytes32 constant ROUTE_PROCESSOR_DEPLOYED_CODEHASH_0_1_8 =
293+
0xeb3745a79c6ba48e8767b9c355b8e7b79f9d6edeca004e4bb91be4de515a7eeb;
294+
295+
/// The deployed address of the `RouteProcessor4` contract at the published
296+
/// `0.1.9` tag. (Unchanged from `0.1.7`.)
297+
address constant ROUTE_PROCESSOR_DEPLOYED_ADDRESS_0_1_9 = 0x6E2d0e71d900474b262E545Bc4C98b71ab368d21;
298+
299+
/// The runtime code hash of the `RouteProcessor4` contract at the published
300+
/// `0.1.9` tag.
301+
bytes32 constant ROUTE_PROCESSOR_DEPLOYED_CODEHASH_0_1_9 =
302+
0xeb3745a79c6ba48e8767b9c355b8e7b79f9d6edeca004e4bb91be4de515a7eeb;
303+
250304
/// The address of the `GenericPoolRaindexV6ArbOrderTaker` contract when
251305
/// deployed with the rain standard zoltu deployer.
252306
address constant GENERIC_POOL_ARB_ORDER_TAKER_DEPLOYED_ADDRESS = GENERIC_POOL_ARB_OT_ADDR;
@@ -321,6 +375,24 @@ library LibRaindexDeploy {
321375
bytes32 constant GENERIC_POOL_ARB_ORDER_TAKER_DEPLOYED_CODEHASH_0_1_7 =
322376
0xc4492cb22d918a3f0d41f13e533744ef03a2e7f744ec0a43b79d97a04c537544;
323377

378+
/// The deployed address of the `GenericPoolRaindexV6ArbOrderTaker` contract
379+
/// at the published `0.1.8` tag. (Unchanged from `0.1.7`.)
380+
address constant GENERIC_POOL_ARB_ORDER_TAKER_DEPLOYED_ADDRESS_0_1_8 = 0xc0c17e58018C80A5420dF7756acd2B2dcf37e380;
381+
382+
/// The runtime code hash of the `GenericPoolRaindexV6ArbOrderTaker` contract
383+
/// at the published `0.1.8` tag.
384+
bytes32 constant GENERIC_POOL_ARB_ORDER_TAKER_DEPLOYED_CODEHASH_0_1_8 =
385+
0xc4492cb22d918a3f0d41f13e533744ef03a2e7f744ec0a43b79d97a04c537544;
386+
387+
/// The deployed address of the `GenericPoolRaindexV6ArbOrderTaker` contract
388+
/// at the published `0.1.9` tag. (Unchanged from `0.1.7`.)
389+
address constant GENERIC_POOL_ARB_ORDER_TAKER_DEPLOYED_ADDRESS_0_1_9 = 0xc0c17e58018C80A5420dF7756acd2B2dcf37e380;
390+
391+
/// The runtime code hash of the `GenericPoolRaindexV6ArbOrderTaker` contract
392+
/// at the published `0.1.9` tag.
393+
bytes32 constant GENERIC_POOL_ARB_ORDER_TAKER_DEPLOYED_CODEHASH_0_1_9 =
394+
0xc4492cb22d918a3f0d41f13e533744ef03a2e7f744ec0a43b79d97a04c537544;
395+
324396
/// The address of the `RouteProcessorRaindexV6ArbOrderTaker` contract
325397
/// when deployed with the rain standard zoltu deployer.
326398
address constant ROUTE_PROCESSOR_ARB_ORDER_TAKER_DEPLOYED_ADDRESS = RP_ARB_OT_ADDR;
@@ -402,6 +474,26 @@ library LibRaindexDeploy {
402474
bytes32 constant ROUTE_PROCESSOR_ARB_ORDER_TAKER_DEPLOYED_CODEHASH_0_1_7 =
403475
0xc3fb3bb0355fee22e54cade57f5ff828478d59f34fdd8057bc0bc6a11b3d48fc;
404476

477+
/// The deployed address of the `RouteProcessorRaindexV6ArbOrderTaker`
478+
/// contract at the published `0.1.8` tag. (Unchanged from `0.1.7`.)
479+
address constant ROUTE_PROCESSOR_ARB_ORDER_TAKER_DEPLOYED_ADDRESS_0_1_8 =
480+
0x5Ec2625ee7c73c85fAb2bc4cf527E1434F0dcC5d;
481+
482+
/// The runtime code hash of the `RouteProcessorRaindexV6ArbOrderTaker`
483+
/// contract at the published `0.1.8` tag.
484+
bytes32 constant ROUTE_PROCESSOR_ARB_ORDER_TAKER_DEPLOYED_CODEHASH_0_1_8 =
485+
0xc3fb3bb0355fee22e54cade57f5ff828478d59f34fdd8057bc0bc6a11b3d48fc;
486+
487+
/// The deployed address of the `RouteProcessorRaindexV6ArbOrderTaker`
488+
/// contract at the published `0.1.9` tag. (Unchanged from `0.1.7`.)
489+
address constant ROUTE_PROCESSOR_ARB_ORDER_TAKER_DEPLOYED_ADDRESS_0_1_9 =
490+
0x5Ec2625ee7c73c85fAb2bc4cf527E1434F0dcC5d;
491+
492+
/// The runtime code hash of the `RouteProcessorRaindexV6ArbOrderTaker`
493+
/// contract at the published `0.1.9` tag.
494+
bytes32 constant ROUTE_PROCESSOR_ARB_ORDER_TAKER_DEPLOYED_CODEHASH_0_1_9 =
495+
0xc3fb3bb0355fee22e54cade57f5ff828478d59f34fdd8057bc0bc6a11b3d48fc;
496+
405497
/// The address of the `GenericPoolRaindexV6FlashBorrower` contract when
406498
/// deployed with the rain standard zoltu deployer.
407499
address constant GENERIC_POOL_FLASH_BORROWER_DEPLOYED_ADDRESS = GENERIC_POOL_FB_ADDR;
@@ -476,6 +568,24 @@ library LibRaindexDeploy {
476568
bytes32 constant GENERIC_POOL_FLASH_BORROWER_DEPLOYED_CODEHASH_0_1_7 =
477569
0xed618063fd6ffc7558e4588ea6357356e781d660fa22caa292a2f9aeaa21996f;
478570

571+
/// The deployed address of the `GenericPoolRaindexV6FlashBorrower` contract
572+
/// at the published `0.1.8` tag. (Unchanged from `0.1.7`.)
573+
address constant GENERIC_POOL_FLASH_BORROWER_DEPLOYED_ADDRESS_0_1_8 = 0xAd8af7f90a06659E9bBFD457c6C642fB60B1F46b;
574+
575+
/// The runtime code hash of the `GenericPoolRaindexV6FlashBorrower` contract
576+
/// at the published `0.1.8` tag.
577+
bytes32 constant GENERIC_POOL_FLASH_BORROWER_DEPLOYED_CODEHASH_0_1_8 =
578+
0xed618063fd6ffc7558e4588ea6357356e781d660fa22caa292a2f9aeaa21996f;
579+
580+
/// The deployed address of the `GenericPoolRaindexV6FlashBorrower` contract
581+
/// at the published `0.1.9` tag. (Unchanged from `0.1.7`.)
582+
address constant GENERIC_POOL_FLASH_BORROWER_DEPLOYED_ADDRESS_0_1_9 = 0xAd8af7f90a06659E9bBFD457c6C642fB60B1F46b;
583+
584+
/// The runtime code hash of the `GenericPoolRaindexV6FlashBorrower` contract
585+
/// at the published `0.1.9` tag.
586+
bytes32 constant GENERIC_POOL_FLASH_BORROWER_DEPLOYED_CODEHASH_0_1_9 =
587+
0xed618063fd6ffc7558e4588ea6357356e781d660fa22caa292a2f9aeaa21996f;
588+
479589
uint256 constant RAINDEX_START_BLOCK_ARBITRUM = 473030678;
480590
uint256 constant RAINDEX_START_BLOCK_BASE = 47278140;
481591
uint256 constant RAINDEX_START_BLOCK_FLARE = 62835540;

test/concrete/arb/RouteProcessorRaindexV6ArbOrderTaker.noEthForward.t.sol

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,11 @@ import {Test} from "forge-std-1.16.1/src/Test.sol";
66

77
import {RouteProcessorRaindexV6ArbOrderTaker} from "../../../src/concrete/arb/RouteProcessorRaindexV6ArbOrderTaker.sol";
88
import {Float} from "raindex-interface-0.1.1/src/interface/IRaindexV6.sol";
9-
import {IRouteProcessor} from "src/interface/IRouteProcessor.sol";
109
import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol";
1110
import {LibTOFUTokenDecimals} from "rain-tofu-erc20-decimals-0.1.1/src/lib/LibTOFUTokenDecimals.sol";
1211
import {LibRaindexDeploy} from "../../../src/lib/deploy/LibRaindexDeploy.sol";
1312
import {MockToken} from "test/util/concrete/MockToken.sol";
14-
15-
/// @dev Route processor mock that records the `msg.value` it was called with in
16-
/// storage slot 0, so a test can assert how much native ETH the arb forwarded.
17-
contract ValueRecordingRouteProcessor is IRouteProcessor {
18-
function processRoute(address, uint256, address, uint256, address, bytes memory)
19-
external
20-
payable
21-
returns (uint256)
22-
{
23-
// Slot 0 holds the last `msg.value` seen, readable via `vm.load` from
24-
// the etched address.
25-
assembly ("memory-safe") {
26-
sstore(0, callvalue())
27-
}
28-
return 0;
29-
}
30-
}
13+
import {ValueRecordingRouteProcessor} from "test/util/concrete/ValueRecordingRouteProcessor.sol";
3114

3215
/// @title RouteProcessorRaindexV6ArbOrderTakerNoEthForwardTest
3316
/// @notice Locks the documented divergence from `LibGenericPoolExchange` (#2699):
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: LicenseRef-DCL-1.0
2+
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
3+
pragma solidity =0.8.25;
4+
5+
import {IRouteProcessor} from "src/interface/IRouteProcessor.sol";
6+
7+
/// @dev Route processor mock that records the `msg.value` it was called with in
8+
/// storage slot 0, so a test can assert how much native ETH the arb forwarded.
9+
contract ValueRecordingRouteProcessor is IRouteProcessor {
10+
function processRoute(address, uint256, address, uint256, address, bytes memory)
11+
external
12+
payable
13+
returns (uint256)
14+
{
15+
// Slot 0 holds the last `msg.value` seen, readable via `vm.load` from
16+
// the etched address.
17+
assembly ("memory-safe") {
18+
sstore(0, callvalue())
19+
}
20+
return 0;
21+
}
22+
}

0 commit comments

Comments
 (0)