Skip to content

[CRE-4708] Enable EVM transfer in LOOP mode#22832

Open
pavel-raykov wants to merge 2 commits into
developfrom
evm-create
Open

[CRE-4708] Enable EVM transfer in LOOP mode#22832
pavel-raykov wants to merge 2 commits into
developfrom
evm-create

Conversation

@pavel-raykov

@pavel-raykov pavel-raykov commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Current EVM transfer command uses EVMLegacyChain. In this PR we add an alternative code path which calls Relayer.Transact and does not use EVMLegacyChain. We started by enabling this new code path as a fallback if EVMLegacyChain is not available. Later, we will deprecate EVMLegacyChain and remove the corresponding code path.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Risk Rating: HIGH

This PR updates the /v2/transfers EVM transfer endpoint to support executing native transfers via a LOOP relayer when LegacyEVMChains aren’t available, and adds supporting mocks/tests for the relayer path.

Changes:

  • Add relayer-based execution path for EVM transfers (fallback when legacy chain lookup fails).
  • Add unit tests covering the relayer transfer path and the “no legacy/no relayer” error case.
  • Add mockery config + generated mock for the relayer interface.

Targeted areas for scrupulous human review:

  • EVMTransfersController.Create chain selection + error-to-HTTP mapping (avoid turning client input errors into 500s).
  • CreateWithRelayer request validation parity with legacy mode (e.g., zero from address), correct context usage, and response envelope compatibility (eth_tx vs evm_tx).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
core/web/mocks/relayer.go Adds generated mock for relayer interface used by web controller tests.
core/web/evm_transfer_controller.go Adds relayer fallback + new relayer execution path for EVM transfers.
core/web/evm_transfer_controller_test.go Adds tests for relayer transfer success and missing-chain/relayer error behavior.
.mockery.yaml Configures mockery generation output location for the relayer mock.
Files not reviewed (1)
  • core/web/mocks/relayer.go: Generated file

Comment thread core/web/evm_transfer_controller.go
Comment thread core/web/evm_transfer_controller.go Outdated
Comment thread core/web/evm_transfer_controller.go Outdated
Comment thread core/web/evm_transfer_controller_test.go
@trunk-io

trunk-io Bot commented Jun 12, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Files not reviewed (1)
  • core/web/mocks/relayer.go: Generated file

Comment thread core/web/evm_transfer_controller.go
@cl-sonarqube-production

Copy link
Copy Markdown

@pavel-raykov pavel-raykov marked this pull request as ready for review June 12, 2026 17:20
@pavel-raykov pavel-raykov requested review from a team as code owners June 12, 2026 17:20
@pavel-raykov pavel-raykov requested review from jmank88 and removed request for kalverra June 12, 2026 17:20
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.

3 participants