ITimelockStateRegistry

Git Source

Author: ZeroPoint Labs

Interface for Two Steps Form State Registry

Functions

receivePayload

Receives request (payload) from two steps form to process later

function receivePayload(
    uint8 type_,
    address srcSender_,
    uint64 srcChainId_,
    uint256 lockedTill_,
    InitSingleVaultData memory data_
)
    external;

Parameters

NameTypeDescription
type_uint8is the nature of transaction (xChain: 1 or same chain: 0)
srcSender_addressis the address of the source chain caller
srcChainId_uint64is the chainId of the source chain
lockedTill_uint256is the deadline for timelock (after which we can call finalizePayload)
data_InitSingleVaultDatais the basic information of superformId, amount to withdraw of type InitSingleVaultData

finalizePayload

Form Keeper finalizes payload to process two steps withdraw fully

function finalizePayload(uint256 payloadId_, bytes memory txData_) external payable;

Parameters

NameTypeDescription
payloadId_uint256is the id of the payload to finalize
txData_bytesis the off-chain generated transaction data

getTimelockPayload

allows users to read the timeLockPayload_ stored per payloadId_

function getTimelockPayload(uint256 payloadId_) external view returns (TimelockPayload memory timeLockPayload_);

Parameters

NameTypeDescription
payloadId_uint256is the unqiue payload identifier allocated on the destination chain

Returns

NameTypeDescription
timeLockPayload_TimelockPayloadthe timelock payload stored

timelockPayloadCounter

allows users to read the timelockPayloadCounter

function timelockPayloadCounter() external view returns (uint256);