ethers.js/docs.wrm/api/utils/constants.wrm

51 lines
1.6 KiB
Plaintext
Raw Normal View History

_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
2020-02-18 01:56:13 +03:00
_property: ethers.constants.AddressZero => string<[Address](address)> @<constants-addresszero> @SRC<constants>
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>
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>
The Ether symbol, **&Xi;**.
_subsection: BigNumber
2020-02-18 01:56:13 +03:00
_property: ethers.constants.NegativeOne => [[bignumber]] @<constants-negativeone> @SRC<constants>
The BigNumber value representing ``"-1"``.
2020-02-18 01:56:13 +03:00
_property: ethers.constants.Zero => [[bignumber]] @<constants-zero> @SRC<constants>
The BigNumber value representing ``"0"``.
2020-02-18 01:56:13 +03:00
_property: ethers.constants.One => [[bignumber]] @<constants-one> @SRC<constants>
The BigNumber value representing ``"1"``.
2020-02-18 01:56:13 +03:00
_property: ethers.constants.Two => [[bignumber]] @<constants-two> @SRC<constants>
The BigNumber value representing ``"2"``.
2020-02-18 01:56:13 +03:00
_property: ethers.constants.WeiPerEther => [[bignumber]] @<constants-weiperether> @SRC<constants>
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>
The BigNumber value representing the maximum ``uint256`` value.