subgraph upgrade#2010
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis update migrates the subgraph and its supporting scripts to use decimal floating-point arithmetic (via a new Changes
Sequence Diagram(s)sequenceDiagram
participant Subgraph
participant DecimalFloatContract
participant Vault
participant EventHandler
Note over Subgraph: On event (DepositV2, WithdrawV2, etc.)
Subgraph->>EventHandler: Receives event with Bytes vaultId, Float amount
EventHandler->>DecimalFloatContract: Uses calculator for arithmetic (add, sub, minus, gt)
DecimalFloatContract-->>EventHandler: Returns Float result
EventHandler->>Vault: Updates vault balance with Float values
EventHandler->>Subgraph: Creates/updates entities with Bytes/Float fields
Estimated code review effort5 (>120 minutes) Possibly related PRs
Suggested labels
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@CodeRabbit full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@CodeRabbit full review |
✅ Actions performedFull review triggered. |
| } from "../generated/OrderBook/OrderBook"; | ||
| import { Withdraw } from "../generated/OrderBook/OrderBook"; | ||
| import { WithdrawV2 } from "../generated/OrderBook/OrderBook"; | ||
| import { log } from "@graphprotocol/graph-ts"; |
Motivation
We need to index orderbook V5 events
Solution
Update subgraph to work with V5 orderbook
Checks
By submitting this for review, I'm confirming I've done the following:
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Improvements
Tests