IOVMGateway
The OVMGateway contract interface.
Functions
sendRequest
Sends a request to execute a task.
function sendRequest(
address requester,
address callbackAddress,
bool deterministic,
bytes calldata data
) external payable returns (bytes32 requestId);
Parameters
Name | Type | Description |
---|---|---|
requester | address | The address of the requester. |
callbackAddress | address | The address of the contract to receive the callback. |
deterministic | bool | Whether the request is deterministic. |
data | bytes | The data to be passed to the callback function. msg.value is the payment for the task. |
Returns
Name | Type | Description |
---|---|---|
requestId | bytes32 | The unique identifier for the request. |
cancelRequest
Cancels a request.
function cancelRequest(bytes32 requestId) external;
Parameters
Name | Type | Description |
---|---|---|
requestId | bytes32 | The request ID to cancel. |
setResponse
Sets the response for a given requestId.
function setResponse(bytes32 requestId, bytes calldata data) external;
Parameters
Name | Type | Description |
---|---|---|
requestId | bytes32 | The unique identifier for the request. |
data | bytes | The response data to be set. |
getSpecification
Gets the specification of the callback contract.
function getSpecification(address callbackAddress) external view returns (Specification memory);
Parameters
Name | Type | Description |
---|---|---|
callbackAddress | address | The address of the callback contract. |
Returns
Name | Type | Description |
---|---|---|
<none> | Specification | specification The specification of the callback contract. |
getCommitments
Gets the commitments of a request.
function getCommitments(bytes32 requestId) external view returns (Commitment memory);
Parameters
Name | Type | Description |
---|---|---|
requestId | bytes32 | The request ID to get the commitments for. |
Returns
Name | Type | Description |
---|---|---|
<none> | Commitment | commitments The commitments of the request. |
getRequestsCount
Gets the number of requests.
function getRequestsCount() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | count The number of requests. |