# config.json
config.json
is the configuration file used for deploying Airnode.
It is composed of four main sections:
ois
: A list of OIS objectstriggers
: A list of trigger objects, each mapping to an endpoint defined in an OIS in 1nodeSettings
: An object containing node configuration parametersid
: A UUID that specifies aconfig.json
/security.json
file pair
Contents of a config.json
file:
{
"ois": [
...
],
"triggers": {
...
},
"nodeSettings": {
...
},
"id": "..."
}
2
3
4
5
6
7
8
9
10
11
12
# ois
ois
is a list of OIS objects as described in OIS.
Since each OIS defines the integration of a single API to an oracle, this means that a node can serve multiple APIs.
However, this does not mean that nodes can be shared between multiple providers.
Each node serves the APIs of a single provider.
# triggers
triggers
are events that trigger an API call and an Ethereum transaction by Airnode.
Triggers of different types are kept in lists under their respective keys:
request
- When the node sees an event with itsproviderId
and this trigger'sendpointId
emitted from the central Airnode contract, it responds to it with the respective endpoint defined in the OIS.endpointId
oisTitle
endpointName
{
"request": [
{
"endpointId": "...",
"oisTitle": "...",
"endpointName": "..."
},
...
],
...
}
2
3
4
5
6
7
8
9
10
11
# nodeSettings
An object containing the following configuration parameters:
providerIdShort
- The label used to identify this specific provider among the cloud deployments. The deployer uses the first 7 characters of the fullproviderId
by default. For example, if theproviderId
is0x9e5a89de5a7e780b9eb5a61425a3a656f0c891ac4c56c07037d257724af490c9
,providerIdShort
would be9e5a89d
. This field must not exist for the first deployment, and must exist for redeployments.nodeVersion
- The node version thisconfig.json
is supposed to be used with. The deployer checks this and refuses to deploy if its node version does not agree with this field.cloudProvider
- The cloud provider that will be used to deploy the node. Can beaws
.region
- The cloud provider region that the node will be deployed at.stage
- The label used to distinguish between multiple deployments of the same provider on a cloud provider. For example, the provider may make multiple deployments withstage
s set asdev
,ropsten
,mainnet
, where each of these deployments would use the same private key and have the sameproviderId
.stage
cannot be longer than 16 characters and can only include alphanumeric characters (a–z
,A–Z
,0–9
) and hyphens (-
).logFormat
- The format that Airnode should use to output logs. Eitherjson
orplain
.chains
- A list of blockchain configurations. See chains below.
# nodeSettings.chains
Airnode can be configured to work with multiple blockchain providers, types and networks.
Configurations for each chain is represented with an object in this chains
list.
Required
id
- the corresponding chain (or network) ID. A list of known Ethereum chain IDs can be found at EIP-155 (opens new window), although this list is not exhaustive and theid
does not necessarily need to be a popular or known value.type
- the type of blockchain to connect to. Currently onlyevm
is supported for Ethereum and other EVM-based blockchains, although other types are planned to be supported in the future.providers
- one or more providers serving the given chain ID and type. Eachprovider
must have the following keys:name
- a unique name across ALL configured providers inconfig.json
url
- an HTTP endpoint that Airnode should use to connect to
contracts
- An object that keeps the addresses of the contracts deployed on the respective chain. It has to include the following contract addresses:Airnode
Convenience
Optional
providerAdminForRecordCreation
- the master address that will be authorized to update the authorizers of the provider's endpoints (see the protocol docs for more information). Note that the node only uses this while creating the provider record. Changing this after the provider record is created will not have any effect. This field is optional, but not having it means that the node will not be able to create a provider record on the respective chain.blockHistoryLimit
- the number of blocks in the past that Airnode should use to search for requests or events. Defaults to600
(roughly 1 hour for Ethereum).minConfirmations
- the number of confirmations required for a request or event to be considered valid. Default to0
.ignoreBlockedRequestsAfterBlocks
- the number of blocks that needs to pass for the node to start ignoring blocked requests. Defaults to20
.
An example object from the chains
list:
{
"id": 1,
"type": "evm",
"providers": [
{
"name": "my-infura-mainnet",
"url": "https://mainnet.infura.io/v3/<your key>"
},
{
"name": "secondary-mainnet",
"url": "https://..."
}
],
"contracts": {
"Airnode": "0xf1d4...0bd1",
"Convenience": "0x12ab...de56"
},
"providerAdminForRecordCreation": "0x5e00...F410",
"blockHistoryLimit": 600,
"minConfirmations": 6,
"ignoreBlockedRequestsAfterBlocks": 20,
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Example
A more complete example of a nodeSettings
configuration:
{
"providerIdShort": "9e5a89d",
"nodeVersion": "0.1.0",
"cloudProvider": "aws",
"region": "us-east-1",
"stage": "testnet",
"logFormat": "plain",
"chains": [
{
"id": 1,
"type": "evm",
"providers": [
{
"name": "infura-mainnet",
"url": "https://mainnet.infura.io/v3/<your key>"
}
],
"providerAdminForRecordCreation": "0x5e00...F410",
"blockHistoryLimit": 600,
"minConfirmations": 0,
"ignoreBlockedRequestsAfterBlocks": 20
},
{
"id": 3,
"type": "evm",
"providers": [
{
"name": "infura-ropsten",
"url": "https://ropsten.infura.io/v3/<your key>"
}
],
"contracts": {
"Airnode": "0xf1d4...0bd1"
},
"providerAdminForRecordCreation": "0x5e00...F410"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# id
A UUID for the specific config.json
file and its corresponding security.json
file.