Class: ReadStEth
Hierarchy
-
ReadStEthMixin
&ReadErc20
<this
>↳
ReadStEth
Constructors
constructor
• new ReadStEth(«destructured»
): ReadStEth
Parameters
Name | Type |
---|---|
«destructured» | ReadErc20Options |
Returns
Inherited from
readStEthMixin(ReadErc20).constructor
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:11
Properties
contract
• contract: CachedReadContract
<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
readStEthMixin(ReadErc20).contract
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:9
contractFactory
• contractFactory: ReadContractFactory
Inherited from
readStEthMixin(ReadErc20).contractFactory
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:29
name
• name: string
Inherited from
readStEthMixin(ReadErc20).name
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:27
network
• network: Network
Inherited from
readStEthMixin(ReadErc20).network
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:28
stEthContract
• stEthContract: CachedReadContract
<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
: "getBufferedEther"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "_sharesAmount"
; type
: "uint256"
}] ; name
: "getPooledEthByShares"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "_ethAmount"
; type
: "uint256"
}] ; name
: "getSharesByPooledEth"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "getTotalPooledEther"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "getTotalShares"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "name"
; outputs
: readonly [{ internalType
: "string"
; name
: ""
; type
: "string"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "_account"
; type
: "address"
}] ; name
: "sharesOf"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "_referral"
; type
: "address"
}] ; name
: "submit"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "payable"
; 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"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "_recipient"
; type
: "address"
}, { internalType
: "uint256"
; name
: "_sharesAmount"
; type
: "uint256"
}] ; name
: "transferShares"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "_sender"
; type
: "address"
}, { internalType
: "address"
; name
: "_recipient"
; type
: "address"
}, { internalType
: "uint256"
; name
: "_sharesAmount"
; type
: "uint256"
}] ; name
: "transferSharesFrom"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; 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
readStEthMixin(ReadErc20).stEthContract
Defined in
packages/hyperdrive-js-core/src/token/steth/ReadStEth.ts:12
Accessors
address
• get
address(): `0x${string}`
Returns
`0x${string}`
Inherited from
readStEthMixin(ReadErc20).address
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:28
namespace
• get
namespace(): undefined
| string
Returns
undefined
| string
Inherited from
readStEthMixin(ReadErc20).namespace
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:31
Methods
getAllowance
▸ getAllowance(«destructured»
): Promise
<bigint
>
Parameters
Name | Type |
---|---|
«destructured» | Object |
› options? | ContractReadOptions |
› owner | `0x${string}` |
› spender | `0x${string}` |
Returns
Promise
<bigint
>
Inherited from
readStEthMixin(ReadErc20).getAllowance
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:47
getBalanceOf
▸ getBalanceOf(«destructured»
): Promise
<bigint
>
Parameters
Name | Type |
---|---|
«destructured» | Object |
› account | `0x${string}` |
› options? | ContractReadOptions |
Returns
Promise
<bigint
>
Inherited from
readStEthMixin(ReadErc20).getBalanceOf
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:59
getDecimals
▸ getDecimals(): Promise
<number
>
Returns
Promise
<number
>
Inherited from
readStEthMixin(ReadErc20).getDecimals
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:43
getName
▸ getName(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
readStEthMixin(ReadErc20).getName
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:35
getPooledEthByShares
▸ getPooledEthByShares(«destructured»
): Promise
<bigint
>
Get the amount of pooled ETH (stETH) that would be received for a given number of shares.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› options? | ContractReadOptions |
› sharesAmount | bigint |
Returns
Promise
<bigint
>
Inherited from
readStEthMixin(ReadErc20).getPooledEthByShares
Defined in
packages/hyperdrive-js-core/src/token/steth/ReadStEth.ts:29
getSharesByPooledEth
▸ getSharesByPooledEth(«destructured»
): Promise
<bigint
>
Get the number of shares that would be received for a given amount of pooled ETH (stETH).
Parameters
Name | Type |
---|---|
«destructured» | Object |
› ethAmount | bigint |
› options? | ContractReadOptions |
Returns
Promise
<bigint
>
Inherited from
readStEthMixin(ReadErc20).getSharesByPooledEth
Defined in
packages/hyperdrive-js-core/src/token/steth/ReadStEth.ts:41
getSharesOf
▸ getSharesOf(«destructured»
): Promise
<bigint
>
Get the number of stETH shares held by an account.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› account | `0x${string}` |
› options? | ContractReadOptions |
Returns
Promise
<bigint
>
Inherited from
readStEthMixin(ReadErc20).getSharesOf
Defined in
packages/hyperdrive-js-core/src/token/steth/ReadStEth.ts:17
getSymbol
▸ getSymbol(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
readStEthMixin(ReadErc20).getSymbol
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:39
getTotalSupply
▸ getTotalSupply(options?
): Promise
<bigint
>
Get the total supply of the token.
Parameters
Name | Type |
---|---|
options? | ContractReadOptions |
Returns
Promise
<bigint
>
Inherited from
readStEthMixin(ReadErc20).getTotalSupply
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:72