ERC4626RedemptionRequest
Documentation for eth_defi.erc_4626.deposit_redeem.ERC4626RedemptionRequest Python class.
- class ERC4626RedemptionRequest
Bases:
eth_defi.vault.deposit_redeem.RedemptionRequestSynchronous deposit request for ERC-4626 vaults.
Attributes summary
vaultVault we are dealing with
ownerOwner of the shares
toReceiver of underlying asset
sharesHuman-readable shares
raw_sharesRaw amount of shares
funcsTransactions we need to perform in order to open a redemption
web3Methods summary
__init__(vault, owner, to, shares, ...)broadcast([from_, gas])Broadcast all the transactions in this request.
parse_redeem_transaction(tx_hashes)Parse the transaction receipt to get the actual shares redeemed.
- __init__(vault, owner, to, shares, raw_shares, funcs)
- Parameters
vault (VaultBase) –
owner (eth_typing.evm.HexAddress) –
to (eth_typing.evm.HexAddress) –
shares (decimal.Decimal) –
raw_shares (int) –
funcs (list[web3.contract.contract.ContractFunction]) –
- Return type
None
- broadcast(from_=None, gas=1000000)
Broadcast all the transactions in this request.
- Parameters
from – Address to send the transactions from
gas (int) – Gas limit to use for each transaction
from_ (eth_typing.evm.HexAddress) –
- Returns
List of transaction hashes
- Return type
list[hexbytes.main.HexBytes]
- parse_redeem_transaction(tx_hashes)
Parse the transaction receipt to get the actual shares redeemed.
Assumes only one redemption request per vault per transaction
- Raises
CannotParseRedemptionTransaction – If we did not know how to parse the transaction
- Parameters
tx_hashes (list[hexbytes.main.HexBytes]) –
- Return type