Function: futuresTradeUpload(PerpTypes.FuturesTradeUploadData data)
This uploads a perpetual futures trade. For more information, see the description of the Ledger.executeProcessValidatedFutures function.
Inputs
dataControl: Controlled by operator.
Constraints: Verify that
datais signed bycefiPerpTradeUploadAddress. Thedata.batchIdshould be equal tofuturesUploadBatchId.Impact: The data to upload.
Branches and code coverage
Negative behavior
Caller is not a trusted operator.
Signature is wrong.
Resend the same message again after successful execution.
Function call analysis
_innerPing()External/Internal? Internal.
Argument control? N/A.
Impact: Update the
lastOperatorInteractionby current timestamp.
_futuresTradeUploadData -> _processValidatedFutures -> ledger.executeProcessValidatedFutures(trade)External/Internal? External.
Argument control?
trade.Impact: Add new or update existing perpetual futures trade position of
accountIdin Ledger contract.