ERC4626DepositTicket
Documentation for eth_defi.erc_4626.deposit_redeem.ERC4626DepositTicket Python class.
- class ERC4626DepositTicket
Bases:
eth_defi.vault.deposit_redeem.DepositRequestSynchronous deposit request for ERC-4626 vaults.
No-op as requests are synchronous
Attributes summary
vaultVault we are dealing with
ownerOwner of the shares
toReceiver of underlying asset
amountHuman-readable shares
raw_amountRaw amount of shares
funcsTransactions we need to perform in order to open a redemption
gasSet transaction gas limit
valueAttached ETH value to the tx
web3Methods summary
__init__(vault, owner, to, amount, ...[, ...])broadcast([from_, gas, check_value])Broadcast all the transactions in this request.
parse_deposit_transaction(tx_hashes)Parse the transaction receipt to get the actual shares redeemed.
- __init__(vault, owner, to, amount, raw_amount, funcs, gas=None, value=None)
- Parameters
vault (VaultBase) –
owner (eth_typing.evm.HexAddress) –
to (eth_typing.evm.HexAddress) –
amount (decimal.Decimal) –
raw_amount (int) –
funcs (list[web3.contract.contract.ContractFunction]) –
gas (int | None) –
value (decimal.Decimal | None) –
- Return type
None
- broadcast(from_=None, gas=None, check_value=True)
Broadcast all the transactions in this request.
- Parameters
from – Address to send the transactions from
gas (int | None) – Gas limit to use for each transaction
from_ (eth_typing.evm.HexAddress) –
- Returns
List of transaction hashes
- Raises
TransactionAssertionError – If any of the transactions revert
- Return type
- parse_deposit_transaction(tx_hashes)
Parse the transaction receipt to get the actual shares redeemed.
Assumes only one redemption request per vault per transaction
Most throw an
- Raises
CannotParseRedemptionTransaction – If we did not know how to parse the transaction
VaultTransactionFailed – One of transactions reverted
- Parameters
tx_hashes (list[hexbytes.main.HexBytes]) –
- Return type