Extracting Airnode RRP usage data from blockchains

I needed to gather Airnode usage data for a report Messari is working on and didn’t have a convenient way to get it so I put together a command line script to do it. Feel free to try if you’re command-line-savvy and interested in digging through Airnode usage data.

RRP Logs Command

$ rrplogs --help

Usage: rrplogs <event type | command>

Commands:
  rrplogs MadeFullRequest       Search                           [aliases: full]
  rrplogs MadeTemplateRequest   Search                       [aliases: template]
  rrplogs FulfilledRequest      Search                      [aliases: fulfilled]
  rrplogs FailedRequest         Search                         [aliases: failed]
  rrplogs SetSponsorshipStatus  Search                        [aliases: sponsor]
  rrplogs RequestedWithdrawal   Search                       [aliases: withdraw]
  rrplogs FulfilledWithdrawal   Search                       [aliases: withdrew]
  rrplogs all                   Search for all event types
  rrplogs networks              List all available networks
  rrplogs dates                 Add date column to CSV file

Options:
      --version  Show version number                                   [boolean]
  -n, --network  Network: ethereum, polygon, ...           [default: "ethereum"]
  -f, --from     From block number or ISO8601 date                [default: "0"]
  -t, --to       To block number or ISO8601 date             [default: "latest"]
  -b, --by       Number of blocks per query                             [number]
  -w, --wait     Seconds to wait between queries                        [number]
  -o, --output   json, csv, or file name ending with .json or .csv
      --help     Show help                                             [boolean]

It’s been handy for me and I’m happy to maintain it if others find it useful. There are a number of examples in the Readme. It’s also capable of getting dAPI logs but basic RRP is currently more interesting since QRNG is already in production.

Very cool! I’ll just mention that querying API3 deployed contract addresses may somewhat underestimate usage because folks following any of the airnode-examples monorepo integrations were deploying their own RRP contract as part of the flow. Airnode 0.8.0 now defaults to the API3 deployed contract address per #1395.

That’s a good point. Is there a way to search for all instances of Airnode RRP contracts including those self-deployed?

I did a little poking around, for example using Etherscan’s Similar Contract Search, but without much luck. I imagine there is a better way to search though.