Skip to content

Latest commit

 

History

History
67 lines (36 loc) · 1.68 KB

globals.md

File metadata and controls

67 lines (36 loc) · 1.68 KB

ERC-20 TokenGlobals

ERC-20 Token

Index

Classes

Variables

Functions

Variables

Const ETHEREUM_ADDRESS_REGEX

ETHEREUM_ADDRESS_REGEX: RegExp = /^0x[a-f0-9]{40}$/

Defined in utils.ts:12

Matches Ethereum addresses (non-checksummed, all lowercase).


Const ETHEREUM_ADDRESS_REGEX_CHECKSUMMED

ETHEREUM_ADDRESS_REGEX_CHECKSUMMED: RegExp = /^0x[a-fA-F0-9]{40}$/

Defined in utils.ts:17

Matches all Ethereum addresses (checksummed, capital, or lowercase).


Const MAX_ALLOWANCE

MAX_ALLOWANCE: BigNumber = new BigNumber(2).exponentiatedBy(256).minus(1)

Defined in utils.ts:7

Represents the maximum ERC-20 approval (maximum 256-bit unsigned integer).

Functions

normalizeAddress

normalizeAddress(address: string): string

Defined in utils.ts:24

Validate address (checksummed or not) and return un-checksummed lowercase.

Parameters:

Name Type Description
address string A 20-byte address as a hex-encoded string.

Returns: string