Gathering data for the claim
To claim a submission, a call to the
deBridgeGate.claim()method on the destination chain must be crafted using data taken from various sources. Though deSDK already provides a handy method for this, we explain here where to take and how to prepare this data.
_noncecan be taken from the corresponding args of the
_chainIdFromis obviously the ID of the origin chain,
_signaturesis the string with the signatures concatenated without a delimiter (don't forget to strip hexadecimal prefixes from each but the first); signatures can be pulled from the deBridge API,
_autoParamsis the encoded
SubmissionAutoParamsFromstruct, which is the derivative of the
nativeSendertaken from the
Sentevent: so you need to decode
SubmissionAutoParamsTostruct, add the fifth element, and encode back against the
This simple diagram shows the flow of the properties; dashed lines indicate the necessity of data decoding/encoding/unpacking/packing, while the straight line shows that the datum should be passed as is:
Data flow for the claim method
After all these elements are combined into one single call, you can sign and broadcast your transaction and wait for the
Claimedevent. This will indicate a successful submission.