Tracking Events
Implementation
Deposit and corresponding fill events are conveniently scraped by a database and available here. The database implementation can be found in this repository.
How to detect the status of a deposit
When a user deposits capital to a SpokePool, a V3FundsDeposited
event is emitted. This event is now emitted for both deposit()
(legacy function interface) and depositV3()
calls. FundsDeposited
, the V2 event, is no longer possible to emit.
This data comprises the new deposit's "RelayData" which is combined with the block.chainId
of the SpokePool that emitted the event to form:
There are two ways to determine whether a deposit has been filled on the destinationChain
:
Each fill of a deposit emits a
FilledV3Relay
which emits all of the data that you'd need to construct anotherV3RelayData
structure (along with the destination chain'sblock.chainId
). If this relay hash matches the deposit relay hash, then the deposit is considered valid and the filler will receive a refund in the next bundle.Call the
SpokePool.fillStatuses(bytes32): uint256
function passing in the deposit relay hash. The possible fill statuses are:
Last updated