How to use the @ethersproject/constants.AddressZero function in @ethersproject/constants

To help you get started, we’ve selected a few @ethersproject/constants examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethers-io / ethers.js / packages / providers / lib / formatter.js View on Github external
Formatter.prototype.callAddress = function (value) {
        if (!bytes_1.isHexString(value, 32)) {
            return null;
        }
        var address = address_1.getAddress(bytes_1.hexDataSlice(value, 12));
        return (address === constants_1.AddressZero) ? null : address;
    };
    Formatter.prototype.contractAddress = function (value) {

@ethersproject/constants

Common Ethereum constants used for ethers.

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis