IOVMClient

Git Source

The IOVMClient contract interface.

Functions

cancelRequest

Cancels a request by its requestId. Emits a {RequestCancelled} event.

function cancelRequest(bytes32 requestId) external;

Parameters

NameTypeDescription
requestIdbytes32The ID of the request to be cancelled.

setResponse

Sets the response data for a specific request. This function is called by the OVMGateway contract.

function setResponse(bytes32 requestId, bytes calldata data) external;

Parameters

NameTypeDescription
requestIdbytes32The ID of the request.
databytesThe response data to be set.

updateSpecification

Updates the specification of the OVM client.

function updateSpecification(Specification calldata newSpec) external;

Parameters

NameTypeDescription
newSpecSpecificationThe new specification to update.

withdraw

Withdraws the contract's balance to the contract owner.

function withdraw() external;

isPendingRequest

Checks if a request is pending.

function isPendingRequest(bytes32 requestId) external view returns (bool);

Parameters

NameTypeDescription
requestIdbytes32The ID of the request.

Returns

NameTypeDescription
<none>boolisPending True if the request is pending, otherwise false.

getSpecification

Returns the specification of the contract.

function getSpecification() external view returns (Specification memory);

Returns

NameTypeDescription
<none>Specificationspecification The specification of the contract.

getOVMGatewayAddress

Get the address of the OVMGateway contract.

function getOVMGatewayAddress() external view returns (address);

Returns

NameTypeDescription
<none>addressThe address of the OVMGateway contract.