{"id":22421816,"url":"https://github.com/ringecosystem/airnode-config","last_synced_at":"2025-07-01T07:06:24.585Z","repository":{"id":178501211,"uuid":"655492661","full_name":"ringecosystem/airnode-config","owner":"ringecosystem","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-13T01:58:54.000Z","size":41,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-27T05:18:22.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ringecosystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-19T02:42:13.000Z","updated_at":"2023-11-21T07:49:29.000Z","dependencies_parsed_at":"2023-10-19T05:34:30.540Z","dependency_job_id":"e3973855-124d-4bac-9dd6-1088f751d46a","html_url":"https://github.com/ringecosystem/airnode-config","commit_stats":null,"previous_names":["darwinia-network/darwinia-airnode","darwinia-oracle-dao/darwinia-airnode","subapidao/darwinia-airnode","subapidao/airnode-config","xapi-box/airnode-config","ringecosystem/airnode-config"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ringecosystem/airnode-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringecosystem%2Fairnode-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringecosystem%2Fairnode-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringecosystem%2Fairnode-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringecosystem%2Fairnode-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringecosystem","download_url":"https://codeload.github.com/ringecosystem/airnode-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringecosystem%2Fairnode-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262916618,"owners_count":23383885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T17:09:39.431Z","updated_at":"2025-07-01T07:06:24.548Z","avatar_url":"https://github.com/ringecosystem.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SubAPI Airnode config\n\nThis is an airnode config for subAPI to retrieve message root and submit them to contract. [More about airnode](https://docs.api3.org/reference/airnode/latest/understand/)\n\n## How to use this config\n\n### Prerequisites\n\n1. Clone this repo and create your own `secrets.env` file. Please note that this file will contain your private information, do not make it public\n\n2. Generate airnode mnemonic, and then fill the field `AIRNODE_WALLET_MNEMONIC` in secrets.env with this mnemonic\n\n    ```shell\n    npm install -g @api3/airnode-admin\n    npx @api3/airnode-admin generate-airnode-mnemonic\n\n    # Save the mnemonic \u0026 xpub\n    ```\n\n3. (Temporarily disabled) Choose an API provider, such as [Infura](https://app.infura.io/dashboard) or [Alchemy](https://dashboard.alchemy.com/), and then create an API key.\nHere we need the Arbitrum mainnet and Arbitrum Goerli API. And then set it in `secrets.env`\n\n4. If you forgot to save your xpub address, you can generate it with this command\n\n    ```shell\n    npx @api3/airnode-admin derive-airnode-xpub \\\n    --airnode-mnemonic \"cricket elephant ...\"\n    ```\n\n## Deploy\n\n### Install jq\n\nFor Ubuntu or Debian: `apt install jq`\n\n### Deploy via GCP\n\nProject folder\n\n```shell\ndarwinia-airnode\n├── config.json\n├── gcp.json\n├── secrets.env\n└── scripts\n```\n\n1. First [create a GCP project➚](https://cloud.google.com/resource-manager/docs/creating-managing-projects) (or use an existing GCP project) where the Airnode will be deployed. Once the project is created, add the project ID to the [secrets.env](secrets.env.example) file.\n\n2. Make sure you have billing enabled for your project. To do so, you will need to pair the project with your bank card, although no charges will be incurred since the resource usage fits well within the free tier limit.\n\n3. In order for Airnode to deploy successfully, you need to enable the [App Engine Admin API➚](https://console.cloud.google.com/apis/library/appengine.googleapis.com) specifically for the project. After enabling it, wait a few minutes before deploying the Airnode for this change to take effect.\n\n4. Create a new service account from the [IAM and admin \u003e Service accounts➚](https://console.cloud.google.com/) menu. Grant this account access to the project by adding the role Owner during creation.\n\n5. Once the new service account is created, click on it to bring up its management page. Select the KEYS tab and add a new access key of type JSON for this account. Download the key file and place in the root of the `/darwinia-airnode` project directory. Rename it gcp.json.\n\n6. Set `CLOUD_PROVIDER=gcp` in secrets.env also update `region` and `projectId` fields.\n\n7. Deploy\n\n    ```shell\n    ./scripts/deploy-cloud.sh\n    ```\n\n    Save the HTTP gateway URL, and we can test the airnode by it.\n\n8. Save the receipt.json, this file is used to remove the Airnode.\n\n### Deploy via AWS\n\nProject Folder\n\n```shell\ndarwinia-airnode\n├── aws.env\n├── config.json\n├── secrets.env\n└── scripts\n```\n\n1. Add the access credentials in `aws.env` from your AWS account. If you don't have an account watch this [video➚](https://www.youtube.com/watch?v=KngM5bfpttA) to create one.\n\n    ```shell\n    AWS_ACCESS_KEY_ID: Is ACCESS_KEY_ID in IAM.\n    AWS_SECRET_ACCESS_KEY: Is SECRET_ACCESS_KEY in IAM.\n    ```\n\n2. Set `CLOUD_PROVIDER=aws` in secrets.env also update `region` field.\n\n3. Deploy\n\n    ```shell\n    ./scripts/deploy-cloud.sh\n    ```\n\n    Save the HTTP gateway URL, and we can test the airnode by it.\n\n4. Save the receipt.json, this file is used to remove the Airnode.\n\n### Remove with receipt\n\nWhen an Airnode was deployed using the deploy command, a receipt.json file was created. This file is used to remove the Airnode.\n\n```shell\n./scripts/remove-cloud.sh\n```\n\n### Deploy Local\n\n1. Install Docker\n\n2. Set CLOUD_PROVIDER=local in secrets.env\n\n    ```shell\n    ./scripts/deploy-local.sh\n    ```\n\n## Request to join subAPI\n\n[New Application](https://github.com/subapidao/subapi/issues/new?assignees=hujw77\u0026labels=application\u0026projects=\u0026template=airnode_application.yml\u0026title=%5BApplication%5D%3A+%3Ctitle%3E)\n\n## Check\n\n### Check API\n\n- Check Crab Message Root:\n\n    ```bash\n    curl -X POST -H 'Content-Type: application/json' http://localhost:3000/http-data/01234567-abcd-abcd-abcd-012345678abc/0x23e5743c946604a779a5181a1bf621076cd11687a1f21c8bc2fa483bd704b3ab -d '{\"parameters\": {}}'\n\n    # Example Result: {\"rawValue\":{\"jsonrpc\":\"2.0\",\"result\":\"0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000027ae5ba08d7291c96c8cbddcc148bf48a6d68c7974b94356f53754ef6171d757\",\"id\":\"1\"},\"encodedValue\":\"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000027ae5ba08d7291c96c8cbddcc148bf48a6d68c7974b94356f53754ef6171d757\",\"values\":[\"0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000027ae5ba08d7291c96c8cbddcc148bf48a6d68c7974b94356f53754ef6171d757\"]}\n    ```\n\n- Check Darwinia Message Root:\n\n    ```bash\n    curl -X POST -H 'Content-Type: application/json' http://localhost:3000/http-data/01234567-abcd-abcd-abcd-012345678abc/0x45189e2288f2d2e384c9e3be7c3c6cef65a553341ca8580e1ed3516725112bb4 -d '{\"parameters\": {}}'\n    ```\n\n- Check ArbitrumSepolia Message Root:\n\n    ```bash\n    curl -X POST -H 'Content-Type: application/json' http://localhost:3000/http-data/01234567-abcd-abcd-abcd-012345678abc/0xe7fe8a321e9c000326638d5187a650e3f9d0652f30a01ad9ae4a60327e6c5277 -d '{\"parameters\": {}}'\n\n    # Example Result: {\"rawValue\":{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"result\":\"0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000027ae5ba08d7291c96c8cbddcc148bf48a6d68c7974b94356f53754ef6171d757\"},\"encodedValue\":\"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000027ae5ba08d7291c96c8cbddcc148bf48a6d68c7974b94356f53754ef6171d757\",\"values\":[\"0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000027ae5ba08d7291c96c8cbddcc148bf48a6d68c7974b94356f53754ef6171d757\"]}\n    ```\n\n- Check Arbitrum Message Root:\n\n    ```bash\n    curl -X POST -H 'Content-Type: application/json' http://localhost:3000/http-data/01234567-abcd-abcd-abcd-012345678abc/0x18905d41e909c79069d74843dc474d0809df62b5bc555ea272b0cc49ff3fa924 -d '{\"parameters\": {}}'\n    ```\n\n### Check Sponsor\n\n1. Check on Crab\n\n    ```bash\n    # Replace \u003cSPONSOR_ADDRESS\u003e with your sponsor address without '0x'. For example: 9F33a4809aA708d7a399fedBa514e0A0d15EfA85\n    curl -fsS https://darwiniacrab-rpc.dwellir.com -d '{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"data\":\"0xa81e9f79000000000000000000000000\u003cSPONSOR_ADDRESS\u003e00000000000000000000000000000000007317c91F57D86A410934A490E62E1E\",\"from\":\"0x0f14341A7f464320319025540E8Fe48Ad0fe5aec\",\"gas\":\"0x1312d00\",\"to\":\"0x6084A81dB23169F8a7BB5fa67C8a78ff9abA9819\"},\"latest\"]}' -H 'Content-Type: application/json'\n\n    # Result should be: {\"jsonrpc\":\"2.0\",\"result\":\"0x0000000000000000000000000000000000000000000000000000000000000001\",\"id\":1}\n\n    ## examples\n    curl -fsS https://darwiniacrab-rpc.dwellir.com -d '{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"data\":\"0xa81e9f790000000000000000000000009F33a4809aA708d7a399fedBa514e0A0d15EfA8500000000000000000000000000000000007317c91F57D86A410934A490E62E1E\",\"from\":\"0x0f14341A7f464320319025540E8Fe48Ad0fe5aec\",\"gas\":\"0x1312d00\",\"to\":\"0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd\"},\"latest\"]}' -H 'Content-Type: application/json'\n    ```\n\n2. Check on ArbitrumSepolia\n\n    ```bash\n    # Replace \u003cSPONSOR_ADDRESS\u003e with your sponsor address without '0x'. For example: 9F33a4809aA708d7a399fedBa514e0A0d15EfA85\n    curl -fsS https://sepolia-rollup.arbitrum.io/rpc -d '{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"data\":\"0xa81e9f79000000000000000000000000\u003cSPONSOR_ADDRESS\u003e00000000000000000000000000000000007317c91F57D86A410934A490E62E1E\",\"from\":\"0x0f14341A7f464320319025540E8Fe48Ad0fe5aec\",\"gas\":\"0x1312d00\",\"to\":\"0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd\"},\"latest\"]}' -H 'Content-Type: application/json'\n\n    # Result should be: {\"jsonrpc\":\"2.0\",\"result\":\"0x0000000000000000000000000000000000000000000000000000000000000001\",\"id\":1}\n\n    ## examples\n    curl -fsS https://sepolia-rollup.arbitrum.io/rpc -d '{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"data\":\"0xa81e9f790000000000000000000000009F33a4809aA708d7a399fedBa514e0A0d15EfA8500000000000000000000000000000000007317c91F57D86A410934A490E62E1E\",\"from\":\"0x0f14341A7f464320319025540E8Fe48Ad0fe5aec\",\"gas\":\"0x1312d00\",\"to\":\"0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd\"},\"latest\"]}' -H 'Content-Type: application/json'\n    ```\n\n## How to upgrade?\n\n```bash\ncd \u003cYour config directory\u003e\ngit checkout main\ngit pull\n./scripts/deploy-local.sh  # The script you used before\n```\n\n## Sponsor (Optional)\n\n### Install airnode-admin-cli\n\n1. npm install npx\n2. npm install @api3/airnode-admin\n3. export PRIVATE_MNEMONIC=\"YOUR WALLET MNEMONIC\"\n\n### Sponsor requester\n\nPlease note that you need to run this command **on each chain** to sponsor different requester. Currently: Crab \u0026 ArbitrumSepolia.\n\nAnd this command will submit a transaction, the sponsor-mnemonic wallet should have some token to pay the extrinsic fee.\n\n```shell\nnpx @api3/airnode-admin sponsor-requester \\\n --provider-url \u003cNetwork RPC\u003e \\\n --sponsor-mnemonic \"${PRIVATE_MNEMONIC}\" \\\n --requester-address \u003cREQUESTER CONTRACT ADDRESS\u003e \\ # Get from subAPI: \u003chttps://github.com/subapidao/subapi#readme\u003e\n --airnode-rrp-address \u003cRRP CONTRACT ADDRESS\u003e   # Listed below. RRP Contract Addresses\n\n## examples\nnpx @api3/airnode-admin sponsor-requester \\\n --providerUrl https://sepolia-rollup.arbitrum.io/rpc \\\n --sponsor-mnemonic \"${PRIVATE_MNEMONIC}\" \\\n --requester-address 0x00000000096c285629Fe3EAb3dd042c27b9dcBa6 \\\n --airnode-rrp-address 0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd\n\nnpx @api3/airnode-admin sponsor-requester \\\n --providerUrl https://darwiniacrab-rpc.dwellir.com \\\n --sponsor-mnemonic \"${PRIVATE_MNEMONIC}\" \\\n --requester-address 0x00000000096c285629Fe3EAb3dd042c27b9dcBa6 \\\n --airnode-rrp-address 0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd\n\n npx @api3/airnode-admin sponsor-requester \\\n --providerUrl https://rpc.sepolia.org \\\n --sponsor-mnemonic \"${PRIVATE_MNEMONIC}\" \\\n --requester-address 0x00000000096c285629Fe3EAb3dd042c27b9dcBa6 \\\n --airnode-rrp-address 0x2ab9f26E18B64848cd349582ca3B55c2d06f507d\n```\n\n\u003e Requester address 0x1234... is now sponsored by 0x456...\n\n### Derive sponsor wallet\n\n```shell\nnpx @api3/airnode-admin derive-sponsor-wallet-address \\\n  --airnode-xpub \u003cAIRNODE XPUB ADDRESS\u003e \\ # Refer to **Prerequisites** Part, Step 4\n  --airnode-address \u003cAIRNODE PUB ADDRESS\u003e \\\n  --sponsor-address \u003cSPONSOR PUB ADDRESS\u003e # This is the public key corresponding to the mnemonic address you used in the previous step.\n\n## examples\nnpx @api3/airnode-admin derive-sponsor-wallet-address \\\n  --airnode-xpub xpub6DWQQABWBAU9NrbC9K965k1RsmLRkVaiTmU7rkhjsB6x8ExvuwxJW883j7uwVSY6ZEsR6jsVcZ9FF3KQDnE4s6sX6FWm3ZhbTSjzwpDcSSC \\\n  --airnode-address 0x1F7A2204b2c255AE6501eeCE29051315ca0aefa4 \\\n  --sponsor-address 0x9F33a4809aA708d7a399fedBa514e0A0d15EfA85\n```\n\n\u003e Sponsor wallet address: 0x1234...\n\n### Request withdrawal\n\n```shell\n## examples https://docs.api3.org/reference/airnode/latest/packages/admin-cli.html#request-withdrawal\nnpx @api3/airnode-admin request-withdrawal \\\n  --provider-url https://darwiniacrab-rpc.dwellir.com \\\n  --sponsor-mnemonic \"${PRIVATE_MNEMONIC}\" \\\n  --airnode-address 0x1F7A2204b2c255AE6501eeCE29051315ca0aefa4 \\\n  --airnode-rrp-address 0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd \\\n  --sponsor-wallet-address 0x9674dc5e867014Ba91E6d53753BcA5D2abcFF9E3\n\nnpx @api3/airnode-admin request-withdrawal \\\n  --provider-url https://sepolia-rollup.arbitrum.io/rpc \\\n  --sponsor-mnemonic \"${PRIVATE_MNEMONIC}\" \\\n  --airnode-address 0x1F7A2204b2c255AE6501eeCE29051315ca0aefa4 \\\n  --airnode-rrp-address 0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd \\\n  --sponsor-wallet-address 0x9674dc5e867014Ba91E6d53753BcA5D2abcFF9E3\n```\n\n## Develop\n\n### Derive endpoint id\n\n```bash\nnpx @api3/airnode-admin derive-endpoint-id \\\n  --ois-title \"Crab Message Root\" \\\n  --endpoint-name \"CrabMessageRoot\"\n\nnpx @api3/airnode-admin derive-endpoint-id \\\n  --ois-title \"Arbitrum Sepolia Message Root\" \\\n  --endpoint-name \"ArbitrumSepoliaMessageRoot\"\n\nnpx @api3/airnode-admin derive-endpoint-id \\\n  --ois-title \"Sepolia Message Root\" \\\n  --endpoint-name \"SepoliaMessageRoot\"\n\nnpx @api3/airnode-admin derive-endpoint-id \\\n  --ois-title \"Ethereum Message Root\" \\\n  --endpoint-name \"EthereumMessageRoot\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringecosystem%2Fairnode-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringecosystem%2Fairnode-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringecosystem%2Fairnode-config/lists"}