Skip to content

Commit b2f0fc4

Browse files
Merge pull request #2796 from rainlanguage/chore/use-interface-token-self-trade
Use IRaindexV6.TokenSelfTrade from raindex-interface 0.1.3
2 parents d24b7b6 + 9ee1717 commit b2f0fc4

143 files changed

Lines changed: 182 additions & 186 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/bindings/abis/IRaindexV6.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,6 +1904,11 @@
19041904
"name": "OrderNoSources",
19051905
"inputs": []
19061906
},
1907+
{
1908+
"type": "error",
1909+
"name": "TokenSelfTrade",
1910+
"inputs": []
1911+
},
19071912
{
19081913
"type": "error",
19091914
"name": "ZeroDepositAmount",

foundry.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ rainlang = "0.1.5"
5555
rain-interpreter-interface = "0.1.0"
5656
# rainlanguage/rain.raindex.interface was renamed to
5757
# rainlanguage/raindex.interface; Soldeer registry name follows.
58-
raindex-interface = "0.1.1"
58+
raindex-interface = "0.1.3"
5959
rain-metadata = "0.1.0"
6060
rain-intorastring = "0.1.0"
6161
rain-sol-codegen = "0.1.0"

remappings.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ rain-sol-codegen-0.1.0/=dependencies/rain-sol-codegen-0.1.0/
1313
rain-solmem-0.1.3/=dependencies/rain-solmem-0.1.3/
1414
rain-string-0.2.0/=dependencies/rain-string-0.2.0/
1515
rain-tofu-erc20-decimals-0.1.1/=dependencies/rain-tofu-erc20-decimals-0.1.1/
16-
raindex-interface-0.1.1/=dependencies/raindex-interface-0.1.1/
16+
raindex-interface-0.1.3/=dependencies/raindex-interface-0.1.3/
1717
rainlang-0.1.5/=dependencies/rainlang-0.1.5/

soldeer.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ integrity = "9e1fccf893dd0d90aeb445c78f9eee3904bc50287ff1da30b954508f18412cd2"
105105

106106
[[dependencies]]
107107
name = "raindex-interface"
108-
version = "0.1.1"
109-
url = "https://soldeer-revisions.s3.amazonaws.com/raindex-interface/0_1_1_21-05-2026_18:36:45_raindex.zip"
110-
checksum = "d744aec8e9dc1bcce58de546d1a419f7eb87610e1541ce5459a140fd45626c99"
111-
integrity = "df40e42221d1ecd4e6e6ae6a3511b00fc182e1a46f99401f564d94f299d63730"
108+
version = "0.1.3"
109+
url = "https://soldeer-revisions.s3.amazonaws.com/raindex-interface/0_1_3_03-07-2026_11:20:58_raindex.zip"
110+
checksum = "5c4149dc0898b5db4036f5cac04614b98f204c062c694477fecc0f870a96907c"
111+
integrity = "5f69dc4e1234d15f27d74be29e287c8619c08cb354de9d8a3d30f42df13a0269"
112112

113113
[[dependencies]]
114114
name = "rainlang"

src/abstract/RaindexV6ArbCommon.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
33
pragma solidity ^0.8.19;
44

5-
import {TaskV2} from "raindex-interface-0.1.1/src/interface/IRaindexV6.sol";
5+
import {TaskV2} from "raindex-interface-0.1.3/src/interface/IRaindexV6.sol";
66

77
/// @param task The task to run as post for each arb.
88
struct RaindexV6ArbConfig {

src/abstract/RaindexV6ArbOrderTaker.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ pragma solidity ^0.8.19;
55
import {ERC165, IERC165} from "@openzeppelin-contracts-5.6.1/utils/introspection/ERC165.sol";
66
import {ReentrancyGuard} from "@openzeppelin-contracts-5.6.1/utils/ReentrancyGuard.sol";
77
import {IERC20, SafeERC20} from "@openzeppelin-contracts-5.6.1/token/ERC20/utils/SafeERC20.sol";
8-
import {IRaindexV6} from "raindex-interface-0.1.1/src/interface/IRaindexV6.sol";
9-
import {IRaindexV6ArbOrderTaker, TaskV2} from "raindex-interface-0.1.1/src/interface/IRaindexV6ArbOrderTaker.sol";
10-
import {TakeOrdersConfigV5, Float} from "raindex-interface-0.1.1/src/interface/IRaindexV6.sol";
8+
import {IRaindexV6} from "raindex-interface-0.1.3/src/interface/IRaindexV6.sol";
9+
import {IRaindexV6ArbOrderTaker, TaskV2} from "raindex-interface-0.1.3/src/interface/IRaindexV6ArbOrderTaker.sol";
10+
import {TakeOrdersConfigV5, Float} from "raindex-interface-0.1.3/src/interface/IRaindexV6.sol";
1111
import {RaindexV6ArbCommon} from "./RaindexV6ArbCommon.sol";
1212
import {LibRaindexArb} from "../lib/LibRaindexArb.sol";
1313
import {LibRaindexDeploy} from "../lib/deploy/LibRaindexDeploy.sol";
14-
import {IRaindexV6OrderTaker} from "raindex-interface-0.1.1/src/interface/IRaindexV6OrderTaker.sol";
14+
import {IRaindexV6OrderTaker} from "raindex-interface-0.1.3/src/interface/IRaindexV6OrderTaker.sol";
1515
import {LibTOFUTokenDecimals} from "rain-tofu-erc20-decimals-0.1.1/src/lib/LibTOFUTokenDecimals.sol";
1616

1717
/// Thrown when `arb5` is called with a `raindex` that is not the trusted

src/abstract/RaindexV6ArbTaskGated.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pragma solidity ^0.8.19;
44

55
import {RaindexV6ArbCommon, RaindexV6ArbConfig, WrongTask} from "./RaindexV6ArbCommon.sol";
6-
import {TaskV2} from "raindex-interface-0.1.1/src/interface/IRaindexV6.sol";
6+
import {TaskV2} from "raindex-interface-0.1.3/src/interface/IRaindexV6.sol";
77

88
/// @title RaindexV6ArbTaskGated
99
/// @notice Mixin that adds task-hash gating to arb contracts. Stores a task

src/abstract/RaindexV6FlashBorrower.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {ERC165, IERC165} from "@openzeppelin-contracts-5.6.1/utils/introspection
66
import {SafeERC20} from "@openzeppelin-contracts-5.6.1/token/ERC20/utils/SafeERC20.sol";
77
import {IERC20} from "@openzeppelin-contracts-5.6.1/token/ERC20/IERC20.sol";
88
import {ReentrancyGuard} from "@openzeppelin-contracts-5.6.1/utils/ReentrancyGuard.sol";
9-
import {ON_FLASH_LOAN_CALLBACK_SUCCESS} from "raindex-interface-0.1.1/src/interface/ierc3156/IERC3156FlashBorrower.sol";
10-
import {IRaindexV6, TakeOrdersConfigV5, TaskV2} from "raindex-interface-0.1.1/src/interface/IRaindexV6.sol";
11-
import {IERC3156FlashBorrower} from "raindex-interface-0.1.1/src/interface/ierc3156/IERC3156FlashBorrower.sol";
9+
import {ON_FLASH_LOAN_CALLBACK_SUCCESS} from "raindex-interface-0.1.3/src/interface/ierc3156/IERC3156FlashBorrower.sol";
10+
import {IRaindexV6, TakeOrdersConfigV5, TaskV2} from "raindex-interface-0.1.3/src/interface/IRaindexV6.sol";
11+
import {IERC3156FlashBorrower} from "raindex-interface-0.1.3/src/interface/ierc3156/IERC3156FlashBorrower.sol";
1212
import {RaindexV6ArbCommon} from "./RaindexV6ArbCommon.sol";
1313
import {LibRaindexArb} from "../lib/LibRaindexArb.sol";
1414
import {LibRaindexDeploy} from "../lib/deploy/LibRaindexDeploy.sol";

src/abstract/RaindexV6FlashLender.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {SafeERC20} from "@openzeppelin-contracts-5.6.1/token/ERC20/utils/SafeERC
99
import {
1010
IERC3156FlashBorrower,
1111
ON_FLASH_LOAN_CALLBACK_SUCCESS
12-
} from "raindex-interface-0.1.1/src/interface/ierc3156/IERC3156FlashBorrower.sol";
13-
import {IERC3156FlashLender} from "raindex-interface-0.1.1/src/interface/ierc3156/IERC3156FlashLender.sol";
12+
} from "raindex-interface-0.1.3/src/interface/ierc3156/IERC3156FlashBorrower.sol";
13+
import {IERC3156FlashLender} from "raindex-interface-0.1.3/src/interface/ierc3156/IERC3156FlashLender.sol";
1414

1515
/// Thrown when the `onFlashLoan` callback returns anything other than
1616
/// ON_FLASH_LOAN_CALLBACK_SUCCESS.

src/concrete/raindex/RaindexV6.sol

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ import {
4646
QuoteV2,
4747
Float,
4848
IOV2
49-
} from "raindex-interface-0.1.1/src/interface/IRaindexV6.sol";
50-
import {IRaindexV6OrderTaker} from "raindex-interface-0.1.1/src/interface/IRaindexV6OrderTaker.sol";
49+
} from "raindex-interface-0.1.3/src/interface/IRaindexV6.sol";
50+
import {IRaindexV6OrderTaker} from "raindex-interface-0.1.3/src/interface/IRaindexV6OrderTaker.sol";
5151
import {LibOrder} from "../../lib/LibOrder.sol";
5252
import {
5353
CALLING_CONTEXT_COLUMNS,
@@ -77,9 +77,6 @@ error NotOrderOwner(address owner);
7777
/// Thrown when the input and output tokens don't match, in either direction.
7878
error TokenMismatch();
7979

80-
/// Thrown when the input token is the output token.
81-
error TokenSelfTrade();
82-
8380
/// Thrown when the minimum input is not met.
8481
/// @param minimumIO The minimum io required.
8582
/// @param actualIO The io that was achieved.

0 commit comments

Comments
 (0)