@alexangelj/web3-units

Simple utility package extending ethers.js for better Web3 units

Usage no npm install needed!

<script type="module">
  import alexangeljWeb3Units from 'https://cdn.skypack.dev/@alexangelj/web3-units';
</script>

README

Simple Web3 Units

This packagage includes several classes which extend ethers.js with clearer ways to convert between unit types. Not sure which to use for values from smart contract calls? BigNumbers? BigNumberishes? Strings? Numbers? BNs? Simple, just use the Wei class. Which has properties to easily convert to any of those types!