Skip to content

feat(evm): migrate payment precompile to native runtime base#340

Merged
phenix3443 merged 1 commit into
precompile-integrationfrom
precompile/payment-native
Jul 14, 2026
Merged

feat(evm): migrate payment precompile to native runtime base#340
phenix3443 merged 1 commit into
precompile-integrationfrom
precompile/payment-native

Conversation

@phenix3443

Copy link
Copy Markdown
Contributor

What

Part of subtask 3 (storage-series). Migrates the payment precompile onto x/evm/precompiles/base, identical shape to storage #339 / storageprovider #338.

Changes

  • Contract embeds base.Precompile; RunRunPrecompile; dispatch moves to Execute (existing handler map + base Dispatch/SetupABI, IsTransaction = !method.IsConstant()).
  • Dropped the hand-rolled cache-context / snapshot / commit template.
  • Runtime alignment only: EOA-only guards + per-handler readonly checks kept; no balance handler.

Tests

The payment package has no precompile tests. This migration is byte-for-byte the same transformation validated for bank/storage/storageprovider, and relies on the shared base runtime plus the full precompile package sweep (go test ./x/evm/precompiles/...). Flagging the lack of package-level coverage for reviewer awareness.

  • go build ./... → ok; golangci-lint → 0 issues.
  • Base branch is precompile-integration.

Move the payment precompile onto x/evm/precompiles/base, identical shape to
the storage/storageprovider migrations:
- embed base.Precompile; Run delegates to RunPrecompile; dispatch moves to
  Execute (existing handler map + base Dispatch/SetupABI, IsTransaction =
  !method.IsConstant())
- drop the hand-rolled cache-context / snapshot / commit template

Runtime alignment only: EOA-only guards and per-handler readonly checks are
kept; no balance handler wired. The package has no precompile tests; this
relies on the shared base runtime already validated by bank/storage/
storageprovider plus the full precompile package sweep.
@phenix3443 phenix3443 merged commit 3e1b574 into precompile-integration Jul 14, 2026
3 of 10 checks passed
@phenix3443 phenix3443 deleted the precompile/payment-native branch July 14, 2026 04:17
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.

1 participant