Axiom V2 Docs Old
  • Introduction
    • What is Axiom?
    • Quickstart
  • Examples
    • Autonomous Airdrop
      • AxiomREPL Code
      • Contract
      • Web App
      • DataQuery-only Version
  • Developers
    • Axiom for Developers
    • Specifying a Query into Axiom
    • AxiomREPL
      • AxiomREPL Examples
    • Exporting a Client Side Prover
    • Handling Axiom Callbacks
    • Common Issues
      • Callback Debugging
  • SDK and REPL Reference
    • Axiom SDK Reference
      • QueryBuilderV2
      • Data Subqueries
        • Header Subquery
        • Account Subquery
        • Storage Subquery
        • Transaction Subquery
        • Receipt Subquery
        • Solidity Nested Mapping Subquery
    • AxiomREPL Reference
      • Circuit Types
      • Circuit Functions
      • Data Functions
      • Compute Functions
  • Protocol Design
    • Architecture Overview
    • Caching Block Hashes
    • Axiom Query Protocol
      • Axiom Query Format
    • ZK Circuits for Axiom Queries
    • Ethereum On-chain Data
    • Guardrails
  • Transparency and Security
    • KZG Trusted Setup
    • Contract Addresses
    • On-chain ZK Verifiers
    • Security
  • Zero Knowledge Proofs
    • Introduction to ZK
    • ZK Examples
    • Getting Started with halo2
    • halo2-repl
  • Additional Resources
    • Axiom V2 Explorer
    • Github
    • Website
    • Telegram
    • Discord
    • Axiom V1 Docs
Powered by GitBook
On this page
  • Description
  • Limits
  • Builder
  • Examples
  1. SDK and REPL Reference
  2. Axiom SDK Reference
  3. Data Subqueries

Receipt Subquery

Get data fields from a Receipt and its Logs/Events

PreviousTransaction SubqueryNextSolidity Nested Mapping Subquery

Last updated 1 year ago

Description

Receipt Subqueries provide information about a completed transaction and any logs/events emitted. provides a lot of useful information when looking at this data.

Limits

Maximum of 32 Receipt subqueries per Query. Each receipt can have a data field of at most 512 bytes and can have at most 20 logs.

Builder

buildReceiptSubquery(txHash)

Examples

const txHash = "0x9890aaedc5df95de7d535faf10c8d1a96a262b79e0fcb2ed52939c8ebd049d29";
const schema = getEventSchema("Deposit (index_topic_1 address dst, uint256 wad)");
const receiptSubquery: ReceiptSubquery = buildReceiptSubquery(txHash)
      .log(0) // log at index 0
      .topic(1) // topic 1: address dst
      .eventSchema(schema);
const txHash = "0x9890aaedc5df95de7d535faf10c8d1a96a262b79e0fcb2ed52939c8ebd049d29";
const receiptSubquery: ReceiptSubquery = buildReceiptSubquery(txHash)
      .txType();
const txHash = "0x9890aaedc5df95de7d535faf10c8d1a96a262b79e0fcb2ed52939c8ebd049d29";
const receiptSubquery: ReceiptSubquery = buildReceiptSubquery(txHash)
      .log(0)
      .address(); // address of contract that emitted the event at log index 0
Etherscan (Goerli)
Etherscan link for below transaction log
(corresponds to code block below) Log at index 0 (out of length 5), where topic 1 is address dst