Class: ReadWriteEth
A base class for read-only models.
Hierarchy
-
↳
ReadWriteEth
Implements
Constructors
constructor
• new ReadWriteEth(options
): ReadWriteEth
Parameters
Name | Type |
---|---|
options | ReadWriteEthOptions |
Returns
Overrides
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadWriteEth.ts:12
Properties
address
• address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
Implementation of
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:9
contractFactory
• contractFactory: ReadWriteContractFactory
Implementation of
ReadWriteToken.contractFactory
Overrides
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadWriteEth.ts:10
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"
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:8
Methods
approve
▸ approve(): Promise
<`0x${string}`>
This method is not available for the native ETH token.
Returns
Promise
<`0x${string}`>
Throws
A MethodNotImplementedError
Implementation of
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadWriteEth.ts:20
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
Inherited from
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
Inherited from
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
Inherited from
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
Inherited from
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
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/eth/ReadEth.ts:19