Blockscout
SupportWebsiteGithubDiscord
  • Blockscout Open-Source Explorer
  • 💡About BlockScout
    • Features
      • Ethereum Bytecode Database Microservice
      • Blockscout Redesign
    • Chains Using Blockscout
    • Partners & Integrations
      • RaaS Providers
      • Vera: Verifier Alliance
        • Adding your chain to the Vera database
        • Programmatic verification via the API
    • News & Media
      • Newsletter & Blog
    • Funding
      • L2 Funding Proposal
        • Aux Funding Images
    • Roadmap
  • 🙎Using Blockscout
    • Getting Started
      • Glossary of Terms
      • Main Menu
      • Blocks
      • Transaction Types
      • Beacon Chain Withdrawal Views
    • My Account
      • Watch list
      • Private tags
      • Public tags
      • API keys
      • Custom ABI
      • Verified addresses
        • Copy and Sign Message
      • For developers
    • Dappscout Apps Marketplace
      • DApp Integration
    • Swapscout
      • Earn Merits when using Swapscout
    • Revokescout
    • Autoscout Explorer Launchpad
    • CSV Exports
    • Token Support
      • ERC-1155 Support
    • Merits
      • Streak rewards
      • Activity Pass
      • Leaderboard
      • Badges
      • FAQs
  • 👩‍💻Developer Support
    • For Web3 Developers
    • Link to Blockscout
    • Blockscout APIs
      • Requests & Limits
      • REST API Endpoints
        • Stats API
        • Interpreter API
      • JSON RPC & ETH Compatible RPC Endpoints
        • Account
        • Block
        • Contract
        • Logs
        • Stats
        • Token
        • Transaction
        • ETH RPC API
      • GraphQL in Blockscout
    • Smart Contract Verification
      • Blockscout UI
      • Blockscout smart-contract verification API
      • Hardhat Verification Plugin
        • Sourcify Plugin for Hardhat
      • Foundry Verification
      • Sourcify Verification
      • OpenZeppelin Contract Verification
      • Automate verifications with Catapulta
      • Verification via thirdweb
      • Interacting with Smart Contracts
    • Integrate Merits
    • Chainscout chains list
  • 🏃‍♂️Setup and Run Blockscout
    • General Overview
      • Separate Indexer, Web App, and API
      • Umbrella Project Organization
      • Indexer Architecture Overview
      • ShareLock
      • EVM Version Information
    • Requirements
      • General Backend Requirements / Blockscout Backend Prerequisites
      • Backend/Frontend Compatibility Matrix
      • Hardware & Hosting Requirements
      • Database Storage Requirements
      • Client Setting Requirements
      • Node Tracing / JSON RPC Requirements
      • L2 -> L1 JSON-RPC Method Requests
    • ☑️ENV Variables
      • Backend ENVs: Common
      • Backend ENVs: Chain-Specific
      • Backend ENVs: Integrations
      • Frontend ENVs: Common
        • ENVs
        • Deprecated ENVs
      • Deprecated Backend ENVs
        • Previous ENV Variable Home Page
    • Deployment
      • ⭐Manual Deployment Guide
        • Ubuntu Setup
        • MacOS setup
      • ⭐Docker-compose Deployment
      • ⭐Kubernetes Deployment
      • Rollup Deployment
      • 🌟Cosmos-based chains
      • 🍀Upgrade Guide (v7.0 & v8.0)
      • Frontend Migration
        • All-In-One Container
        • Separate Frontend
        • Customized Backend
        • Proxy Setup
        • FAQs
      • Manual Deployment (backend + old UI)
        • Manual cleaning an instance from the previous deployment
      • Terraform Deployment
      • Ansible Deployment (AWS Cloud)
        • Overview
        • Prerequisites
        • AWS Permissions & Settings
          • Creating a Secret Key Pair
          • Login with AWS CLI
          • Creating an AWS certificate for SSL
          • Manually Cleaning Terraform Related Instances
        • Variables
        • Deploying the Blockscout Infrastructure
        • Deploying Blockscout
        • Destroying Provisioned Infrastructure
        • Common Additional Tasks
        • Common Errors and Questions
        • AWS Marketplace (deprecated)
          • Overview
          • CloudFormation Template
          • Prerequisites & Install Parameters
          • Install from AWS Marketplace
          • AWS EC2 archive node setup with OpenEthereum (formerly Parity)
          • Updating & Redeploying in AWS
          • Customizing CSS
    • Microservices
      • Blockscout ENS (BENS) Name Service Integration
      • Smart Contract Verification
    • Configuration Options
      • Automating Restarts
      • Branding Configs
      • Circle CI Updates
      • Charts and Stats
      • CSS Configuration & Presets
      • Exchange Rates
      • Front-end Config Files
      • haproxy Settings for Blockscout.com
      • Internationalization
      • Logger Configs
      • Memory Usage
      • Metrics
      • My Account Settings
      • Sorting and Pagination
      • Tracing
      • Reown Project ID for contract Read/Write
    • Indexing
      • How do I fix indexer timeouts?
      • How do I update memory consumption to fix indexer memory errors?
    • Testing
    • DB schema
  • FAQs
    • User FAQs
    • Developer FAQs
  • 🧩Resources
    • EaaS: Hosting with Blockscout
    • Contributing to Blockscout
    • Bug Bounty Program
    • Media kit
    • Release Notes
      • v5.3.0: 10/23/23
      • v5.2.0: 6/20/23
      • v5.1.0: 2/13/23
      • v5.0.0: 1/11/23
    • Discord Channel
    • Discussion
    • GitHub Repo
Powered by GitBook
LogoLogo

Privacy and Terms

  • Privacy Notice
  • Terms and Conditions

Copyright © Blockscout Limited 2023-2024

On this page

Was this helpful?

Export as PDF
  1. FAQs

Developer FAQs

Last updated 2 days ago

Was this helpful?

Developer FAQs

How do I speed up my self-hosted instance?

BlockScout can be resource intensive. If your instance is running slowly:

  • clear the cache - the application cache is cleared on restart by running: sudo systemctl restart explorer.service

  • increase the memory limit for indexers if indexing is slow.

  • increase the number of CPUs if CPU is running at 100% on the web app server

  • increase the memory if memory consumption is high on the web app server

  • increase the number of CPUs or/and increase the memory on the database server if consumption is high.

Instructions for accessing and upgrading CPUs/memory will differ based on your setup. If you are running BlockScout on AWS, these settings can be accessed through your AWS services portal.

How do I customize the coin symbol / name?

Exchange Rates Coin Name

  • Specify coin name for exchange rates fetcher with the COIN

BlockScout utilizes the COIN environment variable which pulls the associated market data from the Coinmarketcap.com API or CoinGecko API to provide pricing data throughout the application.

Displayed Coin Symbol

In order to set displayed coin symbol, instance maintainer should set COIN_NAME runtime environment variable:

export COIN_NAME=

For instance, in case of POA instance of Blockscout:

export COIN_NAME=POA
How do I manage deployment with AWS CodeDeploy?

1) Visit CodeDeploy in AWS. You will see a list of your deployments. Select the deployment id to view details https://console.aws.amazon.com/codesuite/codedeploy/deployments?region=us-east-1

2) Deployment status consists of several steps. Once step 2 is complete (application is installed on replacement instances), you manually reroute traffic. Click the Reroute traffic button to initiate.

3) Once traffic is rerouted, you’ll be asked to terminate the original instance. Click the Terminate button to initiate.

4) Once complete, use the public DNS address of the Amazon EC2 instance to view in a web browser. (To get the public DNS value, choose your Amazon EC2 instance in the Amazon EC2 console, and look for the value in Public DNS in the Description tab).

What's the best way to deploy to AWS?

Currently the best existing way is through docker compose .

We are currently working on deployment through Kubernetes (K8s) and other methods for easily spinning up an instance on AWS.

How do I replace missing assets/version numbers?

Missing Assets

  1. Find the public ip of corresponding Blockscout instance in the EC2 -> Instances of AWS Dashboard.

  2. Connect to the host via SSH ssh -i <host.pem> ec2-user@<public_ip>, where <host.pem> is host’s private key file, <public_ip> is the public ip of the host, that can be found in the AWS dashboard.

  3. Go to assets folder cd /opt/app/apps/block_scout_web/priv/static

  4. Add missing assets there or to ./images folder depending on what is missing. Refresh Blockscout instance page. For example, if favicon.ico is missing in ./images folder, just copy it from the root assets folder `cp favicon.ico ./images/. You should see now the missing assets.

Missing Version in Footer

The app version number should be in the footer of BlockScout instance

  1. Find the public ip of corresponding Blockscout instance in the EC2 -> Instances of AWS Dashboard

  2. Connect to the host via SSH ssh -i <host.pem> ec2-user@<public_ip>, where <host.pem> is host’s private key file, <public_ip> is the public ip of the host, that can be found in the AWS dashboard.

  3. Go to layout folder /opt/app/apps/block_scout_web/lib/block_scout_web/templates/layout

  4. Open _footer.html.eex footer template in the favorite text editor. For example nano ./_footer.html.eex and fix the line <% version = version() %> (it is in the bottom of the file) with the hardcoded new version, for example, <% version = 'v1.3.3-beta' %> and save.

  5. Restart the Blockscout instance with sudo systemctl restart explorer.service

How do I fix the Gettext.Error?

You may receive this error after making changes to a specific BlockScout application.

(Gettext.Error) translation with msgid '...<msg_here>...' has a non-empty msgstr

To update gettext, run the following command in the app’s folder where the changes were made.

  1. Go to the ./apps/{name_of_app} folder where the changes were made.

  2. Run mix gettext.extract —merge

  3. Repeat for other app folders as required.

How do I update the UI?

For updates like adding elements/links etc you will need to change .eex templates. When changing .eex templates you don't need to rebuild. Run the application in dev mode (MIX_ENV=dev), and change the template. You'll see changes on-the-fly. When changing js/scss while running the application, you need to run mix phx.digest to apply the changes.

How can I view smart contracts using RPC?

Use the JSON RPC listcontracts endpoint. For example, to view verified contracts, use the following query. Pagination is available

curl -X GET "
https://gnosis.blockscout.com/api?module=contract&action=listcontracts&page=1&offset=50&filter=verified
" -H "accept: application/json"
Why are Market Cap/Token Price stats wrong?

One reason may be related to the CoinGecko API refusing Blockscout requests without an API key.

If impacted, apply this pull request to your instance:

It implements CoinGecko API key management and alternative CoinMarketCap exchange rates.

How do I verify contracts via an API?

There are several ways:

How do I disable exchange rates?

Change the Explorer.ExchangeRates variable from enabled: true to enabled: false

  • config :explorer, Explorer.ExchangeRates, enabled: false, store: :ets

How can I migrate verified contracts between databases?

You may want to do this if you are creating a new instance or resyncing a new node.

  1. Backup the smart_contracts table

  2. Restore this table following the resync.

Which Linux distro do I use for manual deployment?

Ubuntu 18.04 has been configured in Blockscout CI.

Can I set RPC variable to a normal http(s) url?

Yes you can. The ethereum_json_rpc_http variable can be set to any url, it does not need to be a localhost. Client variant env variable should be specified in either case.

Do I need to enable ws?

No, it is not required. If ws is disabled, leave the ETHEREUM_JSONRPC_WS_URL env var empty or unset it.

How to fix error message "execution timeout at pushGasToTopCall"?
How do I fix Unknown Private Network error?

In a self-hosted or locally deployed instance, when attempting to do a write transaction on a verified contract, the following errors may appear:

Unauthorized "You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain"

"No "from" address specified in neither the give options, nor the default options."

To Troubleshoot:

  • Check that you set the correct CHAIN_ID env variable

  • Check correct variable for NETWORK_ID

  • Check that Metamask (or other web3 wallets) is connected to correct network.

How do I fix indexer timeouts or update memory to fix indexer memory errors?
How to incorporate "Add to MM" functionality

Check that you are running the latest version and set the following variables. These can be set at runtime.

CHAIN_ID=
NETWORK_PATH=
SUBNETWORK=
COIN_NAME=
JSON_RPC=

Gnosis Chain Example:

CHAIN_ID=100
NETWORK_PATH=/xdai/mainnet
SUBNETWORK=Gnosis Chain
COIN_NAME=xDai
JSON_RPC=https://rpc.gnosischain.com/
How do I update the internal tx fetcher to skip blocks or start from block to prevent errors?
What is the command to install the smart contract verifier?
How to fix error: "Could not compile dependency :libsecp256k1, "mix compile" failed.

This error can happen when running mix local.rebar --force

Try this command:

cd deps/libsecp256k1 make

More information on Gettext is .

See the page for details related to different UI elements.

Use the

Use the

Try increasing time for the ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT . The default is 5 sec.

.

More on

More on

Set TRACE_FIRST_BLOCK and TRACE_LAST_BLOCK .

cargo install --git smart-contract-verifier-http

available here
Branding configs
https://github.com/blockscout/blockscout/pull/5613
API v2 endpoints
RPC endpoints for verification
https://github.com/poanetwork/blockscout/blob/7aeecb2a04838cda0289a7fe432db74481cf575a/apps/explorer/config/config.exs#L32
Read more about this issue here
updating memory consumption
env variables
https://github.com/blockscout/blockscout-rs
Learn more about the contract verifier
indexer timeouts
https://github.com/poanetwork/blockscout/blob/b48305ece284e00084e2bb47ff1ad501bf24f115/apps/indexer/config/config.exs#L36 8
ENV variables
https://github.com/blockscout/blockscout/tree/master/docker-compose
ENV variable