EmberRedemptionRequest

Documentation for eth_defi.erc_4626.vault_protocol.ember.deposit_redeem.EmberRedemptionRequest Python class.

class EmberRedemptionRequest

Bases: eth_defi.vault.deposit_redeem.RedemptionRequest

Two-call Ember redemption request: share approval and queue creation.

Attributes summary

vault

Vault we are dealing with

owner

Owner of the shares

to

Receiver of underlying asset

shares

Human-readable shares

raw_shares

Raw amount of shares

funcs

Transactions we need to perform in order to open a redemption

web3

Methods summary

__init__(vault, owner, to, shares, ...)

broadcast([from_, gas])

Broadcast all the transactions in this request.

parse_redeem_transaction(tx_hashes)

Parse and validate the RequestRedeemed receipt event.

parse_redeem_transaction(tx_hashes)

Parse and validate the RequestRedeemed receipt event.

The event is emitted by the Ember vault even when the outer transaction is a GuardV0 SimpleVault or Lagoon module call. Its timestamp is required to equal the receipt block timestamp at millisecond precision.

Parameters

tx_hashes (list[hexbytes.main.HexBytes]) – Hashes broadcast for this request; the final hash is redemption.

Returns

Validated, restart-safe Ember redemption ticket.

Raises

CannotParseRedemptionTransaction – If the receipt does not contain one matching Ember request event.

Return type

eth_defi.erc_4626.vault_protocol.ember.deposit_redeem.EmberRedemptionTicket

__init__(vault, owner, to, shares, raw_shares, funcs)
Parameters
Return type

None

broadcast(from_=None, gas=1000000)

Broadcast all the transactions in this request.

Parameters
Returns

List of transaction hashes

Return type

list[hexbytes.main.HexBytes]