Skip to main content

Class: ReadWriteREth

Hierarchy

Constructors

constructor

new ReadWriteREth(options): ReadWriteREth

Parameters

NameType
optionsReadWriteErc20Options

Returns

ReadWriteREth

Inherited from

readREthMixin(ReadWriteErc20).constructor

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadWriteErc20.ts:18

Properties

contract

contract: CachedReadWriteContract<readonly [{ inputs: readonly [{ internalType: "address" ; name: "owner" ; type: "address" }, { internalType: "address" ; name: "spender" ; type: "address" }] ; name: "allowance" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [{ internalType: "address" ; name: "spender" ; type: "address" }, { internalType: "uint256" ; name: "amount" ; type: "uint256" }] ; name: "approve" ; outputs: readonly [{ internalType: "bool" ; name: "" ; type: "bool" }] ; stateMutability: "nonpayable" ; type: "function" }, { inputs: readonly [{ internalType: "address" ; name: "account" ; type: "address" }] ; name: "balanceOf" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "decimals" ; outputs: readonly [{ internalType: "uint8" ; name: "" ; type: "uint8" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "name" ; outputs: readonly [{ internalType: "string" ; name: "" ; type: "string" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "symbol" ; outputs: readonly [{ internalType: "string" ; name: "" ; type: "string" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "totalSupply" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [{ internalType: "address" ; name: "to" ; type: "address" }, { internalType: "uint256" ; name: "amount" ; type: "uint256" }] ; name: "transfer" ; outputs: readonly [{ internalType: "bool" ; name: "" ; type: "bool" }] ; stateMutability: "nonpayable" ; type: "function" }, { inputs: readonly [{ internalType: "address" ; name: "from" ; type: "address" }, { internalType: "address" ; name: "to" ; type: "address" }, { internalType: "uint256" ; name: "amount" ; type: "uint256" }] ; name: "transferFrom" ; outputs: readonly [{ internalType: "bool" ; name: "" ; type: "bool" }] ; stateMutability: "nonpayable" ; type: "function" }, { anonymous: false ; inputs: readonly [{ indexed: true ; internalType: "address" ; name: "owner" ; type: "address" }, { indexed: true ; internalType: "address" ; name: "spender" ; type: "address" }, { indexed: false ; internalType: "uint256" ; name: "value" ; type: "uint256" }] ; name: "Approval" ; type: "event" }, { anonymous: false ; inputs: readonly [{ indexed: true ; internalType: "address" ; name: "from" ; type: "address" }, { indexed: true ; internalType: "address" ; name: "to" ; type: "address" }, { indexed: false ; internalType: "uint256" ; name: "value" ; type: "uint256" }] ; name: "Transfer" ; type: "event" }]>

Inherited from

readREthMixin(ReadWriteErc20).contract

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadWriteErc20.ts:15


contractFactory

contractFactory: ReadWriteContractFactory

Inherited from

readREthMixin(ReadWriteErc20).contractFactory

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadWriteErc20.ts:16


name

name: string

Inherited from

readREthMixin(ReadWriteErc20).name

Defined in

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


network

network: Network

Inherited from

readREthMixin(ReadWriteErc20).network

Defined in

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


rEthContract

rEthContract: CachedReadWriteContract<readonly [{ inputs: readonly [{ internalType: "address" ; name: "owner" ; type: "address" }, { internalType: "address" ; name: "spender" ; type: "address" }] ; name: "allowance" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [{ internalType: "address" ; name: "spender" ; type: "address" }, { internalType: "uint256" ; name: "amount" ; type: "uint256" }] ; name: "approve" ; outputs: readonly [{ internalType: "bool" ; name: "" ; type: "bool" }] ; stateMutability: "nonpayable" ; type: "function" }, { inputs: readonly [{ internalType: "address" ; name: "account" ; type: "address" }] ; name: "balanceOf" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [{ internalType: "uint256" ; name: "_rethAmount" ; type: "uint256" }] ; name: "burn" ; outputs: readonly [] ; stateMutability: "nonpayable" ; type: "function" }, { inputs: readonly [] ; name: "decimals" ; outputs: readonly [{ internalType: "uint8" ; name: "" ; type: "uint8" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "depositExcess" ; outputs: readonly [] ; stateMutability: "payable" ; type: "function" }, { inputs: readonly [] ; name: "depositExcessCollateral" ; outputs: readonly [] ; stateMutability: "nonpayable" ; type: "function" }, { inputs: readonly [] ; name: "getCollateralRate" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [{ internalType: "uint256" ; name: "_rethAmount" ; type: "uint256" }] ; name: "getEthValue" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "getExchangeRate" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [{ internalType: "uint256" ; name: "_ethAmount" ; type: "uint256" }] ; name: "getRethValue" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "getTotalCollateral" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [{ internalType: "uint256" ; name: "_ethAmount" ; type: "uint256" }, { internalType: "address" ; name: "_to" ; type: "address" }] ; name: "mint" ; outputs: readonly [] ; stateMutability: "nonpayable" ; type: "function" }, { inputs: readonly [] ; name: "name" ; outputs: readonly [{ internalType: "string" ; name: "" ; type: "string" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "symbol" ; outputs: readonly [{ internalType: "string" ; name: "" ; type: "string" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [] ; name: "totalSupply" ; outputs: readonly [{ internalType: "uint256" ; name: "" ; type: "uint256" }] ; stateMutability: "view" ; type: "function" }, { inputs: readonly [{ internalType: "address" ; name: "to" ; type: "address" }, { internalType: "uint256" ; name: "amount" ; type: "uint256" }] ; name: "transfer" ; outputs: readonly [{ internalType: "bool" ; name: "" ; type: "bool" }] ; stateMutability: "nonpayable" ; type: "function" }, { inputs: readonly [{ internalType: "address" ; name: "from" ; type: "address" }, { internalType: "address" ; name: "to" ; type: "address" }, { internalType: "uint256" ; name: "amount" ; type: "uint256" }] ; name: "transferFrom" ; outputs: readonly [{ internalType: "bool" ; name: "" ; type: "bool" }] ; stateMutability: "nonpayable" ; type: "function" }, { anonymous: false ; inputs: readonly [{ indexed: true ; internalType: "address" ; name: "owner" ; type: "address" }, { indexed: true ; internalType: "address" ; name: "spender" ; type: "address" }, { indexed: false ; internalType: "uint256" ; name: "value" ; type: "uint256" }] ; name: "Approval" ; type: "event" }, { anonymous: false ; inputs: readonly [{ indexed: true ; internalType: "address" ; name: "from" ; type: "address" }, { indexed: true ; internalType: "address" ; name: "to" ; type: "address" }, { indexed: false ; internalType: "uint256" ; name: "value" ; type: "uint256" }] ; name: "Transfer" ; type: "event" }]>

Overrides

readREthMixin(ReadWriteErc20).rEthContract

Defined in

packages/hyperdrive-js-core/src/token/reth/ReadWriteREth.ts:7

Accessors

address

get address(): `0x${string}`

Returns

`0x${string}`

Inherited from

readREthMixin(ReadWriteErc20).address

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:28


namespace

get namespace(): undefined | string

Returns

undefined | string

Inherited from

readREthMixin(ReadWriteErc20).namespace

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:31

Methods

approve

approve(«destructured»): Promise<`0x${string}`>

Parameters

NameType
«destructured»Object
› amountbigint
› options?ContractWriteOptions
› owner?`0x${string}`
› spender`0x${string}`

Returns

Promise<`0x${string}`>

Inherited from

readREthMixin(ReadWriteErc20).approve

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadWriteErc20.ts:25


getAllowance

getAllowance(«destructured»): Promise<bigint>

Parameters

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

Returns

Promise<bigint>

Inherited from

readREthMixin(ReadWriteErc20).getAllowance

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:47


getBalanceOf

getBalanceOf(«destructured»): Promise<bigint>

Parameters

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

Returns

Promise<bigint>

Inherited from

readREthMixin(ReadWriteErc20).getBalanceOf

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:59


getDecimals

getDecimals(): Promise<number>

Returns

Promise<number>

Inherited from

readREthMixin(ReadWriteErc20).getDecimals

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:43


getEthBalanceOf

getEthBalanceOf(«destructured»): Promise<bigint>

Get the underlying eth balance of an account.

Parameters

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

Returns

Promise<bigint>

Inherited from

readREthMixin(ReadWriteErc20).getEthBalanceOf

Defined in

packages/hyperdrive-js-core/src/token/reth/ReadREth.ts:22


getEthValue

getEthValue(«destructured»): Promise<bigint>

Get the amount of ETH backing an amount of rETH.

Parameters

NameType
«destructured»Object
› options?ContractReadOptions
› rEthAmountbigint

Returns

Promise<bigint>

Inherited from

readREthMixin(ReadWriteErc20).getEthValue

Defined in

packages/hyperdrive-js-core/src/token/reth/ReadREth.ts:33


getName

getName(): Promise<string>

Returns

Promise<string>

Inherited from

readREthMixin(ReadWriteErc20).getName

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:35


getREthValue

getREthValue(«destructured»): Promise<bigint>

Get the amount of rETH backing an amount of ETH.

Parameters

NameType
«destructured»Object
› ethAmountbigint
› options?ContractReadOptions

Returns

Promise<bigint>

Inherited from

readREthMixin(ReadWriteErc20).getREthValue

Defined in

packages/hyperdrive-js-core/src/token/reth/ReadREth.ts:44


getSymbol

getSymbol(): Promise<string>

Returns

Promise<string>

Inherited from

readREthMixin(ReadWriteErc20).getSymbol

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:39


getTotalEthSupply

getTotalEthSupply(options?): Promise<bigint>

Get the total supply of underlying eth in the rETH contract.

Parameters

NameType
options?ContractReadOptions

Returns

Promise<bigint>

Inherited from

readREthMixin(ReadWriteErc20).getTotalEthSupply

Defined in

packages/hyperdrive-js-core/src/token/reth/ReadREth.ts:17


getTotalSupply

getTotalSupply(options?): Promise<bigint>

Get the total supply of the token.

Parameters

NameType
options?ContractReadOptions

Returns

Promise<bigint>

Inherited from

readREthMixin(ReadWriteErc20).getTotalSupply

Defined in

packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:72