📂 Concepts and Definitions

# Request-Response Protocol

Table of Contents

The first protocol implemented for Airnode is request–response. An Airnode serving the request–response protocol listens for requests, makes the API call specified by the request, and finally makes the response transaction back on chain.

# Contracts

This sections briefly describes the structure of the request response protocol contracts. You can find more information in the source files on github (opens new window).

The request–response protocol is implemented as a single permissionless contract that all Airnodes interact with, which is named AirnodeRrpV0.sol. This base contract has the following inheritance tree that compartmentalizes the aspects of the protocol.

# AirnodeRrpV0.sol

The AirnodeRrpV0.sol (opens new window) contract sits between a requester and the Airnode. It inherits from four additional contracts as illustrated in the diagram above:

This contract has two key responsibilities:

  • It is used by requesters to make requests.
  • It is used by Airnodes to fulfill requests.

However, this contract is shared for all requesters and Airnodes on a particular chain. This means that neither Airnode operators nor requesters need to deploy this contract themselves. Instead, API3 will deploy this contract once per chain and you simply connect your Airnode or requester contract to that deployed contract. See the Airnode Contract Addresses for reference.

The @api3/airnode-admin package is a CLI tool used to interact with AirnodeRrpV0.sol and perform administrative actions.

# IAirnodeRrpV0.sol

The IAirnodeRrpV0.sol (opens new window) interface describes all functions and events of the AirnodeRrpV0.sol contract which implements this interface.

This interface inherits:

# AuthorizationUtilsV0.sol

The AuthorizationUtilsV0.sol (opens new window) contract implements Airnode Authorizer checks.

# WithdrawalUtilsV0.sol

The WithdrawalUtilsV0.sol (opens new window) contract allows the sponsor to trigger a withdrawal request which is later fulfilled by Airnode and all sponsor wallet funds are sent back to the sponsor.

# TemplateUtilsV0.sol

The TemplateUtilsV0.sol (opens new window) contract is used to create and store Airnode templates used to create a template request.

Last Updated: 2/7/2023, 3:43:12 AM