Skip to main content
Helpful?

Ether

@uniswap/sdk-core / Exports / Ether

Class: Ether

Ether is the main usage of a 'native' currency, i.e. for Ethereum mainnet and all testnets

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

Protected new Ether(chainId)

Parameters

NameType
chainIdnumber

Overrides

NativeCurrency.constructor

Defined in

entities/ether.ts:11

Properties

chainId

Readonly chainId: number

The chain ID on which this currency resides

Inherited from

NativeCurrency.chainId

Defined in

entities/baseCurrency.ts:21


decimals

Readonly decimals: number

The decimals used in representing currency amounts

Inherited from

NativeCurrency.decimals

Defined in

entities/baseCurrency.ts:25


isNative

Readonly isNative: true

Inherited from

NativeCurrency.isNative

Defined in

entities/nativeCurrency.ts:7


isToken

Readonly isToken: false

Inherited from

NativeCurrency.isToken

Defined in

entities/nativeCurrency.ts:8


name

Optional Readonly name: string

The name of the currency, i.e. a descriptive textual non-unique identifier

Inherited from

NativeCurrency.name

Defined in

entities/baseCurrency.ts:33


symbol

Optional Readonly symbol: string

The symbol of the currency, i.e. a short textual non-unique identifier

Inherited from

NativeCurrency.symbol

Defined in

entities/baseCurrency.ts:29


_etherCache

Static Private _etherCache: Object = {}

Index signature

[chainId: number]: Ether

Defined in

entities/ether.ts:21

Accessors

wrapped

get wrapped(): Token

Return the wrapped version of this currency that can be used with the Uniswap contracts. Currencies must implement this to be used in Uniswap

Returns

Token

Overrides

NativeCurrency.wrapped

Defined in

entities/ether.ts:15

Methods

equals

equals(other): boolean

Returns whether this currency is functionally equivalent to the other currency

Parameters

NameTypeDescription
otherCurrencythe other currency

Returns

boolean

Overrides

NativeCurrency.equals

Defined in

entities/ether.ts:27


onChain

Static onChain(chainId): Ether

Parameters

NameType
chainIdnumber

Returns

Ether

Defined in

entities/ether.ts:23

Helpful?