Remove parseEther, parseGwei, parseWei #126
Unanswered
greenlucid
asked this question in
Idea / Feature Request
Replies: 1 comment 1 reply
-
I agree with
But
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since this library appears to strive for minimalism, wouldn't it make sense to unify these methods onto
parseUnits
instead?the respective section in the docs would go from:
to:
Rationale
When reading at a method name such as
parseEther
, I find myself asking question such as:Whereas, if I see something like
parseUnits('1', 18)
I can immediately tell this means:I'm not sure if this is the answer, but, does anyone else think this is more readable, or would this suck in practice?
Pet peeve on units
I don't love
ether
,gwei
,wei
as units. We're used to them at this point, but they're not very aptly named.Ether
unit will often come in the context of counting another ERC20, and that can confuse anyone.Beta Was this translation helpful? Give feedback.
All reactions