# Request-Response Protocol
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 AirnodeRrp.sol
. This base
contract has the following inheritance tree that compartmentalizes the aspects
of the protocol.
# AirnodeRrp.sol
The AirnodeRrp.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 AirnodeRrp.sol
and perform administrative actions.
# IAirnodeRrp.sol
The
IAirnodeRrp.sol (opens new window)
interface describes all functions and events of the AirnodeRrp.sol
contract
which implements this interface.
This interface inherits:
- IAuthorizationUtils.sol (opens new window)
- IWithdrawalUtils.sol (opens new window)
- ITemplateUtils.sol (opens new window)
# AuthorizationUtils.sol
The AuthorizationUtils.sol (opens new window) contract implements Airnode Authorizer checks.
# WithdrawalUtils.sol
The WithdrawalUtils.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.
# TemplateUtils.sol
The TemplateUtils.sol (opens new window) contract is used to create and store Airnode templates used to create a template request.