Developer FAQs
How do I run my own Blockscout explorer?
How do I run my own Blockscout explorer?
How do I speed up my self-hosted instance?
How do I speed up my self-hosted instance?
- clear the cache - the application cache is cleared on restart by running:
sudo systemctl restart explorer.service - increase the memory limit for indexers https://github.com/poanetwork/blockscout/blob/b48305ece284e00084e2bb47ff1ad501bf24f115/apps/indexer/config/config.exs#L36 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.
I want to use the latest version, how do I download it?
I want to use the latest version, how do I download it?
git clone https://github.com/blockscout/blockscout.git -b <version>How do I customize the coin symbol / name?
How do I customize the coin symbol / name?
- Specify coin name for exchange rates fetcher with the
COINENV variables
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 SymbolIn order to set displayed coin symbol, instance maintainer should set COIN_NAME runtime environment variable:How do I manage deployment with AWS CodeDeploy?
How do I manage deployment with AWS CodeDeploy?
- 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 - Deployment status consists of several steps. Once step 2 is complete (application is installed on replacement instances), you manually reroute traffic. Click the
Reroute trafficbutton to initiate.

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

- 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?
What's the best way to deploy to AWS?
How do I replace missing assets/version numbers?
How do I replace missing assets/version numbers?
Missing Assets
- Find the public ip of corresponding Blockscout instance in the EC2 -> Instances of AWS Dashboard.
- 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. - Go to assets folder
cd /opt/app/apps/block_scout_web/priv/static - Add missing assets there or to
./imagesfolder depending on what is missing. Refresh Blockscout instance page. For example, iffavicon.icois missing in./imagesfolder, 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
- Find the public ip of corresponding Blockscout instance in the EC2 -> Instances of AWS Dashboard
- 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. - Go to layout folder
/opt/app/apps/block_scout_web/lib/block_scout_web/templates/layout - Open
_footer.html.eexfooter template in the favorite text editor. For examplenano ./_footer.html.eexand 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. - Restart the Blockscout instance with
sudo systemctl restart explorer.service
How do I fix the Gettext.Error?
How do I fix the Gettext.Error?
(Gettext.Error) translation with msgid '...<msg_here>...' has a non-empty msgstrTo update gettext, run the following command in the app’s folder where the changes were made.- Go to the ./apps/name_of_app folder where the changes were made.
- Run
mix gettext.extract —merge - Repeat for other app folders as required.
How do I update the UI?
How do I update the UI?
mix phx.digest to apply the changes.How can I view smart contracts using RPC?
How can I view smart contracts using RPC?
listcontracts endpoint. For example, to view verified contracts, use the following query. Pagination is availableWhy are Market Cap/Token Price stats wrong?
Why are Market Cap/Token Price stats wrong?
How do I verify contracts via an API?
How do I verify contracts via an API?
- Use the API v2 endpoints
- Use the RPC endpoints for verification
How do I disable exchange rates?
How do I disable exchange rates?
enabled: true to enabled: false- config :explorer, Explorer.ExchangeRates,
enabled: false, store: :ets
How can I migrate verified contracts between databases?
How can I migrate verified contracts between databases?
- Backup the
smart_contractstable - Restore this table following the resync.
Can I set RPC variable to a normal http(s) url?
Can I set RPC variable to a normal http(s) url?
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?
Do I need to enable ws?
ETHEREUM_JSONRPC_WS_URL env var empty or unset it.How to fix error message "execution timeout at `pushGasToTopCall`"?
How to fix error message "execution timeout at `pushGasToTopCall`"?
ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT ENV variable. The default is 5 sec.How do I fix Unknown Private Network error?
How do I fix Unknown Private Network error?
- Check that you set the correct
CHAIN_IDenv variable - Check correct variable for
NETWORK_ID
Is there an env variable for the favicon?
Is there an env variable for the favicon?
If I run my own local Blockscout explorer, it's gonna support ERC1155?
If I run my own local Blockscout explorer, it's gonna support ERC1155?
What Linux distro do you recommend for Blockscout manual deployment?
What Linux distro do you recommend for Blockscout manual deployment?
Is there a way to step through the code (debugging) using vscode?
Is there a way to step through the code (debugging) using vscode?
I would like to customize Blockscout. Is there any docs or tutorial on that?
I would like to customize Blockscout. Is there any docs or tutorial on that?
Where can I get more info on defining specific variables for OP stack chains?
Where can I get more info on defining specific variables for OP stack chains?
Which frontend version should I use?
Which frontend version should I use?
Can I use Cryptorank API v2 key for price fetching on Blockscout?
Can I use Cryptorank API v2 key for price fetching on Blockscout?
How to connect to a local RPC node on a docker compose Blockscout instance?
How to connect to a local RPC node on a docker compose Blockscout instance?
How can I customize footer links?
How can I customize footer links?