feat: add cross-chain redemption tracking via Wormhole VAA parsing#3
Open
mswilkison wants to merge 1 commit intomasterfrom
Open
feat: add cross-chain redemption tracking via Wormhole VAA parsing#3mswilkison wants to merge 1 commit intomasterfrom
mswilkison wants to merge 1 commit intomasterfrom
Conversation
Add support for tracking the origin chain of L2 redemptions that come through the L1BTCRedeemerWormhole contract. This allows the subgraph to identify whether a redemption originated from Arbitrum, Base, or other supported L2 chains. Changes: - Add WormholeChain enum with supported chains (Arbitrum, Base, Sui, etc.) - Add sourceChainId, sourceChain, wormholeSequence fields to Redemption - Add WormholeSender entity to track allowed L2 senders - Add CrossChainRedemptionTracker entity for VAA-to-redemption linking - Add L1BTCRedeemerWormhole data source with event/call handlers - Implement VAA parsing to extract emitter chain ID from Wormhole messages The implementation uses a call handler on requestRedemption(bytes) to decode the Wormhole VAA and extract the source chain, then links it to the Redemption entity when the RedemptionRequested event fires. Note: Fulltext search feature temporarily disabled for local testing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Schema
WormholeChainenum with supported chains (ARBITRUM, BASE, SUI, STARKNET, etc.)sourceChainId,sourceChain,wormholeSequencefields toRedemptionentityWormholeSenderentity to track allowed L2 sendersCrossChainRedemptionTrackerentity for linking VAA data to redemptionsData Source
L1BTCRedeemerWormholecontract (0x5D4d83aaB53B7E7cA915AEB2d4d3f4e03823DbDe)RedemptionRequestedandAllowedSenderUpdatedeventsrequestRedemption(bytes)calls to decode Wormhole VAAMapping
parseWormholeVAA()to decode VAA structure and extract emitter chain IDExample Query
{ redemptions(where: { sourceChain: ARBITRUM }) { id amount sourceChainId sourceChain wormholeSequence } }Notes
🤖 Generated with Claude Code