ITangleJobs
Source: https://github.com/tangle-network/tnt-core/blob/main/src/interfaces/ITangleJobs.sol
ITangleJobs
Job submission and result management interface
Functions
submitJob
function submitJob(uint64 serviceId, uint8 jobIndex, bytes inputs) external payable returns (uint64 callId)Submit a job to a service
submitResult
function submitResult(uint64 serviceId, uint64 callId, bytes result) externalSubmit a job result (as operator)
submitResults
function submitResults(uint64 serviceId, uint64[] callIds, bytes[] results) externalSubmit multiple results in one transaction
submitAggregatedResult
function submitAggregatedResult(uint64 serviceId, uint64 callId, bytes output, uint256 signerBitmap, uint256[2] aggregatedSignature, uint256[4] aggregatedPubkey) externalSubmit an aggregated BLS result for a job
Only valid for jobs where requiresAggregation returns true
Parameters
| Name | Type | Description |
|---|---|---|
| serviceId | uint64 | The service ID |
| callId | uint64 | The job call ID |
| output | bytes | The aggregated output data |
| signerBitmap | uint256 | Bitmap indicating which operators signed (bit i = operator i in service) |
| aggregatedSignature | uint256[2] | The aggregated BLS signature [x, y] |
| aggregatedPubkey | uint256[4] | The aggregated public key [x0, x1, y0, y1] |
getJobCall
function getJobCall(uint64 serviceId, uint64 callId) external view returns (struct Types.JobCall)Get job call info
Events
JobSubmitted
event JobSubmitted(uint64 serviceId, uint64 callId, uint8 jobIndex, address caller, bytes inputs)JobResultSubmitted
event JobResultSubmitted(uint64 serviceId, uint64 callId, address operator, bytes result)JobCompleted
event JobCompleted(uint64 serviceId, uint64 callId)Emitted when a job reaches its required result threshold
Derive resultCount from getJobCall(serviceId, callId).resultCount