TimelockStateRegistry
Introduction
TimelockStateRegistry
implements and extends BaseStateRegistry
and is used by core contracts to support two step cross-chain withdrawals in Superform. Multiple vaults have implemented a two step withdrawal process, including Maple, Centrifuge, Notional and Umami.
BaseStateRegistry
is an abstract contract that defines a foundation for implementing cross-chain processing and messaging mechanisms within Superform. StateRegistry
contracts broadly store information that have been sent cross-chain and AMB Implementations move information cross-chain.
Core Concepts
Inheriting from BaseStateRegistry
, this contract contains similar logic to CoreStateRegistry with adjusted methods to receive and finalize payloads.
receivePayload
This function receives payloads from ERC4626TimelockForm to process later, and is gated by the onlyForm
role to ensure that only the Form
can write to receive this.
name | description |
---|---|
| uint8 boolean. Informs if the withdraw call is cross-chain or not |
| address of the underlying beneficiary |
| uint64 of the originating EVM |
| uint256 of the timestamp with the unlock time |
|
finalizePayload
For successful withdrawals payloads are finalized to ensure payloads aren't processed again.
name | description |
---|---|
| unit256 payload id to finalize. Pertains only to the TwoStepsFormStateRegistry. |
| bytes transaction data to execute in withdrawing the payload. |
| bytes AMB message data to re-mint shares |
getTimelockPayload
This function allows any user to translate payloadIds into TimeLockPayloads to see if there are Timelocked vaults associated with any request.
Last updated