Futaba
TwitterBlog
  • 🌱Introduction
    • Introduction
    • Concept
    • Architecture
  • 🛠️Protocol
    • Gateway
      • Send
      • Receive
      • Estimate fee
      • Cache
    • Light Client
      • Request Query
      • Verify
      • Estimate fee
    • Relayer
    • Konoha
      • Chainlink Oracle
      • Herodotus
      • Lagrange
  • 💡Guide
    • Futaba Testnet
      • Balance query
      • Custom query
      • Access cache
      • Cross-chain voting
    • Quick Start
    • Customize Light Client
    • Example Apps
  • 📗References
    • FAQ
    • Contract addresses
    • Glossary
  • 🔗Links
    • Twitter
    • Blog
Powered by GitBook
On this page

Was this helpful?

  1. Protocol
  2. Gateway

Receive

Endpoints that receive query results from Relayer

PreviousSendNextEstimate fee

Last updated 1 year ago

Was this helpful?

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

struct QueryResponse {
  bytes32 queryId;
  bytes proof;
}

function receiveQuery(QueryResponse memory response) external;
Field
Description

response

QueryResponse data

What the receiveQuery function does:

  • Verify if Gelato's executed the function

  • Verify the proof and extract the acquisition data

    • Done through the interface by the

  • Pay fees to the

  • 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;
}
🛠️
Relayer
Relayer
Light Client Contract
Relayer