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.

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

Polygon Edge Management

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

Rootstock Management

Shibarium Management

Polygon zkEVM Rollup Management

Optimism Rollup Management

Supported together with ENV setting CHAIN_TYPE=optimism

zkSync Rollup Management

Supported together with setting CHAIN_TYPE=zksync

Arbitrum Management

Supported together with setting CHAIN_TYPE=arbitrum

Celo Management

Supported together with setting CHAIN_TYPE=celo

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

Blackfort Management

Supported together with setting CHAIN_TYPE=blackfort

Last updated

Logo

Copyright © Blockscout Limited 2023-2024