Endpoints that receive query results from Relayer

This function is the endpoint from which Relayer obtains the proof and returns it to the src chain.

struct QueryResponse {
  bytes32 queryId;
  bytes proof;

function receiveQuery(QueryResponse memory response) external;


QueryResponse data

What the receiveQuery function does:

  • Verify if Gelato's Relayer executed the function

  • Verify the proof and extract the acquisition data

  • Pay fees to the Relayer

  • Return data to the user

To return data to the User Contract, the User Contract must inherit the following interface:

interface IReceiver {
    function receiveQuery(
        bytes32 queryId,
        bytes[] memory results,
        QueryType.QueryRequest[] memory queries,
        bytes memory message
    ) external;

Last updated