Skip to content

Latest commit

 

History

History
73 lines (60 loc) · 6.72 KB

File metadata and controls

73 lines (60 loc) · 6.72 KB

Chainlink External Adapter for Layer 2 Sequencer Health Check

Adapter that checks the Layer 2 Sequencer status

Environment Variables

Required? Name Description Options Defaults to
DELTA_BLOCKS Maximum allowed number of blocks that Nodes can fall behind 6
NETWORK_TIMEOUT_LIMIT Maximum time in milliseconds to wait for a transaction receipt 5000 (5 secs)
ARBITRUM_HEALTH_ENDPOINT Arbitrum Health Endpoint
ARBITRUM_CHAIN_ID The chain id to connect to Arbitrum 42161
ARBITRUM_DELTA Maximum time in milliseconds from last seen block to consider Arbitrum sequencer healthy 120000 (2 min)
OPTIMISM_RPC_ENDPOINT Optimism RPC Endpoint https://mainnet.optimism.io
OPTIMISM_HEALTH_ENDPOINT Optimism Health Endpoint
OPTIMISM_CHAIN_ID The chain id to connect to Optimism 10
OPTIMISM_DELTA Maximum time in milliseconds from last seen block to consider Optimism sequencer healthy 120000 (2 min)
BASE_RPC_ENDPOINT Base RPC Endpoint https://mainnet.base.org
BASE_HEALTH_ENDPOINT Base Health Endpoint
BASE_CHAIN_ID The chain id to connect to Base 8453
BASE_DELTA Maximum time in milliseconds from last seen block to consider Base sequencer healthy 120000 (2 min)
METIS_RPC_ENDPOINT Metis RPC Endpoint https://andromeda.metis.io/?owner=1088
METIS_HEALTH_ENDPOINT Metis Health Endpoint https://andromeda-healthy.metisdevops.link/health
METIS_CHAIN_ID The chain id to connect to Metis 1088
METIS_DELTA Maximum time in milliseconds from last seen block to consider Metis sequencer healthy 600000 (10 min)
SCROLL_RPC_ENDPOINT Scroll RPC Endpoint https://rpc.scroll.io
SCROLL_HEALTH_ENDPOINT Scroll Health Endpoint
SCROLL_CHAIN_ID The chain id to connect to Scroll 534352
SCROLL_DELTA Maximum time in milliseconds from last seen block to consider Scroll sequencer healthy 120000 (2 min)
STARKWARE_RPC_ENDPOINT Starkware RPC Endpoint https://starknet-mainnet.public.blastapi.io
STARKWARE_DUMMY_ACCOUNT_ADDRESS The dummy address to use to send dummy transactions to Starkware 0x00000000000000000000000000000000000000000000000000000000000001
STARKWARE_DELTA Maximum time in milliseconds from last seen block to consider Starkware sequencer healthy 120000 (2 min)
STARKWARE_DUMMY_ACCOUNT_ADDRESS The dummy address to use to send dummy transactions to Starkware 0x00000000000000000000000000000000000000000000000000000000000001

For the adapter to be useful on the desired network, at least one endpoint (RPC or HEALTH) needs to provided


Input Parameters

Required? Name Description Options Defaults to
network Layer 2 Network to check arbitrum, optimism, base, metis, scroll, starkware

Sample Input

{
  "id": "1",
  "data": {
    "network": "arbitrum"
  }
}

Sample Output

0 = Sequencer is healthy 1 = Sequencer is unhealthy

{
  "jobRunID": "1",
  "result": 0,
  "statusCode": 200,
  "data": {
    "isHealthy": true,
    "result": 0
  }
}