Steps:
- Update the Oracle’s
config.toml
file and include the new indexed chain under theindexed_chains
table:[indexed_chains] "previous-chain-1-id" = "http://example-1.rpc" "previous-chain-2-id" = "http://example-2.rpc" "new-chain-id" = "http://new-example.rpc" # <-- new indexed chain
The entry is formatted such as the key is the Network Identifier and the value is the HTTP endpoint to the respective RPC provider.
- Restart the
block-oracle
binary for configuration to be reloaded. - Send a
RegisterNetworks
message to the DataEdge contract that reflects the newly added chain. You can use the Block Oracle Encoder for this:[ { "add": [ "new-chain-id" ], "message": "RegisterNetworks", "remove": [] } ]
Note that the chain ID used in the message should be exactly the same as the one included in the configuration file.
- The Block Oracle will only include the new indexed chain latest blocks in its
SetBlockNumbersForEpochMessage
when the Epoch Subgraph successfully indexes the relevantRegisterNetworks
message. - After the Epoch Subgraph is up to date and the new indexed chain can be queried from it, the Block Oracle will include the latest block information for that chain on every
SetBlockNumbersForEpochMessage
message it sends to the DataEdge contract.