Skip to content

Commit 8babc6b

Browse files
Merge pull request #2929 from rainlanguage/2026-10-26-raindex-v7
Adopt IRaindexV7 and SignedContextV2
2 parents 823ebfe + c3d2923 commit 8babc6b

261 files changed

Lines changed: 3738 additions & 3030 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/ARCHITECTURE.md‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ Generated Solidity Bindings (Alloy `sol!`)
5757
- Practical result of the `sol!(… rpc)` attribute:
5858
- For `IRaindexV5` and `IERC20`, you can construct an instance bound to a
5959
provider and call methods with strong typing, for example:
60-
`let ob = IRaindexV5Instance::new(address, provider.clone()); ob.quote2(config).await?`.
60+
`let ob = IRaindexV5Instance::new(address, provider.clone()); ob.quote3(config).await?`.
6161
- For all bindings, you can still directly use generated call structs, e.g.,
62-
`IRaindexV5::removeOrder3Call { ... }.abi_encode()` or
62+
`IRaindexV5::removeOrder4Call { ... }.abi_encode()` or
6363
`Raindex::multicallCall { ... }`.
6464

6565
- Derives and defaults:
@@ -118,17 +118,17 @@ WASM and JS Interop
118118

119119
- Exposed interfaces (hand‑written TS definitions):
120120
- `IOV2`: `{ token: string; vaultId: string; }`
121-
- `QuoteV2`:
122-
`{ order: OrderV4; inputIOIndex: string; outputIOIndex: string; signedContext: SignedContextV1[]; }`
121+
- `QuoteV3`:
122+
`{ order: OrderV4; inputIOIndex: string; outputIOIndex: string; signedContext: SignedContextV2[]; }`
123123
- `OrderV4`:
124124
`{ owner: string; evaluable: EvaluableV4; validInputs: IOV2[]; validOutputs: IOV2[]; nonce: string; }`
125125
- `EvaluableV4`: `{ interpreter: string; store: string; bytecode: string; }`
126-
- `SignedContextV1`:
127-
`{ signer: string; context: string[]; signature: string; }`
128-
- `TakeOrderConfigV4`:
129-
`{ order: OrderV4; inputIOIndex: string; outputIOIndex: string; signedContext: SignedContextV1[]; }`
130-
- `TakeOrdersConfigV5`:
131-
`{ minimumIO: string; maximumIO: string; maximumIORatio: string; IOIsInput: string; orders: TakeOrderConfigV4[]; data: string; }`
126+
- `SignedContextV2`:
127+
`{ signer: string; domainSeparator: string; context: string[]; signature: string; }`
128+
- `TakeOrderConfigV5`:
129+
`{ order: OrderV4; inputIOIndex: string; outputIOIndex: string; signedContext: SignedContextV2[]; }`
130+
- `TakeOrdersConfigV6`:
131+
`{ minimumIO: string; maximumIO: string; maximumIORatio: string; IOIsInput: string; orders: TakeOrderConfigV5[]; data: string; }`
132132

133133
- Why many fields are `string` in TS
134134
- Large numeric values (e.g., `U256`) are represented as strings to avoid
@@ -157,11 +157,11 @@ How This Crate Is Used Elsewhere
157157

158158
- Quote engine (`crates/quote`):
159159
- Imports `IRaindexV5::IRaindexV5Instance` and `mk_read_provider`.
160-
- Binds the instance to a provider and calls `quote2` for many orders via
160+
- Binds the instance to a provider and calls `quote3` for many orders via
161161
Alloy’s multicall helper.
162162
- Common utilities (`crates/common`):
163163
- Uses ABI‑generated call structs (e.g., `deposit3Call`, `withdraw3Call`,
164-
`removeOrder3Call`, `IERC20::approveCall`) to build calldata for
164+
`removeOrder4Call`, `IERC20::approveCall`) to build calldata for
165165
transactions.
166166
- JS API (`crates/js_api`):
167167
- Builds order builder calldata for approvals/deposits/add‑order and uses call
@@ -209,12 +209,12 @@ Examples
209209
`let provider = mk_read_provider(&rpcs)?;`
210210
- Bind to a raindex:
211211
`let ob = IRaindexV5Instance::new(raindex_addr, provider.clone());`
212-
- Call a view: `let quote = ob.quote2(config).await?;`
212+
- Call a view: `let quote = ob.quote3(config).await?;`
213213

214214
- Building calldata without an instance:
215-
- `use raindex_bindings::IRaindexV5::removeOrder3Call;`
215+
- `use raindex_bindings::IRaindexV5::removeOrder4Call;`
216216
- Construct the struct and encode:
217-
`let bytes = removeOrder3Call { order, tasks }.abi_encode();`
217+
`let bytes = removeOrder4Call { order, tasks }.abi_encode();`
218218

219219
Limitations and Notes
220220

0 commit comments

Comments
 (0)