Skip to content

Commit 1a29ad0

Browse files
Implement IRaindexV7: clear4 routes each order's signed context to its own eval
Replaces clear3 with clear4, which evaluates alice's order with aliceSignedContext and bob's with bobSignedContext, matching quote2 and takeOrders4. clear3 is removed so callers carrying V6 assumptions revert at the missing selector. All consumers move from IRaindexV6 to IRaindexV7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3e34fcf commit 1a29ad0

203 files changed

Lines changed: 787 additions & 588 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.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
},
146146
{
147147
"type": "function",
148-
"name": "clear3",
148+
"name": "clear4",
149149
"inputs": [
150150
{
151151
"name": "alice",

‎crates/bindings/abis/RaindexV6.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
},
146146
{
147147
"type": "function",
148-
"name": "clear3",
148+
"name": "clear4",
149149
"inputs": [
150150
{
151151
"name": "aliceOrder",

‎crates/bindings/src/js_api.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::IRaindexV6::{
1+
use crate::IRaindexV7::{
22
EvaluableV4, OrderV4, QuoteV2, SignedContextV1, TakeOrderConfigV4, TakeOrdersConfigV5, IOV2,
33
};
44
use wasm_bindgen_utils::{impl_custom_tsify, impl_wasm_traits, prelude::*};

‎crates/bindings/src/lib.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use alloy::sol;
33
sol!(
44
#![sol(all_derives = true, rpc)]
55
#![sol(extra_derives(serde::Serialize, serde::Deserialize))]
6-
IRaindexV6, "./abis/IRaindexV6.json"
6+
IRaindexV7, "./abis/IRaindexV7.json"
77
);
88

99
sol!(
@@ -57,7 +57,7 @@ pub mod wasm_traits;
5757
pub mod topics {
5858
use crate::{
5959
IInterpreterStoreV3::Set,
60-
IRaindexV6::{
60+
IRaindexV7::{
6161
AddOrderV3, AfterClearV2, ClearV3, DepositV2, RemoveOrderV3, TakeOrderV3, WithdrawV2,
6262
},
6363
Raindex::MetaV1_2,

‎crates/common/src/add_order.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use rain_metadata::{
3131
use rain_metadata_bindings::MetaBoard::emitMetaCall;
3232
use raindex_app_settings::deployment::DeploymentCfg;
3333
use raindex_bindings::provider::{mk_read_provider, ReadProviderError};
34-
use raindex_bindings::IRaindexV6::{addOrder4Call, EvaluableV4, OrderConfigV4, TaskV2, IOV2};
34+
use raindex_bindings::IRaindexV7::{addOrder4Call, EvaluableV4, OrderConfigV4, TaskV2, IOV2};
3535
use serde::{Deserialize, Serialize};
3636
use serde_bytes::ByteBuf;
3737
use std::collections::HashMap;

‎crates/common/src/deposit.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::allowance::read_allowance;
22
use crate::transaction::{TransactionArgs, TransactionArgsError, WritableTransactionExecuteError};
33
use alloy::primitives::{Address, B256, U256};
44
use rain_math_float::{Float, FloatError};
5-
use raindex_bindings::IRaindexV6::deposit4Call;
5+
use raindex_bindings::IRaindexV7::deposit4Call;
66
#[cfg(not(target_family = "wasm"))]
77
use raindex_bindings::IERC20::approveCall;
88
use serde::{Deserialize, Serialize};

‎crates/common/src/local_db/address_collectors.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::decode::{DecodedEvent, DecodedEventData};
22
use alloy::primitives::Address;
3-
use raindex_bindings::IRaindexV6::OrderV4;
3+
use raindex_bindings::IRaindexV7::OrderV4;
44
use std::collections::BTreeSet;
55

66
pub fn collect_token_addresses(
@@ -68,7 +68,7 @@ mod tests {
6868
use super::*;
6969
use alloy::primitives::{b256, Address, Bytes, FixedBytes, U256};
7070
use raindex_bindings::IInterpreterStoreV3::Set;
71-
use raindex_bindings::IRaindexV6::{
71+
use raindex_bindings::IRaindexV7::{
7272
AddOrderV3, DepositV2, OrderV4, RemoveOrderV3, SignedContextV1, TakeOrderConfigV4,
7373
TakeOrderV3, WithdrawV2, IOV2,
7474
};
@@ -90,7 +90,7 @@ mod tests {
9090
OrderV4 {
9191
owner: Address::from([1u8; 20]),
9292
nonce: U256::from(1).into(),
93-
evaluable: raindex_bindings::IRaindexV6::EvaluableV4 {
93+
evaluable: raindex_bindings::IRaindexV7::EvaluableV4 {
9494
interpreter: Address::from([2u8; 20]),
9595
store: Address::from([3u8; 20]),
9696
bytecode: alloy::primitives::Bytes::from(vec![]),
@@ -172,11 +172,11 @@ mod tests {
172172
vaultId: U256::from(0).into(),
173173
});
174174

175-
let clear = raindex_bindings::IRaindexV6::ClearV3 {
175+
let clear = raindex_bindings::IRaindexV7::ClearV3 {
176176
sender: Address::from([0u8; 20]),
177177
alice,
178178
bob,
179-
clearConfig: raindex_bindings::IRaindexV6::ClearConfigV2 {
179+
clearConfig: raindex_bindings::IRaindexV7::ClearConfigV2 {
180180
aliceInputIOIndex: U256::from(0),
181181
aliceOutputIOIndex: U256::from(0),
182182
bobInputIOIndex: U256::from(0),

‎crates/common/src/local_db/decode.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use alloy::{
77
use core::convert::TryFrom;
88
use raindex_bindings::{
99
IInterpreterStoreV3::Set,
10-
IRaindexV6::{
10+
IRaindexV7::{
1111
AddOrderV3, AfterClearV2, ClearV3, DepositV2, RemoveOrderV3, TakeOrderV3, WithdrawV2,
1212
},
1313
Raindex::MetaV1_2,
@@ -210,11 +210,11 @@ mod test_helpers {
210210
use alloy::hex;
211211
use alloy::primitives::{address, b256, Address, Bytes, FixedBytes, B256, U256};
212212
use raindex_bindings::{
213-
IRaindexV6::{
213+
IRaindexV7::{
214214
AddOrderV3, AfterClearV2, ClearConfigV2, ClearStateChangeV2, ClearV3, DepositV2,
215215
RemoveOrderV3, SignedContextV1, TakeOrderConfigV4, TakeOrderV3, WithdrawV2,
216216
},
217-
IRaindexV6::{EvaluableV4, OrderV4, IOV2},
217+
IRaindexV7::{EvaluableV4, OrderV4, IOV2},
218218
Raindex::MetaV1_2,
219219
};
220220
use serde_json::Value;

‎crates/common/src/local_db/fetch.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ mod tests {
443443
use alloy::rpc::types::FilterBlockError;
444444
use alloy::sol_types::SolEvent;
445445
use httpmock::prelude::*;
446-
use raindex_bindings::{IInterpreterStoreV3::Set, IRaindexV6::AddOrderV3};
446+
use raindex_bindings::{IInterpreterStoreV3::Set, IRaindexV7::AddOrderV3};
447447
use serde_json::json;
448448
use std::str::FromStr;
449449
use std::sync::atomic::{AtomicUsize, Ordering};

‎crates/common/src/local_db/insert.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use alloy::{
99
primitives::{keccak256, Address, FixedBytes, B256, U256},
1010
};
1111
use rain_math_float::Float;
12-
use raindex_bindings::IRaindexV6::{
12+
use raindex_bindings::IRaindexV7::{
1313
AddOrderV3, AfterClearV2, ClearV3, DepositV2, OrderV4, RemoveOrderV3, TakeOrderV3, WithdrawV2,
1414
IOV2,
1515
};
@@ -776,7 +776,7 @@ mod tests {
776776
use alloy::primitives::{b256, Address, Bytes, FixedBytes, B256, U256};
777777
use itertools::Itertools;
778778
use raindex_bindings::IInterpreterStoreV3::Set;
779-
use raindex_bindings::IRaindexV6::{
779+
use raindex_bindings::IRaindexV7::{
780780
ClearConfigV2, ClearStateChangeV2, EvaluableV4, SignedContextV1, TakeOrderConfigV4,
781781
};
782782
use std::collections::HashMap;

0 commit comments

Comments
 (0)