2019-08-21 08:53:47 +03:00
|
|
|
_section: Constants @<constants>
|
|
|
|
|
|
|
|
The **ethers.contants** Object contains commonly used values.
|
|
|
|
|
|
|
|
_heading: Importing
|
|
|
|
|
2020-04-19 09:18:20 +03:00
|
|
|
_code: @lang<script>
|
|
|
|
|
|
|
|
const { constants } = require("ethers");
|
|
|
|
const { constants } = require("@ethersproject/constants");
|
2019-08-21 08:53:47 +03:00
|
|
|
|
|
|
|
|
|
|
|
_subsection: Bytes
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.AddressZero => string<[Address](address)> @<constants-addresszero> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The Address Zero, which is 20 bytes (40 nibbles) of zero.
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.HashZero => string<[[datahexstring]]<32>> @<constants-hashzero> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The Hash Zero, which is 32 bytes (64 nibbles) of zero.
|
|
|
|
|
|
|
|
|
|
|
|
_subsection: Strings
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.EtherSymbol => string @<constants-ethersymbol> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The Ether symbol, **Ξ**.
|
|
|
|
|
|
|
|
|
|
|
|
_subsection: BigNumber
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.NegativeOne => [[bignumber]] @<constants-negativeone> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The BigNumber value representing ``"-1"``.
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.Zero => [[bignumber]] @<constants-zero> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The BigNumber value representing ``"0"``.
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.One => [[bignumber]] @<constants-one> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The BigNumber value representing ``"1"``.
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.Two => [[bignumber]] @<constants-two> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The BigNumber value representing ``"2"``.
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.WeiPerEther => [[bignumber]] @<constants-weiperether> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The BigNumber value representing ``"1000000000000000000"``, which is the
|
|
|
|
number of Wei per Ether.
|
|
|
|
|
2020-02-18 01:56:13 +03:00
|
|
|
_property: ethers.constants.MaxUint256 => [[bignumber]] @<constants-maxuint256> @SRC<constants>
|
2019-08-21 08:53:47 +03:00
|
|
|
The BigNumber value representing the maximum ``uint256`` value.
|
|
|
|
|
|
|
|
|
|
|
|
|