How to Convert BigNumber to Int/Number in Ethers/Web3

If you have a BigNumber when using web3, then you can convert this to a regular Javascript Number using the ethers library as follows: ethers.BigNumber.from(max).toNumber() <a href="" target="_blank" rel="noreferrer noopener nofollow">Ethers</a> is a complete Ethereum library and wallet implementation in Javascript.

May 7, 2022 · 1 min · 41 words · Andrew