simolus3 / web3dart

Ethereum library, written in Dart.
MIT License
441 stars 270 forks source link

精度没有适配“8”位,希望可以加上! #200

Closed szxv587 closed 2 years ago

szxv587 commented 2 years ago

image

szxv587 commented 2 years ago

image

simolus3 commented 2 years ago

Google translate says that you want an EtherUnit representing 10⁸ wei? In general we follow the idea of providing known units for every three orders of magnitudes. So I'd just use mwei and then multiply by 100.

Also, the decimals from an ERC20 contract are entirely unrelated to this. You'd have to handle those manually.