How to detect empty address that has initial value of 0x0000000000000000000000000000000000000000
in web3.js?
What I'm doing now is:
if (address !== '0x0000000000000000000000000000000000000000') {
...
}
Is there any simpler way to filter out empty addresses or a helper method in web3 that can create this value(like address(0)
in Solidity)? It's quite bothering to count(or type) exact number of all that 0
s.
web3.toBigNumber(address).isZero()
? β Natelson