Skip to main content

Class: ReadEth

A base class for read-only models.

Hierarchy

Implements

Constructors

constructor

new ReadEth(«destructured»): ReadEth

Parameters

NameType
«destructured»ReadEthOptions

Returns

ReadEth

Overrides

ReadModel.constructor

Defined in

packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:11

Properties

address

address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"

Implementation of

ReadToken.address

Defined in

packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:9


contractFactory

contractFactory: ReadContractFactory

Implementation of

ReadToken.contractFactory

Inherited from

ReadModel.contractFactory

Defined in

packages/hyperdrive-js-core/src/model/ReadModel.ts:29


name

name: string

Implementation of

ReadToken.name

Inherited from

ReadModel.name

Defined in

packages/hyperdrive-js-core/src/model/ReadModel.ts:27


network

network: Network

Implementation of

ReadToken.network

Inherited from

ReadModel.network

Defined in

packages/hyperdrive-js-core/src/model/ReadModel.ts:28


address

Static address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"

Defined in

packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:8

Methods

getAllowance

getAllowance(): Promise<bigint>

Returns

Promise<bigint>

Remarks

Native ETH does not require allowances as it is sent directly as the message value when used in Hyperdrive. This method returns a maximum value to indicate the absence of an allowance mechanism for ETH.

Implementation of

ReadToken.getAllowance

Defined in

packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:33


getBalanceOf

getBalanceOf(«destructured»): Promise<bigint>

Get the token balance of a given address

Parameters

NameType
«destructured»Object
› account`0x${string}`
› options?ContractReadOptions

Returns

Promise<bigint>

Implementation of

ReadToken.getBalanceOf

Defined in

packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:38


getDecimals

getDecimals(): Promise<number>

Get the number of decimal places this token uses.

Returns

Promise<number>

Implementation of

ReadToken.getDecimals

Defined in

packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:23


getName

getName(): Promise<string>

Get the name of this token

Returns

Promise<string>

Implementation of

ReadToken.getName

Defined in

packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:15


getSymbol

getSymbol(): Promise<string>

Get the symbol for this token.

Returns

Promise<string>

Implementation of

ReadToken.getSymbol

Defined in

packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:19