Ether
@pegasys-fi/sdk-core / Exports / Ether
Class: Ether
Ether is the main usage of a 'native' currency, i.e. for Ethereum mainnet and all testnets
Hierarchy
↳
Ether
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• Protected
new Ether(chainId
)
Parameters
Name | Type |
---|---|
chainId | number |
Overrides
Defined in
Properties
chainId
• Readonly
chainId: number
The chain ID on which this currency resides
Inherited from
Defined in
decimals
• Readonly
decimals: number
The decimals used in representing currency amounts
Inherited from
Defined in
isNative
• Readonly
isNative: true
Inherited from
Defined in
isToken
• Readonly
isToken: false
Inherited from
Defined in
name
• Optional
Readonly
name: string
The name of the currency, i.e. a descriptive textual non-unique identifier
Inherited from
Defined in
symbol
• Optional
Readonly
symbol: string
The symbol of the currency, i.e. a short textual non-unique identifier
Inherited from
Defined in
_etherCache
▪ Static
Private
_etherCache: Object
= {}
Index signature
▪ [chainId: number
]: Ether
Defined in
Accessors
wrapped
• get
wrapped(): Token
Return the wrapped version of this currency that can be used with the Pegasys contracts. Currencies must implement this to be used in Pegasys
Returns
Overrides
NativeCurrency.wrapped
Defined in
Methods
equals
▸ 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
Overrides
Defined in
onChain
▸ Static
onChain(chainId
): Ether
Parameters
Name | Type |
---|---|
chainId | number |