NativeCurrency
@uniswap/sdk-core / Exports / NativeCurrency
Class: NativeCurrency
Represents the native currency of the chain on which it resides, e.g.
Hierarchy
BaseCurrency↳
NativeCurrency↳↳
Ether
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• Protected new NativeCurrency(chainId, decimals, symbol?, name?)
Constructs an instance of the base class BaseCurrency.
Parameters
| Name | Type | Description |
|---|---|---|
chainId | number | the chain ID on which this currency resides |
decimals | number | decimals of the currency |
symbol? | string | symbol of the currency |
name? | string | of the currency |
Inherited from
BaseCurrency.constructor
Defined in
Properties
chainId
• Readonly chainId: number
The chain ID on which this currency resides
Inherited from
BaseCurrency.chainId
Defined in
decimals
• Readonly decimals: number
The decimals used in representing currency amounts
Inherited from
BaseCurrency.decimals
Defined in
isNative
• Readonly isNative: true
Overrides
BaseCurrency.isNative
Defined in
isToken
• Readonly isToken: false
Overrides
BaseCurrency.isToken
Defined in
name
• Optional Readonly name: string
The name of the currency, i.e. a descriptive textual non-unique identifier
Inherited from
BaseCurrency.name
Defined in
symbol
• Optional Readonly symbol: string
The symbol of the currency, i.e. a short textual non-unique identifier
Inherited from
BaseCurrency.symbol
Defined in
Accessors
wrapped
• Abstract 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
Inherited from
BaseCurrency.wrapped
Defined in
Methods
equals
▸ Abstract equals(other): boolean
Returns whether this currency is functionally equivalent to the other currency
Parameters
| Name | Type | Description |
|---|---|---|
other | Currency | the other currency |
Returns
boolean
Inherited from
BaseCurrency.equals