ethers.js/docs.wrm/api/utils/constants.wrm
2020-05-08 03:24:40 -04:00

51 lines
1.6 KiB
Plaintext

_section: Constants @<constants>
The **ethers.contants** Object contains commonly used values.
_heading: Importing
_code: @lang<script>
const { constants } = require("ethers");
const { constants } = require("@ethersproject/constants");
_subsection: Bytes
_property: ethers.constants.AddressZero => string<[Address](address)> @<constants-AddressZero> @SRC<constants>
The Address Zero, which is 20 bytes (40 nibbles) of zero.
_property: ethers.constants.HashZero => string<[[DataHexString]]<32>> @<constants-HashZero> @SRC<constants>
The Hash Zero, which is 32 bytes (64 nibbles) of zero.
_subsection: Strings
_property: ethers.constants.EtherSymbol => string @<constants-EtherSymbol> @SRC<constants>
The Ether symbol, **&Xi;**.
_subsection: BigNumber
_property: ethers.constants.NegativeOne => [[BigNumber]] @<constants-NegativeOne> @SRC<constants>
The BigNumber value representing ``"-1"``.
_property: ethers.constants.Zero => [[BigNumber]] @<constants-Zero> @SRC<constants>
The BigNumber value representing ``"0"``.
_property: ethers.constants.One => [[BigNumber]] @<constants-One> @SRC<constants>
The BigNumber value representing ``"1"``.
_property: ethers.constants.Two => [[BigNumber]] @<constants-Two> @SRC<constants>
The BigNumber value representing ``"2"``.
_property: ethers.constants.WeiPerEther => [[BigNumber]] @<constants-WeiPerEther> @SRC<constants>
The BigNumber value representing ``"1000000000000000000"``, which is the
number of Wei per Ether.
_property: ethers.constants.MaxUint256 => [[BigNumber]] @<constants-MaxUint256> @SRC<constants>
The BigNumber value representing the maximum ``uint256`` value.