[go: up one dir, main page]

EVM Node: Output EIP-55-compatible addresses

Part of L2-211

What

This change updates the address_to_string function to return addresses with a mixed-case checksum, following the EIP-55 standard.

Why

EIP-55 has been introduced to prevent errors from mistyped addresses. It provides a checksum mechanism that helps verify the integrity of an address, reducing the risk of sending funds to an incorrect recipient due to a typo.

How

The address_to_string function was reimplemented. It now calculates the Keccak-256 hash of the address. Based on this hash, it selectively capitalizes the alphabetic characters of the address string to create the checksum, and prefixes the result with "0x".

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Thomas Letan

Merge request reports

Loading