Skip to content

Extend EvmAddress::FromStr to accept addresses without 0x prefix #1220

@venilinvasilev

Description

@venilinvasilev

Description

Enhance EvmAddress::from_str to support parsing EVM address string
representations both with and without the 0x prefix.

Motivation

Many tools and user inputs provide hexadecimal addresses without the
0x prefix. Supporting both formats improves developer ergonomics and
ensures better compatibility across ecosystems.

Proposed Behavior

  • Accept hexadecimal address strings with 0x prefix
  • Accept hexadecimal address strings without 0x prefix
  • Normalize input prior to validation and decoding

Acceptance Criteria

  • Parsing succeeds for valid prefixed and non-prefixed inputs
  • Existing prefixed behavior remains unchanged
  • Unit tests cover both formats

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions