Backend ENVs: Chain-Specific

ENVS for specific chains and rollups

Chain Specific ENVs

The following ENVs are specific to different types of chains and rollups. To use these specific variables you will also need to set the CHAIN_TYPE variable to the appropriate chain.

VariableDescriptionParameters

CHAIN_TYPE

Specifies the model of data and enables fetchers specific to the chain. Available values are ethereum, optimism, arbitrum, polygon_zkevm, polygon_edge, rsk, scroll, shibarium, stability, suave, zetachain, filecoin, default.

Needs Recompile: ☑️ Version: v5.3.0+ Default: default Applications: API, Indexer

Time format

Can be set in format 1h for 1 hour, 1m for 1 minute, 1s or 1 for 1 second, 1ms for 1 millisecond

Note: Before release 5.1.2, all environment variables of time format supported only integers in seconds (without dimensions) as values.

Ethereum Management

VariableDescriptionParameters

INDEXER_BEACON_RPC_URL

Version: v6.2.0+ Default: http://localhost:5052 Applications: Indexer

INDEXER_DISABLE_BEACON_BLOB_FETCHER

Version: v6.2.0+ Default: false Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_SLOT_DURATION

Version: v6.2.0+ Default: 12 Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_REFERENCE_SLOT

Version: v6.2.0+ Default: 8000000 Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_REFERENCE_TIMESTAMP

Version: v6.2.0+ Default: 1702824023 Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_START_BLOCK

Version: v6.2.0+ Default: 19200000 Applications: Indexer

INDEXER_BEACON_BLOB_FETCHER_END_BLOCK

Version: v6.2.0+ Default: 0 Applications: Indexer

Polygon Edge Management

Polygon edge is no longer supported by the Polygon team in favor of the Polygon CDK - more info

VariableDescriptionParameters

INDEXER_POLYGON_EDGE_L1_RPC

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_L1_EXIT_HELPER_CONTRACT

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_L1_WITHDRAWALS_START_BLOCK

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_L1_STATE_SENDER_CONTRACT

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_L1_DEPOSITS_START_BLOCK

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_L2_STATE_SENDER_CONTRACT

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_L2_WITHDRAWALS_START_BLOCK

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_L2_STATE_RECEIVER_CONTRACT

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_L2_DEPOSITS_START_BLOCK

Version: v5.3.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_EDGE_ETH_GET_LOGS_RANGE_SIZE

Version: v5.3.0+ Default: (empty) Applications: Indexer

Rootstock Management

VariableDescriptionParameters

ROOTSTOCK_REMASC_ADDRESS

Version: v5.3.0+ Default: (empty) Applications: API

ROOTSTOCK_BRIDGE_ADDRESS

Version: v5.3.0+ Default: (empty) Applications: API

INDEXER_DISABLE_ROOTSTOCK_DATA_FETCHER

Version: v5.3.2+ Default: (empty) Applications: Indexer

INDEXER_ROOTSTOCK_DATA_FETCHER_INTERVAL

Version: v5.3.2+ Default: (empty) Applications: Indexer

INDEXER_ROOTSTOCK_DATA_FETCHER_BATCH_SIZE

Version: v5.3.2+ Default: (empty) Applications: Indexer

INDEXER_ROOTSTOCK_DATA_FETCHER_CONCURRENCY

Version: v5.3.2+ Default: (empty) Applications: Indexer

INDEXER_ROOTSTOCK_DATA_FETCHER_DB_BATCH_SIZE

Version: v5.3.2+ Default: (empty) Applications: Indexer

Scroll management

VariableDescriptionParameters

INDEXER_SCROLL_L1_RPC

Version: v6.9.0+ Default: (empty) Applications: Indexer

INDEXER_SCROLL_L1_CHAIN_CONTRACT

Version: v6.9.0+ Default: (empty) Applications: Indexer

INDEXER_SCROLL_L1_BATCH_START_BLOCK

Version: v6.9.0+ Default: (empty) Applications: Indexer

INDEXER_SCROLL_L1_MESSENGER_CONTRACT

Version: v6.9.0+ Default: (empty) Applications: Indexer

INDEXER_SCROLL_L1_MESSENGER_START_BLOCK

Version: v6.9.0+ Default: (empty) Applications: Indexer

INDEXER_SCROLL_L2_MESSENGER_CONTRACT

Version: v6.9.0+ Default: (empty) Applications: Indexer

INDEXER_SCROLL_L2_MESSENGER_START_BLOCK

Version: v6.9.0+ Default: FIRST_BLOCK Applications: Indexer

INDEXER_SCROLL_L2_GAS_ORACLE_CONTRACT

Version: v6.9.0+ Default: (empty) Applications: Indexer

INDEXER_SCROLL_L1_ETH_GET_LOGS_RANGE_SIZE

Version: v6.9.0+ Default: 250 Applications: Indexer

INDEXER_SCROLL_L2_ETH_GET_LOGS_RANGE_SIZE

Version: v6.9.0+ Default: 1000 Applications: Indexer

SCROLL_L2_CURIE_UPGRADE_BLOCK

Version: v6.9.0+ Default: 0 Applications: API

SCROLL_L1_SCALAR_INIT

Version: v6.9.0+ Default: 0 Applications: API

SCROLL_L1_OVERHEAD_INIT

Version: v6.9.0+ Default: 0 Applications: API

SCROLL_L1_COMMIT_SCALAR_INIT

Version: v6.9.0+ Default: 0 Applications: API

SCROLL_L1_BLOB_SCALAR_INIT

Version: v6.9.0+ Default: 0 Applications: API

SCROLL_L1_BASE_FEE_INIT

Version: v6.9.0+ Default: 0 Applications: API

SCROLL_L1_BLOB_BASE_FEE_INIT

Version: v6.9.0+ Default: 0 Applications: API

Shibarium Management

VariableDescriptionParameters

INDEXER_SHIBARIUM_L1_RPC

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L1_START_BLOCK

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L1_DEPOSIT_MANAGER_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L1_ETHER_PREDICATE_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L1_ERC20_PREDICATE_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L1_ERC721_PREDICATE_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L1_ERC1155_PREDICATE_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L1_WITHDRAW_MANAGER_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L2_START_BLOCK

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L2_CHILD_CHAIN_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L2_WETH_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

INDEXER_SHIBARIUM_L2_BONE_WITHDRAW_CONTRACT

Version: v6.1.0+ Default: (empty) Applications: Indexer

Polygon zkEVM Rollup Management

VariableDescriptionParameters

INDEXER_POLYGON_ZKEVM_BATCHES_ENABLED

Version: v5.3.1+ Default: false Applications: Indexer

INDEXER_POLYGON_ZKEVM_BATCHES_CHUNK_SIZE

Version: v5.3.1+ Default: 20 Applications: Indexer

INDEXER_POLYGON_ZKEVM_BATCHES_RECHECK_INTERVAL

Version: v5.3.1+ Default: 60 Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_RPC

Version: v6.2.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_START_BLOCK

Version: v6.2.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_CONTRACT

Version: v6.2.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_NETWORK_ID

Version: v6.4.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_ROLLUP_INDEX

Version: v6.4.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_NATIVE_SYMBOL

Version: v6.2.0+ Default: ETH Applications: Indexer

INDEXER_POLYGON_ZKEVM_L1_BRIDGE_NATIVE_DECIMALS

Version: v6.2.0+ Default: 18 Applications: Indexer

INDEXER_POLYGON_ZKEVM_L2_BRIDGE_START_BLOCK

Version: v6.2.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_ZKEVM_L2_BRIDGE_CONTRACT

Version: v6.2.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_ZKEVM_L2_BRIDGE_NETWORK_ID

Version: v6.4.0+ Default: (empty) Applications: Indexer

INDEXER_POLYGON_ZKEVM_L2_BRIDGE_ROLLUP_INDEX

Version: v6.4.0+ Default: (empty) Applications: Indexer

Optimism Rollup Management

Supported together with ENV setting CHAIN_TYPE=optimism

VariableDescriptionParameters

INDEXER_OPTIMISM_L1_RPC

Version: v6.3.0+ Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_SYSTEM_CONFIG_CONTRACT

Version: v6.8.0+ Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_BLOCKSCOUT_BLOBS_API_URL

Version: v6.3.0+ Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_CELESTIA_BLOBS_API_URL

Version: v6.8.0+ Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_BLOCKS_CHUNK_SIZE

Version: v6.3.0+ Default: 4 Applications: Indexer

INDEXER_OPTIMISM_L2_BATCH_GENESIS_BLOCK_NUMBER

Version: v6.3.0+ Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_OUTPUT_ORACLE_CONTRACT

Version: v6.3.0+ Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_DEPOSITS_TRANSACTION_TYPE

Version: v6.9.0+ Default: 126 Applications: Indexer

INDEXER_OPTIMISM_L2_WITHDRAWALS_START_BLOCK

Version: v6.3.0+ Default: 1 Applications: Indexer

INDEXER_OPTIMISM_L2_MESSAGE_PASSER_CONTRACT

Version: v6.3.0+ Default: 0x4200000000000000000000000000000000000016 Applications: Indexer

INDEXER_OPTIMISM_L1_ETH_GET_LOGS_RANGE_SIZE

Version: master Default: 250 Applications: Indexer

INDEXER_OPTIMISM_L2_ETH_GET_LOGS_RANGE_SIZE

Version: master Default: 250 Applications: Indexer

INDEXER_OPTIMISM_BLOCK_DURATION

Version: master Default: 2 Applications: Indexer

INDEXER_OPTIMISM_L1_PORTAL_CONTRACT

Version: master Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_START_BLOCK

Version: master Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_INBOX

Version: master Default: (empty) Applications: Indexer

INDEXER_OPTIMISM_L1_BATCH_SUBMITTER

Version: master Default: (empty) Applications: Indexer

zkSync Rollup Management

Supported together with setting CHAIN_TYPE=zksync

VariableDescriptionParameters

INDEXER_ZKSYNC_BATCHES_ENABLED

Version: v6.3.0+ Default: false Applications: Indexer

INDEXER_ZKSYNC_BATCHES_CHUNK_SIZE

Version: v6.3.0+ Default: 50 Applications: Indexer

INDEXER_ZKSYNC_NEW_BATCHES_MAX_RANGE

Version: v6.3.0+ Default: 50 Applications: Indexer

INDEXER_ZKSYNC_NEW_BATCHES_RECHECK_INTERVAL

Version: v6.3.0+ Default: 60 Applications: Indexer

INDEXER_ZKSYNC_L1_RPC

Version: v6.3.0+ Default: (empty) Applications: Indexer

INDEXER_ZKSYNC_BATCHES_STATUS_RECHECK_INTERVAL

Version: v6.3.0+ Default: 50 Applications: Indexer

Arbitrum Management

Supported together with setting CHAIN_TYPE=arbitrum

VariableDescriptionParameters

INDEXER_ARBITRUM_ARBSYS_CONTRACT

Version: v6.7.0+ Default: 0x0000000000000000000000000000000000000064 Applications: Indexer

INDEXER_ARBITRUM_NODE_INTERFACE_CONTRACT

Version: v6.8.0+ Default: 0x00000000000000000000000000000000000000C8 Applications: Indexer

INDEXER_ARBITRUM_L1_RPC

Version: v6.7.0+ Default: empty Applications: Indexer

INDEXER_ARBITRUM_L1_RPC_CHUNK_SIZE

Version: v6.7.0+ Default: 20 Applications: Indexer

INDEXER_ARBITRUM_L1_RPC_HISTORICAL_BLOCKS_RANGE

Version: v6.7.0+ Default: 1000 Applications: Indexer

INDEXER_ARBITRUM_L1_ROLLUP_CONTRACT

Version: v6.7.0+ Default: empty Applications: Indexer

INDEXER_ARBITRUM_L1_ROLLUP_INIT_BLOCK

Version: v6.7.0+ Default: 1 Applications: Indexer

INDEXER_ARBITRUM_L1_COMMON_START_BLOCK

Version: v6.7.0+ Default: latest block Applications: Indexer

INDEXER_ARBITRUM_L1_FINALIZATION_THRESHOLD

Version: v6.8.0+ Default: 1000 Applications: Indexer

INDEXER_ARBITRUM_ROLLUP_CHUNK_SIZE

Version: v6.7.0+ Default: 20 Applications: Indexer

INDEXER_ARBITRUM_BRIDGE_MESSAGES_TRACKING_ENABLED

Version: v6.7.0+ Default: (empty) Applications: Indexer

INDEXER_ARBITRUM_MISSED_MESSAGES_RECHECK_INTERVAL

Version: v6.7.0+ Default: 3600 Applications: Indexer

INDEXER_ARBITRUM_MISSED_MESSAGES_BLOCKS_DEPTH

Version: v6.8.0+ Default: 10000 Applications: Indexer

INDEXER_ARBITRUM_TRACKING_MESSAGES_ON_L1_RECHECK_INTERVAL

Version: v6.7.0+ Default: 20 Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_ENABLED

Version: v6.7.0+ Default: (empty) Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_RECHECK_INTERVAL

Version: v6.7.0+ Default: 20 Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_L1_FINALIZATION_CHECK_ENABLED

Version: v6.7.0+ Default: false Applications: Indexer

INDEXER_ARBITRUM_BATCHES_TRACKING_MESSAGES_TO_BLOCKS_SHIFT

Version: v6.7.0+ Default: 0 Applications: Indexer

INDEXER_ARBITRUM_MISSING_BATCHES_RANGE

Version: v6.8.0+ Default: 10000 Applications: Indexer

INDEXER_ARBITRUM_CONFIRMATIONS_TRACKING_FINALIZED

Version: v6.7.0+ Default: true Applications: Indexer

INDEXER_ARBITRUM_NEW_BATCHES_LIMIT

Version: v6.7.0+ Default: 10 Applications: Indexer

Celo Management

Supported together with setting CHAIN_TYPE=celo

VariableDescriptionParameters

CELO_CORE_CONTRACTS

Version: v6.8.0+ Default: (empty) Applications: API, Indexer

INDEXER_DISABLE_CELO_EPOCH_FETCHER

Version: v6.8.0+ Default: false Applications: Indexer

INDEXER_DISABLE_CELO_VALIDATOR_GROUP_VOTES_FETCHER

Version: v6.9.0+ Default: false Applications: Indexer

INDEXER_CELO_VALIDATOR_GROUP_VOTES_BATCH_SIZE

Version: v6.8.0+ Default: 200000 Applications: Indexer

Details on `CELO_CORE_CONTRACTS`

The CELO network includes several core contracts that are central to its operation. These core contracts manage various aspects of the Celo network, including its stablecoins, governance, identity, and more.

All these contracts can be obtained by querying the Registry contract, which is deployed at the genesis block with the address 0x000000000000000000000000000000000000ce10. This contract serves as a repository for the addresses of all core contracts on the Celo network.

Fortunately, core contracts are not updated frequently, so we store information about core contracts statically under the CELO_CORE_CONTRACTS variable, which is a JSON object of a specified structure.

In case the contracts are updated, maintaining the Blockscout instance will require updating the CELO_CORE_CONTRACTS variable and manually setting blocks for refetch (all blocks produced after the core contracts' update).

The structure of the JSON value for the CELO_CORE_CONTRACTS variable is detailed in this gist.

The JSON structure may change. To assemble the CELO_CORE_CONTRACTS environment variable, run mix fetch_celo_core_contracts in the root of the Blockscout repository. This task will index the chain from block 0 to the latest block number, providing the most up-to-date values.

The JSON structure in the gist contains two main sections: addresses and events.

  • addresses: This section maps contract names to the list of respective addresses and the block number at which they were updated. For example:

    • "Accounts": [{ "address": "0xed7f51a34b4e71fbe69b3091fcf879cd14bd73a9", "updated_at_block_number": 574 }]

    • "Election": [{ "address": "0x1c3edf937cfc2f6f51784d20deb1af1f9a8655fa", "updated_at_block_number": 592 }]

  • events: This section maps contract addresses to the events associated with them, including any parameters and the block numbers at which these events were emitted. For example:

    • "EpochRewards": { "0xb10ee11244526b94879e1956745ba2e35ae2ba20": { "CarbonOffsettingFundSet": [{ "address": "0x22579ca45ee22e2e16ddf72d955d6cf4c767b0ef", "updated_at_block_number": 15049265 }] } }

    • "FeeHandler": { "0x90d94229623a0a38826a4a7557a6d79acde43f76": { "BurnFractionSet": [{ "updated_at_block_number": 19732579, "value": 0.7999999999999999 }] } }

Filecoin Management

Supported together with setting CHAIN_TYPE=filecoin

VariableDescriptionParameters

FILECOIN_NETWORK_PREFIX

Version: v6.9.0+ Default: f Applications: API, Indexer

BERYX_API_TOKEN

Required: ✅ Version: v6.9.0+ Default: (empty) Applications: Indexer

BERYX_API_BASE_URL

Version: v6.9.0+ Default: https://api.zondax.ch/fil/data/v3/mainnet Applications: Indexer

INDEXER_DISABLE_FILECOIN_ADDRESS_INFO_FETCHER

Version: v6.9.0+ Default: false Applications: Indexer

INDEXER_FILECOIN_ADDRESS_INFO_CONCURRENCY

Version: v6.9.0+ Default: 1 Applications: Indexer

FILECOIN_PENDING_ADDRESS_OPERATIONS_MIGRATION_BATCH_SIZE

Version: v6.9.0+ Default: 100 Applications: Indexer

FILECOIN_PENDING_ADDRESS_OPERATIONS_MIGRATION_CONCURRENCY

Version: v6.9.0+ Default: 1 Applications: Indexer

Blackfort Management

Supported together with setting CHAIN_TYPE=blackfort

VariableDescriptionParameters

BLACKFORT_VALIDATOR_API_URL

Version: v6.9.0+ Default: (empty) Applications: API, Indexer

Last updated

Logo

Copyright © Blockscout Limited 2023-2024