Deposits and Withdrawals
Introduction
These queries allow for the indexing of all deposits and withdrawals.
Core Concepts
Transaction Tracking
SameChainTransaction
This represents a same chain deposit or withdrawal that has been completed into either single vault or multivaults. It can be queried using-
The fields of SameChainTransaction are as follows-
id-
ID used to refer the Same Chain Transactions is the Transaction Hash which did the same chain withdrawal/ deposit.transactionHash-
Hash of the transaction that did the deposit or withdrawaltxInfo-
payload header for the same chain deposit or withdrawalpayloadId-
Payload Id for the deposit/ withdawal payload. This is used to track the flow across the steps of deposit and withdrawal.superformID-
This is a list of Superform Ids for which the deposit or withdrawal was done. In case it has single Superform Id, it represents a singleVault deposit or withdrawal whereas multiple superform Id represent multiVault withdrawal or deposittxType
- Its an integer value that can be 0 or 1. This represents whether the transaction is deposit (0) or withdrawal (1).multiTransaction
- It is a boolean which is false if it is a single vault deposit/ withdrawal and is true if it is multiVault deposit/ withdrawalblockNumber-
Block in which the transaction was done for deposit/ withdrawalblockTimestamp-
Timestamp for Block in which the transaction was done for deposit/ withdrawal
CrossChainInitiatedTransaction
This represents a cross chain withdrawal or deposit that was initiated from the specific chain. This does not represent a completed withdrawal or deposit and the transactions eventually can fail in the destination chains. This is useful to track everything that has been started in the chain and can be used in conjunction with events on destination chain to see the complete flow of a deposit or withdrawal. This can be queried using-
The fields of SameChainTransaction are as follows-
id-
ID is the transaction hash which initiated the Cross Chain Transaction.transactionHash-
Hash of the transaction that initiated the deposit or withdrawal across the chainsrcPayloadId-
Payload Id for the deposit/ withdrawal. In destination chain this is used as srcChain Payload ID.blockNumber-
Block in which the transaction was done for deposit/ withdrawalblockTimestamp-
Timestamp for Block in which the transaction was done for deposit/ withdrawal
Message Tracking
PayloadRecieved
This represents various payloads that are received on the destination chains. This has most of the fields that help in establishing connection between source chain and destination chain for cross chain transactions. This can be queried as follows-
The fields are as follows-
id-
ID is the transaction in which the payload ID was received in the destination chain.srcChainId-
Chain Id of the chain from which the payload has been receiveddstChainId-
Chain ID of the destination chain for the payloadsuperformIDs-
This is a list of Superform Ids for which the deposit or withdrawal was done. In case it has single Superform Id, it represents a singleVault deposit or withdrawal whereas multiple superform Id represent multiVault withdrawal or depositdstPayloadId-
This is the ID of the payload on the destination chain.srcPayloadId-
This is the ID of the payload on the source chain. This can be used along with payloadId of CrossChainInitiatedTransaction to create a complete flow of transactions across chains from source chain to destination chain.transactionHash-
Hash of the transaction that did the deposit or withdrawal
PayloadProcessed
This represents the various Payloads that are processed on the destination chain. It can be queried using-
The fields of PayloadProcessed are as follows=
id-
ID is hash of transaction which lead to the payload being processed on destination chain,superformIDs-
This is a list of Superform Ids for which the deposit or withdrawal was done. In case it has single Superform Id, it represents a singleVault deposit or withdrawal whereas multiple superform Id represent multiVault withdrawal or depositdstPayloadId-
This is the ID of the payload on the destination chain.srcChainId-
Chain Id of the chain from which the payload has been receivedsrcPayloadId-
This is the ID of the payload on the source chain. This can be used along with payloadId of CrossChainInitiatedTransaction to create a complete flow of transactions across chains from source chain to destination chain.blockNumber-
Block in which the transaction was done for deposit/ withdrawaltransactionHash-
Hash of the transaction that did the deposit or withdrawal
ProofRecieved
Proofs received on destination chain via the data bridges. These can be queried using-
The fields are as follows-
id-
The ID is the transaction hash through which the proof was receivedproof-
The proof received in bytesblockNumber-
Block in which the transaction was done for deposit/ withdrawal
DstPayloadID
Payload IDs for cross chain deposits and withdrawals. These can be queried using-
Destination Payloads are created when payloads are recieved on the destination chain. It has lot of fields most of which keep getting filled during the lifecycle of the payload in the destination chain. The fields are as follows-
id
- ID is the stringified version of the payloadID.payloadID
- This is the payloadID given to the payload on destination chain. This is incremental with new payload being received getting incremented value as payloadIDtxType
- Its an integer value that can be 0 or 1. This represents whether the transaction is deposit (0) or withdrawal (1).callBackType
- This again is an integer that can be 0 or 1 and represents callback which is used to mint superPositions from Destinations. This can be RETURN(0) or FAIL(1)superformsID-
This a list of superform IDs for which the deposit / withdrawal is being requested. It can be a list with a single superform if the transaction is not a multiVault deposit/ withdrawalamounts
- This is a list of amounts representing how much is being deposited/ withdrawan from the corresponding superforms.multiTransaction
- It is a boolean which is false if it is a single vault deposit/ withdrawal and is true if it is multiVault deposit/ withdrawalsrcChainId-
Chain Id of the chain from which the payload has been receivedsrcPayloadId
- Payload ID of the payload on the source chain. This can be used to uniquely relate destination paylaods to source chain initiated transactioncreationBlockNumber
- Block in which the Payload was created in the destination chain after recieving itpayloadReceived-
It is of type PayloadRecieved and represents PayloadRecieved created for this Payload.payloadProcessed-
It is of type PayloadProcessed and represents PayloadProcessed created for this Payload. It is null if the payload is not processed.payloadUpdated
- It is boolean representing whether the payload has been updated by the keeper or not. It is false till the payload is updated.failedDepositsSuperforms
- It is a list of Superforms for which the deposit had failed. It is an empty list if deposit doesn't fail for any superforms.failedDepositsAmounts
- It is a list of amount that failed for the Superforms infailedDepositsSuperforms
. It is an empty list if deposit doesn't fail for any superforms.rescueDisputed
- It is a boolean representing whether there has been any dispute to the rescue of failed deposits.rescueFinalized
- It is a boolean representing whether there has been any dispute to the rescue of failed deposits.proposedRescue
- It is a list of proposed rescues for the payload to rescue the failed deposits. It is a list because if there is dispute another proposal needs to be sent. Each RescuePayload has following-superformIds
- List of Superforms for which rescue was proposedproposedAmount
- Amount proposed for rescue for the SuperformsproposedTime
- Time in which the proposal was madeproposedTransactionHash
- Hash of the transaction for proposal of rescue of the funds
Last updated