Skip to content

Conversation

@jmg-duarte
Copy link
Contributor

Description

Unifies ethereum units under one API

Changes

  • Removes to_wei, to_wei_with_exp, eth and the Unit::X approaches
  • Replaces the above with one single API to rule them all

How to test

Existing tests

@jmg-duarte jmg-duarte requested a review from a team as a code owner December 11, 2025 15:09
Copy link
Contributor

@m-sz m-sz left a comment

Choose a reason for hiding this comment

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

Small nits, otherwise it looks good!
I like how the extension trait makes the amounts read naturally: 1 ETH, 1 WEI, etc.

@jmg-duarte jmg-duarte changed the title Unify eth monetary units [TRIVIAL] Unify eth monetary units Dec 11, 2025
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Didn't spot any wrong number conversions.
No strong preference on the USDC comment so I'm fine with merging without resolving that.

@jmg-duarte jmg-duarte enabled auto-merge December 12, 2025 09:55
@jmg-duarte jmg-duarte added this pull request to the merge queue Dec 12, 2025
Merged via the queue into main with commit cb85d72 Dec 12, 2025
18 checks passed
@jmg-duarte jmg-duarte deleted the jmgd/alloy/eth_trait branch December 12, 2025 10:14
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants