Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add three converters to ape-ethereum plugin #2561

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xthedance
Copy link
Contributor

What I did

This PR adds three new converters to handle ethereum units:

  1. WeiIntStrConversions : Converts an integer value (in wei) to a string representation (e.g. 1e18 to "1 ether").
  2. EthDecimalStrConversions : Converts a Decimal value ( in ether ) to a string representation.
  3. WeiIntEthDecimalConversions: Converts an integer value (in wei) to a Decimal representation in ether.

String conversions select the most appropriate Ethereum unit ( "ether", "gwei", or "wei") based on the value.

  • [ x] All changes are completed
  • [x ] Change is covered in tests
  • Documentation is complete

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