Interface: ReadWriteToken
A base class for read-only models.
Hierarchy
-
↳
ReadWriteToken
Implemented by
Properties
address
• address: `0x${string}`
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/ReadToken.ts:5
contractFactory
• contractFactory: ReadWriteContractFactory
Overrides
ReadWriteModel.contractFactory
Defined in
packages/hyperdrive-js-core/src/token/ReadWriteToken.ts:7
name
• name: string
Inherited from
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:27
network
• network: Network
Inherited from
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:28
Methods
approve
▸ approve(«destructured»
): Promise
<`0x${string}`>
Give a spending allowance to a given spender.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› amount | bigint |
› options? | ContractWriteOptions |
› owner? | `0x${string}` |
› spender | `0x${string}` |
Returns
Promise
<`0x${string}`>
The transaction hash.
Defined in
packages/hyperdrive-js-core/src/token/ReadWriteToken.ts:15
getAllowance
▸ getAllowance(«destructured»
): Promise
<bigint
>
Get the spending allowance of a given spender for a given owner of this token.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› options? | ContractReadOptions |
› owner | `0x${string}` |
› spender | `0x${string}` |
Returns
Promise
<bigint
>
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/ReadToken.ts:26
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
>
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/ReadToken.ts:39
getDecimals
▸ getDecimals(): Promise
<number
>
Get the number of decimal places this token uses.
Returns
Promise
<number
>
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/ReadToken.ts:20
getName
▸ getName(): Promise
<string
>
Get the name of this token
Returns
Promise
<string
>
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/ReadToken.ts:10
getSymbol
▸ getSymbol(): Promise
<string
>
Get the symbol for this token.
Returns
Promise
<string
>
Inherited from
Defined in
packages/hyperdrive-js-core/src/token/ReadToken.ts:15