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

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

feat(epic): add SVM client #985

wants to merge 15 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.

_lowBlockNumber: number,
_highBlockNumber?: number
): Promise<number | undefined> {
throw new Error("fillStatusArray: not implemented");
Copy link
Preview

Copilot AI Apr 23, 2025

Choose a reason for hiding this comment

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

The function findFillBlock throws an error with the message 'fillStatusArray: not implemented' which appears to be a copy-paste error. Please update the error message to accurately reflect the function name, e.g., 'findFillBlock: not implemented'.

Suggested change
throw new Error("fillStatusArray: not implemented");
throw new Error("findFillBlock: not implemented");

Copilot uses AI. Check for mistakes.

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.

4 participants