erc_4626.vault_protocol.lagoon.deposit_redeem
Documentation for eth_defi.erc_4626.vault_protocol.lagoon.deposit_redeem Python module.
Lagoon-specific extensions to the generic ERC-7540 flow.
Module Attributes
|
Legacy Lagoon |
|
Legacy Lagoon |
Classes
alias of |
|
Lagoon ERC-7540 flow with versioned access policy and Safe settlement. |
- ADDRESS_NOT_ALLOWED_SELECTOR = HexBytes('0x51ee5ed5')
AddressNotAllowed(address)custom-error selector in Lagoon v0.6.
- NOT_WHITELISTED_SELECTOR = HexBytes('0x584a7938')
NotWhitelisted()custom-error selector in Lagoon v0.5 and earlier.
- REQUEST_DEPOSIT_SELECTOR = HexBytes('0x85b77f45')
requestDeposit(uint256,address,address)Lagoon entry-point selector.
- ERC7540DepositManager
alias of
eth_defi.erc_4626.vault_protocol.lagoon.deposit_redeem.LagoonDepositManager
- class ERC7540DepositRequest
Bases:
eth_defi.vault.deposit_redeem.DepositRequestAsynchronous deposit request for ERC-7540 vaults.
- parse_deposit_transaction(tx_hashes)
Parse one standard ERC-7540 deposit-request transaction.
The final receipt must contain exactly one standard
DepositRequestevent from which the request identifier is read.- Parameters
tx_hashes (list[hexbytes.main.HexBytes]) – Transaction hashes belonging to the request.
- Returns
Parsed request ticket with its ERC-7540 request identifier.
- Raises
CannotParseRedemptionTransaction – If the receipt does not contain exactly one
DepositRequestevent.- Return type
- __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]) –
value (Optional[decimal.Decimal]) –
- 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
from_ (eth_typing.evm.HexAddress) –
- Returns
List of transaction hashes
- Raises
TransactionAssertionError – If any of the transactions revert
- Return type
- class ERC7540DepositTicket
Bases:
eth_defi.vault.deposit_redeem.DepositTicketAsynchronous deposit request for ERC-7540 vaults.
- __init__(vault_address, owner, to, raw_amount, tx_hash, gas_used, block_number, block_timestamp, request_id)
- Parameters
vault_address (eth_typing.evm.HexAddress) –
owner (eth_typing.evm.HexAddress) –
to (eth_typing.evm.HexAddress) –
raw_amount (int) –
tx_hash (hexbytes.main.HexBytes) –
gas_used (int) –
block_number (int) –
block_timestamp (datetime.datetime) –
request_id (int) –
- Return type
None
- class ERC7540RedemptionRequest
Bases:
eth_defi.vault.deposit_redeem.RedemptionRequestAsynchronous redemption request for ERC-7540 vaults.
- parse_redeem_transaction(tx_hashes)
Parse one standard ERC-7540 redemption-request transaction.
The final receipt must contain exactly one standard
RedeemRequestevent from which the request identifier is read.- Parameters
tx_hashes (list[hexbytes.main.HexBytes]) – Transaction hashes belonging to the request.
- Returns
Parsed request ticket with its ERC-7540 request identifier.
- Raises
CannotParseRedemptionTransaction – If the receipt does not contain exactly one
RedeemRequestevent.- Return type
- __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]
- class ERC7540RedemptionTicket
Bases:
eth_defi.vault.deposit_redeem.RedemptionTicketAsynchronous redemption request for ERC-7540 vaults.
- __init__(vault_address, owner, to, raw_shares, tx_hash, request_id)
- Parameters
vault_address (eth_typing.evm.HexAddress) –
owner (eth_typing.evm.HexAddress) –
to (eth_typing.evm.HexAddress) –
raw_shares (int) –
tx_hash (hexbytes.main.HexBytes) –
request_id (int) –
- Return type
None
- class LagoonDepositManager
Bases:
eth_defi.erc_7540.deposit_redeem.ERC7540DepositManagerLagoon ERC-7540 flow with versioned access policy and Safe settlement.
Lagoon vaults are fully asynchronous ERC-7540 vaults: both deposits and redemptions are request → settle → claim. The generic ERC-7540 manager supplies the standard request, claim, ticket and event handling; this subclass adds Lagoon’s versioned deposit access policy, legacy claim-event topics and an Anvil settlement driver that impersonates the deployed valuation manager and Safe.
Deposit process. Asynchronous. Deposits go through the inherited
requestDeposit(assets, controller, owner)entry point (selectorREQUEST_DEPOSIT_SELECTOR), preceded by the ERC-20approveof the denomination token; the assets move into the vault’s pending silo at request time. The request id is read from the ERC-7540DepositRequestevent into anERC7540DepositTicket. After settlement the shares are claimed withdeposit(assets, receiver, controller)(the three-argument ERC-7540 claim form).get_deposit_event_signatures()additionally accepts the legacy LagoonDeposittopic (LEGACY_DEPOSIT_TOPIC) during claim analysis.Redemption process. Asynchronous, symmetric. Redemptions use
requestRedeem(shares, controller, owner), emitting the ERC-7540RedeemRequestevent whose request id is stored in anERC7540RedemptionTicket. After settlement the assets are claimed withredeem(shares, receiver, controller);get_redemption_event_signatures()also accepts the legacyWithdrawtopic (LEGACY_WITHDRAW_TOPIC).Queues and settlement. Requests are batched per settlement round. The vault’s valuation manager first reports NAV via
updateNewTotalAssets/updateTotalAssets, then the Safe settles:settleDeposit(newTotalAssets)mints for pending deposits and always calls_settleRedeem(msg.sender)afterwards, which pays queued redemptions by pulling the denomination token from the Safe (safeTransferFrom(safe, vault, convertToAssets(pendingShares))). Claimability is read fromclaimableDepositRequest/claimableRedeemRequest.Lockups and cooldowns. There is no fixed cooldown; the wait is one settlement round, whose cadence is off-vault operational rather than an onchain deadline.
LagoonFlowManager.get_estimated_lock_up()returns Lagoon’s offchainaverage_settlementmetadata when available, otherwiseNone.Whitelisting / access control. Deposit admission is version specific and checked before broadcast by
_assert_deposit_request_available()/can_create_deposit_request(). Lagoon v0.5 and earlier derive whitelist mode fromisWhitelisted(0x0)and admit an account withisWhitelisted(account); Lagoon v0.6 uses the access layer’sisAllowed(0x0)/isAllowed(account)(supporting whitelist mode, blacklist mode and an external sanctions oracle). Both flow throughLagoonVault.is_whitelisted_deposit()andLagoonVault.is_account_whitelisted(). A denial raisesWhitelistingRequired(decoded errorNotWhitelisted/NOT_WHITELISTED_SELECTORfor v0.5, orAddressNotAllowed/ADDRESS_NOT_ALLOWED_SELECTORfor v0.6); an undeterminable policy or a paused vault raisesVaultFlowUnavailable(fails closed).Anvil settlement (force_settle).
force_settle()requires an Anvil provider and a concrete deposit or redemption ticket. It impersonates and funds both the valuation manager and the Safe, then runs one settlement round viaforce_lagoon_settle(). BecausesettleDepositalways triggers_settleRedeem,_provision_safe_for_settlement()first grants the Safe’s missing standingapprove(vault, max). It defaults to synthetic Safe provisioning because every settlement processes the whole shared redemption queue, including the simulated redemption when applicable. Callforce_settle(..., ignore_liquidity=False)to require real Safe liquidity. The injected amount and theliquidity_constraints_ignoredresult flag disclose that aclaimableresult proves settlement mechanics, not live solvency. Success requires the ticket to reachAsyncVaultRequestStatus.claimable; otherwise it raisesUnsupportedVaultSimulationwith the concrete before/after status.Initialise the Lagoon manager.
The constructor narrows the generic manager to Lagoon vault adapters because later operations rely on Lagoon roles and version detection.
- Parameters
vault – Lagoon vault adapter.
- __init__(vault)
Initialise the Lagoon manager.
The constructor narrows the generic manager to Lagoon vault adapters because later operations rely on Lagoon roles and version detection.
- Parameters
vault (eth_defi.erc_4626.vault_protocol.lagoon.vault.LagoonVault) – Lagoon vault adapter.
- force_settle(ticket, *, mock=None, ignore_liquidity=True)
Force one Lagoon settlement round on an Anvil fork.
The simulation impersonates the vault’s valuation manager and Safe, then checks that the selected request becomes claimable.
- Parameters
ticket (Optional[Union[eth_defi.vault.deposit_redeem.DepositTicket, eth_defi.vault.deposit_redeem.RedemptionTicket]]) – Pending deposit or redemption ticket to progress.
mock (Optional[object]) – Optional local protocol mock. Lagoon has no mock settlement driver; use the existing real Anvil-fork driver without this argument.
ignore_liquidity (bool) – On an Anvil fork only, permit the driver to top up a Safe that is short of redemption assets. Defaults to
Truebecause settlement processes the shared redemption queue. PassFalseto require real Safe liquidity.
- Returns
Before/after status and settlement transaction hashes.
- Raises
UnsupportedVaultSimulation – If the provider is not Anvil, the ticket is unsupported, or the settlement does not make the request claimable.
- Return type
- can_create_deposit_request(owner)
Return whether Lagoon’s current access policy admits an owner.
Unknown access policy fails closed. Transient provider failures still propagate so callers can distinguish an unavailable read from a known denial.
- Parameters
owner (eth_typing.evm.HexAddress) – Request owner and controller.
- Returns
Trueonly when the vault is open and its access view admits the owner.- Return type
- get_deposit_event_signatures()
Return Lagoon claim-deposit event topics.
Legacy deployments use a non-standard topic while current releases emit the ERC-4626
Depositevent accepted by the generic manager.- Returns
Standard and legacy Lagoon deposit topics.
- Return type
- get_redemption_event_signatures()
Return Lagoon claim-redemption event topics.
Legacy deployments use a non-standard topic while current releases emit the ERC-4626
Withdrawevent accepted by the generic manager.- Returns
Standard and legacy Lagoon withdrawal topics.
- Return type
- analyse_deposit(claim_tx_hash, deposit_ticket)
Analyse a completed ERC-7540 deposit claim.
The method decodes the ERC-4626
Depositevent emitted by the second-stage claim transaction. Protocol subclasses may extend the accepted event signatures for legacy deployments.- Parameters
claim_tx_hash (Union[hexbytes.main.HexBytes, str]) – Deposit-claim transaction hash.
deposit_ticket (Optional[eth_defi.vault.deposit_redeem.DepositTicket]) – Original asynchronous request ticket.
- Returns
Decoded token movement, or a failed-transaction diagnostic.
- Raises
RuntimeError – If a successful receipt does not contain an accepted event.
- Return type
Union[eth_defi.vault.deposit_redeem.DepositRedeemEventAnalysis, eth_defi.vault.deposit_redeem.DepositRedeemEventFailure]
- analyse_redemption(claim_tx_hash, redemption_ticket)
Analyse a completed ERC-7540 redemption claim.
The method decodes the ERC-4626
Withdrawevent emitted by the second-stage claim transaction. Protocol subclasses may extend the accepted event signatures for legacy deployments.- Parameters
claim_tx_hash (Union[hexbytes.main.HexBytes, str]) – Redemption-claim transaction hash.
redemption_ticket (Optional[eth_defi.vault.deposit_redeem.RedemptionTicket]) – Original asynchronous request ticket.
- Returns
Decoded token movement, or a failed-transaction diagnostic.
- Raises
RuntimeError – If a successful receipt does not contain an accepted event.
- Return type
Union[eth_defi.vault.deposit_redeem.DepositRedeemEventAnalysis, eth_defi.vault.deposit_redeem.DepositRedeemEventFailure]
- can_create_redemption_request(owner)
Return whether the vault is currently open for a redemption request.
The generic ERC-7540 layer checks only the optional pause flag; protocol-specific redemption rules belong in manager subclasses.
- Parameters
owner (eth_typing.evm.HexAddress) – Request owner and controller.
- Returns
Falsewhen the vault reports that requests are paused.- Return type
- can_finish_deposit(deposit_ticket)
Check whether a deposit request is ready to claim.
The ERC-7540
claimableDepositRequestview returns a positive asset amount after the operator has settled the request.- Parameters
deposit_ticket (eth_defi.erc_7540.deposit_redeem.ERC7540DepositTicket) – Deposit request to inspect.
- Returns
Truewhen the request has claimable assets.- Return type
- can_finish_redeem(redemption_ticket)
Check whether a redemption request is ready to claim.
The ERC-7540
claimableRedeemRequestview returns a positive share amount after the operator has settled the request.- Parameters
redemption_ticket (eth_defi.erc_7540.deposit_redeem.ERC7540RedemptionTicket) – Redemption request to inspect.
- Returns
Truewhen the request has claimable shares.- Return type
- check_deposit_whitelist(owner)
Reject a deposit when the vault’s whitelist excludes the owner.
Shared deposit-preflight helper implementing the whitelisting contract every manager must honour: when a vault applies a deposit whitelist policy that is applicable and queryable, and
owneris not a member of it, raiseWhitelistingRequiredbefore any transaction is broadcast so the caller can surface a “whitelisting required” state instead of paying gas for a guaranteed revert.The check is intentionally conservative — it only raises when the whitelist information can be obtained and is applicable:
if
is_whitelisted_deposit()raisesNotImplementedError, the vault-wide policy cannot be determined for this adapter/version, so no exception is raised;if the vault is permissionless, no exception is raised;
if
is_account_whitelisted()raisesNotImplementedError, per-account membership cannot be queried, so no exception is raised;only when the policy is applicable and the owner is provably not admitted is
WhitelistingRequiredraised.
Adapters that need a stricter fail-closed policy for an unknown admission state should override their own preflight and raise
VaultFlowUnavailablein addition to calling this helper (see the Lagoon manager for an example).- Parameters
owner (eth_typing.evm.HexAddress) – Deposit owner and controller whose whitelist membership is checked.
- Raises
WhitelistingRequired – When the vault applies an applicable, queryable whitelist policy and
owneris not permitted to deposit.- Return type
None
- create_deposit_request(owner, to=None, amount=None, raw_amount=None, check_max_deposit=True, check_enough_token=True)
Build the standard ERC-7540
requestDeposittransaction.- Parameters
owner (eth_typing.evm.HexAddress) – Controller and owner of the request.
to (eth_typing.evm.HexAddress) – Unsupported separate receiver; ERC-7540 requests use
owner.amount (decimal.Decimal) – Human-readable denomination-token amount.
raw_amount (int) – Raw denomination-token amount, overriding
amount.check_max_deposit – Reserved for parity with the common manager API.
check_enough_token – Reserved for parity with the common manager API.
- Returns
Request wrapper ready for signing and parsing.
- Raises
VaultFlowUnavailable – If the vault’s optional pause view reports that requests are paused.
- Return type
- create_deposit_request_for_guard_validation(owner, raw_amount)
Build deposit calldata for a closed-vault GuardV0 policy check.
This Anvil-only diagnostic path is for a consumer that has already received a typed
deposit_closedordeposit_pausedpreflight result. Adapters must override it only after proving that their typed result represents a temporary vault closure rather than a capacity or amount restriction. The returned calls must be supplied individually toGuardV0.validateCall(); callers must never broadcast them to the closed protocol vault.- Parameters
owner (eth_typing.evm.HexAddress) – SimpleVaultV0/Safe address that would own the shares.
raw_amount (int) – Denomination-token amount in the selected asset’s raw unit.
- Returns
Manager-generated deposit request suitable only for isolated GuardV0 validation.
- Raises
UnsupportedVaultSimulation – Unless the protocol-specific manager implements this diagnostic path.
- Return type
- create_redemption_request(owner, to=None, shares=None, raw_shares=None, check_max_deposit=True, check_enough_token=True)
Build the standard ERC-7540
requestRedeemtransaction.- Parameters
owner (eth_typing.evm.HexAddress) – Controller and owner of the request.
to (eth_typing.evm.HexAddress) – Unsupported separate receiver; ERC-7540 requests use
owner.shares (decimal.Decimal) – Human-readable vault-share amount.
raw_shares (int) – Raw vault-share amount, overriding
shares.check_max_deposit – Reserved for parity with the common manager API.
check_enough_token – Whether to verify that the owner still holds the requested shares.
- Returns
Request wrapper ready for signing and parsing.
- Return type
- deposit_request_class
alias of
eth_defi.erc_7540.deposit_redeem.ERC7540DepositRequest
- estimate_deposit(owner, amount, block_identifier='latest')
Estimate shares for a denomination-token amount.
ERC-7540 retains the ERC-4626
convertToSharespreview used here; the estimate does not imply that the request is currently admissible.- Parameters
owner (eth_typing.evm.HexAddress) – Request controller. The standard preview is not owner-specific.
amount (decimal.Decimal) – Human-readable denomination-token amount.
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) – Block at which to read the conversion rate.
- Returns
Estimated human-readable share amount.
- Return type
- estimate_redeem(owner, shares, block_identifier='latest')
Estimate denomination tokens for a vault-share amount.
ERC-7540 retains the ERC-4626
convertToAssetspreview used here; the estimate does not imply that the request is currently admissible.- Parameters
owner (eth_typing.evm.HexAddress) – Request controller. The standard preview is not owner-specific.
shares (decimal.Decimal) – Human-readable vault-share amount.
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) – Block at which to read the conversion rate.
- Returns
Estimated human-readable denomination-token amount.
- Return type
- estimate_redemption_delay()
Return no deterministic protocol-level redemption delay.
Settlement timing is controlled by each vault operator and is outside the ERC-7540 standard.
- Returns
Zero-duration sentinel for an unspecified delay.
- Return type
- fetch_completed_redemption_tx_hash(ticket)
Find an operator-owned terminal redemption transaction when available.
Claim-based protocols finish through
finish_redemption()and do not need this lookup. Operator-finalised protocols override the hook to find and validate the transaction that paid the requested receiver.- Parameters
ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) – Persisted redemption request to locate.
- Returns
Terminal transaction hash, or
Noneif the protocol has not observed one yet.- Return type
Optional[hexbytes.main.HexBytes]
- fetch_vault_flow_events(hypersync_client, start_block, end_block)
Fetch standard ERC-7540 request events using Hypersync.
ERC-7540 vaults emit
DepositRequestfor deposit requests andRedeemRequestfor redemption requests. Protocol-specific legacy events must be handled by a protocol manager subclass.- Parameters
- Returns
Iterator of indexed pending vault flow events in chain order.
- Return type
collections.abc.Iterator[eth_defi.vault.flow_events.PendingVaultFlow]
- finish_deposit(deposit_ticket)
Build the ERC-7540 transaction that claims deposit shares.
The request must already be settled. The ticket supplies the controller, receiver and settled asset amount.
- Parameters
deposit_ticket (eth_defi.vault.deposit_redeem.DepositTicket) – Settled asynchronous deposit ticket.
- Returns
Bound three-argument
depositclaim function.- Return type
web3.contract.contract.ContractFunction
- finish_redemption(redemption_ticket)
Build the ERC-7540 transaction that claims redeemed assets.
The request must already be settled. The ticket supplies the controller, receiver and settled share amount.
- Parameters
redemption_ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) – Settled asynchronous redemption ticket.
- Returns
Bound three-argument
redeemclaim function.- Return type
web3.contract.contract.ContractFunction
- force_redemption_liquidity(owner, raw_shares, failure)
Provision an unavailable synchronous redemption on an Anvil fork.
Concrete managers may implement this only for a source-proven liquidity failure. The default is deliberately unsupported: this hook must never bypass admission, minimums, maturity or time locks.
- Parameters
owner (eth_typing.evm.HexAddress) – Redemption owner.
raw_shares (int) – Exact raw share quantity requested.
failure (eth_defi.vault.deposit_redeem.VaultFlowUnavailable) – Typed preflight failure that prompted the intervention request.
- Returns
Structured intervention evidence from a concrete manager.
- Raises
UnsupportedVaultSimulation – Always for managers without a protocol-specific implementation.
- Return type
eth_defi.vault.deposit_redeem.VaultRedemptionSimulationIntervention
- get_deposit_approval_target()
Return the ERC-20 spender required for a deposit request.
Standard ERC-4626 and the currently supported async adapters pull denomination tokens from the vault address itself. An adapter using a different router or silo must override this method; guarded callers use it to whitelist and validate the exact approval calldata.
- Returns
ERC-20 approval spender address.
- Return type
- get_deposit_delay_over(address)
Estimate when a pending async deposit request will settle.
Mirror of
get_redemption_delay_over()for the deposit side.Used to show an estimated settlement time for unsettled deposits (e.g. in the trade-executor
trade-uitable).Default returns
None: the protocol has no deterministic onchain settlement schedule (e.g. operator-driven ERC-7540 vaults like Lagoon). Subclasses with a predictable settlement cadence (e.g. Ostium V1.5) override this to return an estimated UTC timestamp.
- Parameters
address (Union[eth_typing.evm.HexAddress, str]) – Owner of the pending deposit request.
- Returns
Naive UTC timestamp when the deposit is expected to settle, or
Nonewhen no onchain estimate is available.- Return type
- get_deposit_request_status(ticket)
Map ERC-7540 deposit state to the generic status enum.
Check the request-specific claimable amount first: an aggregate
pendingDepositRequest(0, owner)query lumps together all of the owner’s requests, so probing it first would report an already-settled request as still pending whenever another request is outstanding. The generic interface has no reclaim signal, soreclaimableis never returned.- Parameters
ticket (eth_defi.erc_7540.deposit_redeem.ERC7540DepositTicket) – Deposit request to inspect.
- Returns
Claimable, pending or empty request status.
- Return type
- get_max_deposit(owner)
How much we can deposit
- Parameters
owner (eth_typing.evm.HexAddress) –
- Return type
- get_redemption_delay_over(address)
Return the legacy sentinel for an unknown account deadline.
Generic ERC-7540 vaults do not expose a deterministic per-account settlement deadline.
- Parameters
address (Union[eth_typing.evm.HexAddress, str]) – Request controller.
- Returns
Naive Unix epoch sentinel retained for backwards compatibility.
- Return type
- get_redemption_request_status(ticket)
Map ERC-7540 redemption state to the generic status enum.
Request-specific claimable is checked before the aggregate pending query for the same reason as
get_deposit_request_status().- Parameters
ticket (eth_defi.erc_7540.deposit_redeem.ERC7540RedemptionTicket) – Redemption request to inspect.
- Returns
Claimable, pending or empty request status.
- Return type
- has_synchronous_deposit()
Report that deposits use the asynchronous request lifecycle.
- Returns
Always
Falsefor ERC-7540.- Return type
- has_synchronous_redemption()
Report that redemptions use the asynchronous request lifecycle.
- Returns
Always
Falsefor ERC-7540.- Return type
- is_deposit_in_progress(owner)
Check pending ERC-7540 request.
Query
pendingDepositRequest(0, owner)when the request identifier is not known. Per ERC-7540, request identifier zero aggregates the controller’s pending deposit assets. A value greater than zero means at least one request remains unsettled.- Parameters
owner (eth_typing.evm.HexAddress) – Controller address to inspect.
- Returns
Trueif the controller has pending deposit assets.- Return type
- is_redemption_in_progress(owner)
Check whether a controller has pending redemption shares.
Request identifier zero aggregates the controller’s pending redemption shares under ERC-7540.
- Parameters
owner (eth_typing.evm.HexAddress) – Controller address to inspect.
- Returns
Trueif the controller has pending redemption shares.- Return type
- reclaim_deposit(ticket)
Return a function to recover funds after a failed async deposit settlement.
Returns
Noneif the protocol does not support reclaim.- Parameters
ticket (eth_defi.vault.deposit_redeem.DepositTicket) –
- Return type
Optional[web3.contract.contract.ContractFunction]
- reclaim_withdrawal(ticket)
Return a function to recover shares after a failed async withdrawal settlement.
Returns
Noneif the protocol does not support reclaim.- Parameters
- Return type
Optional[web3.contract.contract.ContractFunction]
- reconstruct_deposit_ticket(data)
Reconstruct a deposit ticket from persistent data.
Both the current string form and the legacy integer form of raw token amounts are accepted for backwards compatibility.
- Parameters
data (dict) – Data produced by
serialize_deposit_ticket().- Returns
Reconstructed ERC-7540 deposit ticket.
- Return type
- reconstruct_redemption_ticket(data)
Reconstruct a redemption ticket from persistent data.
Both the current string form and the legacy integer form of raw share amounts are accepted for backwards compatibility.
- Parameters
data (dict) – Data produced by
serialize_redemption_ticket().- Returns
Reconstructed ERC-7540 redemption ticket.
- Return type
- redemption_request_class
alias of
eth_defi.erc_7540.deposit_redeem.ERC7540RedemptionRequest
- serialize_deposit_ticket(ticket)
Serialise an ERC-7540 deposit ticket.
The generic base ticket payload is extended with the ERC-7540 request identifier needed for later status checks.
- Parameters
ticket (eth_defi.erc_7540.deposit_redeem.ERC7540DepositTicket) – Deposit ticket to serialise.
- Returns
Persistent ticket data including
vault_request_id.- Return type
- serialize_redemption_ticket(ticket)
Serialise an ERC-7540 redemption ticket.
The ERC-7540 request identifier is retained so a restarted process can query the request-specific claimable amount.
- Parameters
ticket (eth_defi.erc_7540.deposit_redeem.ERC7540RedemptionTicket) – Redemption ticket to serialise.
- Returns
Persistent ticket data including
vault_request_id.- Return type
- LagoonDepositRequest
alias of
eth_defi.erc_7540.deposit_redeem.ERC7540DepositRequest