Skip to content

feat(epic): add SVM client #985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open

feat(epic): add SVM client #985

wants to merge 37 commits into from

Conversation

james-a-morris
Copy link
Member

No description provided.

james-a-morris and others added 14 commits April 4, 2025 10:52
SVM events emit addresses with base58-encoding. At least two addresses
emitted within an FundsDeposited or FilledRelay event will need to be
converted to a base16 EVM address. Make it easy by permitting the caller
of EvmAddress.from() to specify the encoding, defaulting to base16.
No functional change; only relocate so that all svm functionality is
localised to src/arch/svm.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a new SVM client along with several supporting refactors and improvements to address parsing and event handling across the codebase. Key changes include:

  • Enhancements to AddressUtils to support both base16 and base58 encoded addresses for EVM and SVM.
  • Addition of the SVM Spoke Pool client and associated event processing logic.
  • Removal of deprecated SVM helper files and reorganization of the SVM-related modules.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/AddressUtils.ts Reorganized imports and added thorough tests for both base58 and base16 encoded addresses.
src/utils/AddressUtils.ts Updated the Address classes to support an explicit encoding parameter for address decoding.
src/svm/* Removed redundant exports and helpers; refactored SVM module structure.
src/clients/SpokePoolClient/SVMSpokePoolClient.ts Introduced a new SVM-specific SpokePool client with methods for event querying and state updates.
src/arch/svm/* Added and modified SVM utility, types, and events client to support the new client and event processing.
src/arch/svm/SpokeUtils.ts Added basic implementations for SVM Spoke utilities with placeholders for unimplemented functions.

bmzig and others added 12 commits May 9, 2025 13:23
Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: Gerhard Steenkamp <[email protected]>
Signed-off-by: bennett <[email protected]>
Signed-off-by: Bennett <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
Co-authored-by: James Morris, MS <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: Gerhard Steenkamp <[email protected]>
Co-authored-by: Ihor Farion <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
Co-authored-by: Dong-Ha Kim <[email protected]>
@james-a-morris james-a-morris requested a review from Copilot May 15, 2025 21:11
@james-a-morris james-a-morris marked this pull request as ready for review May 15, 2025 21:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for an SVM-based SpokePoolClient as part of the epic “feat(epic): add SVM client” while standardizing terminology by renaming block‐related configuration fields (e.g. fromBlock, latestBlockSearched) to height‐based equivalents (e.g. from, latestHeightSearched). Key changes include new file additions for the SVM client, updates to client base classes and helper functions to consistently use the new naming, and necessary adaptations in the EVM-specific client implementations and related utilities.

Reviewed Changes

Copilot reviewed 70 out of 70 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/clients/SpokePoolClient/index.ts Added import & export for SvmSpokePoolClient and minor naming adjustments.
src/clients/SpokePoolClient/SpokePoolClient.ts Renamed configuration properties and updated event handling logic.
src/clients/SpokePoolClient/EVMSpokePoolClient.ts Updated parameter names (e.g. blockTag to atHeight) and adjusted block query parameters.
src/clients/BundleDataClient/BundleDataClient.ts Extended support to SVM clients by branching based on client type and calling the corresponding fill event lookup utility.
src/clients/BaseAbstractClient.ts & Others Widely replaced “Block” terminology with “Height” to reflect updated event search config.
Various SVM and EVM utility files Updated to follow new naming patterns and support the multi-chain approach with SVM support.
package.json & GitHub workflows Version bump and additional dependency/workflow updates for integration.
Comments suppressed due to low confidence (2)

src/clients/SpokePoolClient/index.ts:2

  • [nitpick] Ensure that the naming 'SvmSpokePoolClient' is consistently used across the codebase, paying special attention to case sensitivity given the difference between 'Svm' and 'SVM' in related identifiers.
import { SvmSpokePoolClient } from "./SVMSpokePoolClient";

src/clients/BaseAbstractClient.ts:22

  • [nitpick] Ensure that renaming properties from 'firstBlockToSearch' to 'firstHeightToSearch' (and similarly 'latestBlockSearched' to 'latestHeightSearched') is consistently updated across all documentation, tests, and references to avoid potential confusion.
public firstHeightToSearch = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants