Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1a29ad0
Implement IRaindexV7: clear4 routes each order's signed context to it…
thedavidmeister Oct 25, 2026
0cbd3e9
Merge origin/main into 2026-10-25-clear4-signed-context-routing
thedavidmeister Oct 26, 2026
1a703c2
Pin raindex.interface#79 SignedContextV2 head and rainlang.interface#…
thedavidmeister Oct 26, 2026
e0156f8
WIP: SignedContextV2 migration (does not build yet)
thedavidmeister Oct 26, 2026
333e255
Build green: regen pointers/meta/candidate, TakeOrderV4 topic via sel…
thedavidmeister Oct 26, 2026
15bb0d7
Pin rainlang-interface 0.2.14 from Soldeer and raindex.interface#79 h…
thedavidmeister Oct 26, 2026
d5f2911
Subgraph: index TakeOrderV4 (SignedContextV2); regen bindings and tes…
thedavidmeister Oct 26, 2026
8dbb863
Rust/JS: migrate to IRaindexV7 SignedContextV2 names; oracle response…
thedavidmeister Oct 26, 2026
54a07a5
Pin removeOrder4 selector in remove calldata fixtures
thedavidmeister Oct 26, 2026
cb3382d
Oracle JSON test: qualify json! so it compiles for wasm
thedavidmeister Oct 26, 2026
cf236e9
Pin deposit5 selector in builder deposit calldata test
thedavidmeister Oct 26, 2026
0701314
Merge origin/main into 2026-10-25-clear4-signed-context-routing
thedavidmeister Oct 26, 2026
5195e56
Pin raindex-interface 0.1.10 from the Soldeer registry
thedavidmeister Oct 26, 2026
3fe6778
Keep clear4 signed-context routing as in clear3
thedavidmeister Oct 26, 2026
579d27b
Regenerate pins for clear3 routing
thedavidmeister Oct 26, 2026
a940714
Merge origin/main into 2026-10-26-raindex-v7
thedavidmeister Oct 26, 2026
5784bb3
Regenerate pointers, pins and meta
thedavidmeister Oct 26, 2026
83b7b45
Merge origin/main into 2026-10-26-raindex-v7
thedavidmeister Oct 26, 2026
4391e03
Rename JS takeOrders calldata export to getTakeOrders5Calldata; fix r…
thedavidmeister Oct 26, 2026
c3d2923
Merge origin/main into 2026-10-26-raindex-v7
thedavidmeister Oct 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions crates/bindings/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ Generated Solidity Bindings (Alloy `sol!`)
- Practical result of the `sol!(… rpc)` attribute:
- For `IRaindexV5` and `IERC20`, you can construct an instance bound to a
provider and call methods with strong typing, for example:
`let ob = IRaindexV5Instance::new(address, provider.clone()); ob.quote2(config).await?`.
`let ob = IRaindexV5Instance::new(address, provider.clone()); ob.quote3(config).await?`.
- For all bindings, you can still directly use generated call structs, e.g.,
`IRaindexV5::removeOrder3Call { ... }.abi_encode()` or
`IRaindexV5::removeOrder4Call { ... }.abi_encode()` or
`Raindex::multicallCall { ... }`.

- Derives and defaults:
Expand Down Expand Up @@ -118,17 +118,17 @@ WASM and JS Interop

- Exposed interfaces (hand‑written TS definitions):
- `IOV2`: `{ token: string; vaultId: string; }`
- `QuoteV2`:
`{ order: OrderV4; inputIOIndex: string; outputIOIndex: string; signedContext: SignedContextV1[]; }`
- `QuoteV3`:
`{ order: OrderV4; inputIOIndex: string; outputIOIndex: string; signedContext: SignedContextV2[]; }`
- `OrderV4`:
`{ owner: string; evaluable: EvaluableV4; validInputs: IOV2[]; validOutputs: IOV2[]; nonce: string; }`
- `EvaluableV4`: `{ interpreter: string; store: string; bytecode: string; }`
- `SignedContextV1`:
`{ signer: string; context: string[]; signature: string; }`
- `TakeOrderConfigV4`:
`{ order: OrderV4; inputIOIndex: string; outputIOIndex: string; signedContext: SignedContextV1[]; }`
- `TakeOrdersConfigV5`:
`{ minimumIO: string; maximumIO: string; maximumIORatio: string; IOIsInput: string; orders: TakeOrderConfigV4[]; data: string; }`
- `SignedContextV2`:
`{ signer: string; domainSeparator: string; context: string[]; signature: string; }`
- `TakeOrderConfigV5`:
`{ order: OrderV4; inputIOIndex: string; outputIOIndex: string; signedContext: SignedContextV2[]; }`
- `TakeOrdersConfigV6`:
`{ minimumIO: string; maximumIO: string; maximumIORatio: string; IOIsInput: string; orders: TakeOrderConfigV5[]; data: string; }`

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

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

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

Limitations and Notes

Expand Down
Loading
Loading