Class: ReadEth
A base class for read-only models.
Hierarchy
-
↳
ReadEth
↳↳
ReadWriteEth
Implements
Constructors
constructor
• new ReadEth(«destructured»
): ReadEth
Parameters
Name | Type |
---|---|
«destructured» | ReadEthOptions |
Returns
Overrides
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:11
Properties
address
• address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
Implementation of
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:9
contractFactory
• contractFactory: ReadContractFactory
Implementation of
Inherited from
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:29
name
• name: string
Implementation of
Inherited from
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:27
network
• network: Network
Implementation of
Inherited from
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
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
Name | Type |
---|---|
«destructured» | Object |
› account | `0x${string}` |
› options? | ContractReadOptions |
Returns
Promise
<bigint
>
Implementation of
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
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
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
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:19