Class: ReadWriteMockErc4626
Hierarchy
-
ReadMockErc4626Mixin
&ReadWriteErc4626
<this
>↳
ReadWriteMockErc4626
Constructors
constructor
• new ReadWriteMockErc4626(options
): ReadWriteMockErc4626
Parameters
Name | Type |
---|---|
options | ReadWriteErc20Options |
Returns
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).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
readMockErc4626Mixin( ReadWriteErc4626, ).contract
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadWriteErc20.ts:15
contractFactory
• contractFactory: ReadWriteContractFactory
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).contractFactory
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadWriteErc20.ts:16
erc4626Contract
• erc4626Contract: 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 [] ; name
: "asset"
; outputs
: readonly [{ internalType
: "address"
; name
: "asset"
; type
: "address"
}] ; stateMutability
: "view"
; 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
: "shares"
; type
: "uint256"
}] ; name
: "convertToAssets"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; name
: "convertToShares"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "decimals"
; outputs
: readonly [{ internalType
: "uint8"
; name
: ""
; type
: "uint8"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}, { internalType
: "address"
; name
: "receiver"
; type
: "address"
}] ; name
: "deposit"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "owner"
; type
: "address"
}] ; name
: "maxDeposit"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "maxAssets"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "owner"
; type
: "address"
}] ; name
: "maxMint"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "maxShares"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "owner"
; type
: "address"
}] ; name
: "maxRedeem"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "maxShares"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "owner"
; type
: "address"
}] ; name
: "maxWithdraw"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "maxAssets"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}, { internalType
: "address"
; name
: "receiver"
; type
: "address"
}] ; name
: "mint"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [] ; name
: "name"
; outputs
: readonly [{ internalType
: "string"
; name
: ""
; type
: "string"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; name
: "previewDeposit"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "previewMint"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "previewRedeem"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; name
: "previewWithdraw"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}, { internalType
: "address"
; name
: "receiver"
; type
: "address"
}, { internalType
: "address"
; name
: "owner"
; type
: "address"
}] ; name
: "redeem"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [] ; name
: "symbol"
; outputs
: readonly [{ internalType
: "string"
; name
: ""
; type
: "string"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "totalAssets"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "totalAssets"
; type
: "uint256"
}] ; 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
: "uint256"
; name
: "assets"
; type
: "uint256"
}, { internalType
: "address"
; name
: "receiver"
; type
: "address"
}, { internalType
: "address"
; name
: "owner"
; type
: "address"
}] ; name
: "withdraw"
; outputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; 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
: "sender"
; type
: "address"
}, { indexed
: true
; internalType
: "address"
; name
: "receiver"
; type
: "address"
}, { indexed
: false
; internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}, { indexed
: false
; internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "Deposit"
; 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"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "address"
; name
: "sender"
; type
: "address"
}, { indexed
: true
; internalType
: "address"
; name
: "receiver"
; type
: "address"
}, { indexed
: false
; internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}, { indexed
: false
; internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "Withdraw"
; type
: "event"
}]>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).erc4626Contract
Defined in
packages/hyperdrive-js-core/src/token/erc4626/ReadWriteErc4626.ts:7
mockErc4626Contract
• mockErc4626Contract: CachedReadWriteContract
<readonly [{ inputs
: readonly [{ internalType
: "contract ERC20Mintable"
; name
: "_asset"
; type
: "address"
}, { internalType
: "string"
; name
: "_name"
; type
: "string"
}, { internalType
: "string"
; name
: "_symbol"
; type
: "string"
}, { internalType
: "uint256"
; name
: "_initialRate"
; type
: "uint256"
}, { internalType
: "address"
; name
: "_admin"
; type
: "address"
}, { internalType
: "bool"
; name
: "_isCompetitionMode"
; type
: "bool"
}, { internalType
: "uint256"
; name
: "_maxMintAmount"
; type
: "uint256"
}] ; stateMutability
: "nonpayable"
; type
: "constructor"
}, { inputs
: readonly [] ; name
: "DOMAIN_SEPARATOR"
; outputs
: readonly [{ internalType
: "bytes32"
; name
: ""
; type
: "bytes32"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: ""
; type
: "address"
}, { internalType
: "address"
; name
: ""
; 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 [] ; name
: "asset"
; outputs
: readonly [{ internalType
: "contract ERC20"
; name
: ""
; type
: "address"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "authority"
; outputs
: readonly [{ internalType
: "contract Authority"
; name
: ""
; type
: "address"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: ""
; type
: "address"
}] ; name
: "balanceOf"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "amount"
; type
: "uint256"
}] ; name
: "burn"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "destination"
; type
: "address"
}, { internalType
: "uint256"
; name
: "amount"
; type
: "uint256"
}] ; name
: "burn"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "user"
; type
: "address"
}, { internalType
: "address"
; name
: "target"
; type
: "address"
}, { internalType
: "bytes4"
; name
: "functionSig"
; type
: "bytes4"
}] ; name
: "canCall"
; outputs
: readonly [{ internalType
: "bool"
; name
: ""
; type
: "bool"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "convertToAssets"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; name
: "convertToShares"
; 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 [{ internalType
: "uint256"
; name
: "_assets"
; type
: "uint256"
}, { internalType
: "address"
; name
: "_receiver"
; type
: "address"
}] ; name
: "deposit"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint8"
; name
: "role"
; type
: "uint8"
}, { internalType
: "bytes4"
; name
: "functionSig"
; type
: "bytes4"
}] ; name
: "doesRoleHaveCapability"
; outputs
: readonly [{ internalType
: "bool"
; name
: ""
; type
: "bool"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "user"
; type
: "address"
}, { internalType
: "uint8"
; name
: "role"
; type
: "uint8"
}] ; name
: "doesUserHaveRole"
; outputs
: readonly [{ internalType
: "bool"
; name
: ""
; type
: "bool"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "getRate"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "bytes4"
; name
: ""
; type
: "bytes4"
}] ; name
: "getRolesWithCapability"
; outputs
: readonly [{ internalType
: "bytes32"
; name
: ""
; type
: "bytes32"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: ""
; type
: "address"
}] ; name
: "getTargetCustomAuthority"
; outputs
: readonly [{ internalType
: "contract Authority"
; name
: ""
; type
: "address"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: ""
; type
: "address"
}] ; name
: "getUserRoles"
; outputs
: readonly [{ internalType
: "bytes32"
; name
: ""
; type
: "bytes32"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "bytes4"
; name
: ""
; type
: "bytes4"
}] ; name
: "isCapabilityPublic"
; outputs
: readonly [{ internalType
: "bool"
; name
: ""
; type
: "bool"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "isCompetitionMode"
; outputs
: readonly [{ internalType
: "bool"
; name
: ""
; type
: "bool"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: ""
; type
: "address"
}] ; name
: "maxDeposit"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: ""
; type
: "address"
}] ; name
: "maxMint"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "maxMintAmount"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "owner"
; type
: "address"
}] ; name
: "maxRedeem"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "owner"
; type
: "address"
}] ; name
: "maxWithdraw"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "destination"
; type
: "address"
}, { internalType
: "uint256"
; name
: "amount"
; type
: "uint256"
}] ; name
: "mint"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "_shares"
; type
: "uint256"
}, { internalType
: "address"
; name
: "_receiver"
; type
: "address"
}] ; name
: "mint"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "amount"
; type
: "uint256"
}] ; 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 [{ internalType
: "address"
; name
: ""
; type
: "address"
}] ; name
: "nonces"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "owner"
; outputs
: readonly [{ internalType
: "address"
; name
: ""
; type
: "address"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "owner"
; type
: "address"
}, { internalType
: "address"
; name
: "spender"
; type
: "address"
}, { internalType
: "uint256"
; name
: "value"
; type
: "uint256"
}, { internalType
: "uint256"
; name
: "deadline"
; type
: "uint256"
}, { internalType
: "uint8"
; name
: "v"
; type
: "uint8"
}, { internalType
: "bytes32"
; name
: "r"
; type
: "bytes32"
}, { internalType
: "bytes32"
; name
: "s"
; type
: "bytes32"
}] ; name
: "permit"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; name
: "previewDeposit"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "previewMint"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "previewRedeem"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}] ; name
: "previewWithdraw"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "_shares"
; type
: "uint256"
}, { internalType
: "address"
; name
: "_receiver"
; type
: "address"
}, { internalType
: "address"
; name
: "_owner"
; type
: "address"
}] ; name
: "redeem"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "contract Authority"
; name
: "newAuthority"
; type
: "address"
}] ; name
: "setAuthority"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "bytes4"
; name
: "functionSig"
; type
: "bytes4"
}, { internalType
: "bool"
; name
: "enabled"
; type
: "bool"
}] ; name
: "setPublicCapability"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "_rate_"
; type
: "uint256"
}] ; name
: "setRate"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint8"
; name
: "role"
; type
: "uint8"
}, { internalType
: "bytes4"
; name
: "functionSig"
; type
: "bytes4"
}, { internalType
: "bool"
; name
: "enabled"
; type
: "bool"
}] ; name
: "setRoleCapability"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "target"
; type
: "address"
}, { internalType
: "contract Authority"
; name
: "customAuthority"
; type
: "address"
}] ; name
: "setTargetCustomAuthority"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "address"
; name
: "user"
; type
: "address"
}, { internalType
: "uint8"
; name
: "role"
; type
: "uint8"
}, { internalType
: "bool"
; name
: "enabled"
; type
: "bool"
}] ; name
: "setUserRole"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [] ; name
: "symbol"
; outputs
: readonly [{ internalType
: "string"
; name
: ""
; type
: "string"
}] ; stateMutability
: "view"
; type
: "function"
}, { inputs
: readonly [] ; name
: "totalAssets"
; outputs
: readonly [{ internalType
: "uint256"
; name
: ""
; type
: "uint256"
}] ; 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
: "newOwner"
; type
: "address"
}] ; name
: "transferOwnership"
; outputs
: readonly [] ; stateMutability
: "nonpayable"
; type
: "function"
}, { inputs
: readonly [{ internalType
: "uint256"
; name
: "_assets"
; type
: "uint256"
}, { internalType
: "address"
; name
: "_receiver"
; type
: "address"
}, { internalType
: "address"
; name
: "_owner"
; type
: "address"
}] ; name
: "withdraw"
; 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
: "amount"
; type
: "uint256"
}] ; name
: "Approval"
; type
: "event"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "address"
; name
: "user"
; type
: "address"
}, { indexed
: true
; internalType
: "contract Authority"
; name
: "newAuthority"
; type
: "address"
}] ; name
: "AuthorityUpdated"
; type
: "event"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "address"
; name
: "caller"
; type
: "address"
}, { indexed
: true
; internalType
: "address"
; name
: "owner"
; type
: "address"
}, { indexed
: false
; internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}, { indexed
: false
; internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "Deposit"
; type
: "event"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "address"
; name
: "user"
; type
: "address"
}, { indexed
: true
; internalType
: "address"
; name
: "newOwner"
; type
: "address"
}] ; name
: "OwnershipTransferred"
; type
: "event"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "bytes4"
; name
: "functionSig"
; type
: "bytes4"
}, { indexed
: false
; internalType
: "bool"
; name
: "enabled"
; type
: "bool"
}] ; name
: "PublicCapabilityUpdated"
; type
: "event"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "uint8"
; name
: "role"
; type
: "uint8"
}, { indexed
: true
; internalType
: "bytes4"
; name
: "functionSig"
; type
: "bytes4"
}, { indexed
: false
; internalType
: "bool"
; name
: "enabled"
; type
: "bool"
}] ; name
: "RoleCapabilityUpdated"
; type
: "event"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "address"
; name
: "target"
; type
: "address"
}, { indexed
: true
; internalType
: "contract Authority"
; name
: "authority"
; type
: "address"
}] ; name
: "TargetCustomAuthorityUpdated"
; 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
: "amount"
; type
: "uint256"
}] ; name
: "Transfer"
; type
: "event"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "address"
; name
: "user"
; type
: "address"
}, { indexed
: true
; internalType
: "uint8"
; name
: "role"
; type
: "uint8"
}, { indexed
: false
; internalType
: "bool"
; name
: "enabled"
; type
: "bool"
}] ; name
: "UserRoleUpdated"
; type
: "event"
}, { anonymous
: false
; inputs
: readonly [{ indexed
: true
; internalType
: "address"
; name
: "caller"
; type
: "address"
}, { indexed
: true
; internalType
: "address"
; name
: "receiver"
; type
: "address"
}, { indexed
: true
; internalType
: "address"
; name
: "owner"
; type
: "address"
}, { indexed
: false
; internalType
: "uint256"
; name
: "assets"
; type
: "uint256"
}, { indexed
: false
; internalType
: "uint256"
; name
: "shares"
; type
: "uint256"
}] ; name
: "Withdraw"
; type
: "event"
}]>
Overrides
readMockErc4626Mixin( ReadWriteErc4626, ).mockErc4626Contract
Defined in
packages/hyperdrive-js-core/src/token/erc4626/ReadWriteMockErc4626.ts:12
name
• name: string
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).name
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:27
network
• network: Network
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).network
Defined in
packages/hyperdrive-js-core/src/model/ReadModel.ts:28
Accessors
address
• get
address(): `0x${string}`
Returns
`0x${string}`
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).address
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:28
namespace
• get
namespace(): undefined
| string
Returns
undefined
| string
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).namespace
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:31
Methods
approve
▸ approve(«destructured»
): Promise
<`0x${string}`>
Parameters
Name | Type |
---|---|
«destructured» | Object |
› amount | bigint |
› options? | ContractWriteOptions |
› owner? | `0x${string}` |
› spender | `0x${string}` |
Returns
Promise
<`0x${string}`>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).approve
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadWriteErc20.ts:25
convertToAssets
▸ convertToAssets(«destructured»
): Promise
<bigint
>
Convert a shares amount to an assets amount.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› options? | ContractReadOptions |
› sharesAmount | bigint |
Returns
Promise
<bigint
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).convertToAssets
Defined in
packages/hyperdrive-js-core/src/token/erc4626/ReadErc4626.ts:22
convertToShares
▸ convertToShares(«destructured»
): Promise
<bigint
>
Convert an assets amount to a shares amount.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› assetsAmount | bigint |
› options? | ContractReadOptions |
Returns
Promise
<bigint
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).convertToShares
Defined in
packages/hyperdrive-js-core/src/token/erc4626/ReadErc4626.ts:33
getAllowance
▸ getAllowance(«destructured»
): Promise
<bigint
>
Parameters
Name | Type |
---|---|
«destructured» | Object |
› options? | ContractReadOptions |
› owner | `0x${string}` |
› spender | `0x${string}` |
Returns
Promise
<bigint
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).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
readMockErc4626Mixin( ReadWriteErc4626, ).getBalanceOf
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:59
getDecimals
▸ getDecimals(): Promise
<number
>
Returns
Promise
<number
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).getDecimals
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:43
getName
▸ getName(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).getName
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:35
getRate
▸ getRate(options?
): Promise
<bigint
>
Get the rate of the vault.
Parameters
Name | Type |
---|---|
options? | ContractReadOptions |
Returns
Promise
<bigint
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).getRate
Defined in
packages/hyperdrive-js-core/src/token/erc4626/ReadMockErc4626.ts:17
getSymbol
▸ getSymbol(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).getSymbol
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:39
getTotalAssets
▸ getTotalAssets(options?
): Promise
<bigint
>
Get the total supply of assets in the vault.
Parameters
Name | Type |
---|---|
options? | ContractReadOptions |
Returns
Promise
<bigint
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).getTotalAssets
Defined in
packages/hyperdrive-js-core/src/token/erc4626/ReadErc4626.ts:17
getTotalSupply
▸ getTotalSupply(options?
): Promise
<bigint
>
Get the total supply of the token.
Parameters
Name | Type |
---|---|
options? | ContractReadOptions |
Returns
Promise
<bigint
>
Inherited from
readMockErc4626Mixin( ReadWriteErc4626, ).getTotalSupply
Defined in
packages/hyperdrive-js-core/src/token/erc20/ReadErc20.ts:72
mint
▸ mint(«destructured»
): Promise
<`0x${string}`>
Mint shares.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› options? | ContractWriteOptions |
› receiver | `0x${string}` |
› sharesAmount | bigint |
Returns
Promise
<`0x${string}`>
Defined in
packages/hyperdrive-js-core/src/token/erc4626/ReadWriteMockErc4626.ts:17
setRate
▸ setRate(«destructured»
): Promise
<`0x${string}`>
Set the vault's rate.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› options? | ContractWriteOptions |
› rate | bigint |
Returns
Promise
<`0x${string}`>
Defined in
packages/hyperdrive-js-core/src/token/erc4626/ReadWriteMockErc4626.ts:39