Skip to main content

Explorer

After building a Verse, you have to create a Verse explorer. Please use blockscout to create a Verse explorer.

Environment Variable

When creating a blockscout instance, you have to set the environment variable using blockscout.

You can check the environment variable lists at this page.

When creating a verse blockscout, please set the following environment variables.

VariableDescriptionValue
DATABASE_URLVariable to define the Postgres Database endpoint.postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=falset (Your DATABASE RPC)
ETHEREUM_JSONRPC_VARIANTTells the application which RPC Client the node is usinggeth (Verse uses geth)
ETHEREUM_JSONRPC_HTTP_URLThe RPC endpoint used to fetch blocks, transactions, receipts, tokens.rpc.myverse.com (Your Verse RPC)
ETHEREUM_JSONRPC_TRACE_URLThe RPC endpoint specifically for the Erigon/Geth/Nethermind/Besu client used by trace_block and trace_replayTransaction. This can be used to designate a tracing node.rpc.myverse.com (Your Verse RPC)
SECRET_KEY_BASERequired for contract verification. Specify a random string of 64 characters.On Unix, you can create it with the following command
head -c 64 /dev/urandom | base64 | cut -c 1-64
JSON_RPCThe RPC endpoint used to a button of "Add My-Verse" in footer for Metamask.rpc.myverse.com (Your Verse RPC)
CHAIN_IDUnique identifier for the "My-Verse" blockchain within the Ethereum network. It used to a button of "Add My-Verse" in footer for Metamask.1234 (Your Verse ChainID)
BLOCKSCOUT_HOSTHost for API endpoint.explorer.example.com (Your Host)
BLOCKSCOUT_PROTOCOLUrl scheme for API endpoint.http or https

If you build verse on the same server, you can set ETHEREUM_JSONRPC_HTTP_URL and ETHEREUM_JSONRPC_TRACE_URL as http://host.docker.internal:8545/.

Manual Setup

If you set up blockscout for a Verse, You have to set it up manually.

Git Clone

First, you have to clone oasys-blockscout.

git clone git@github.com:oasysgames/oasys-blockscout.git
cd oasys-blockscout
git checkout oasys-blockscout-v5

Set Environment Variables

After that, please set the environment variables to common-blockscout.env along with Environment Variable.

Set Brand Config Variables

You can adjust settings related to branding, such as theme colors and logos, to align with your desired branding.

ItemDescriptionTarget File or Directory PathExample
Theme Colors and CSSSet the stylesheet of your instance to the one you prefer.apps/block_scout_web/assets/css/theme/_neutral_variables.scssChange $primary: #5c34a2; to $primary: #ff0000;
LogosUse the LOGO and FOOTER_LOGO environment variables to link to your uploaded logos.apps/block_scout_web/assets/static/images
docker-compose/envs/common-blockscout.env
Place foo.png into apps/block_scout_web/assets/static/images and set LOGO=/images/foo.png in docker-compose/envs/common-blockscout.env
MetaDataAdjust MetaTags for different pages.apps/block_scout_web/lib/block_scout_web/templates/chain/_metatags.html.eexReplace content in <meta name="description" content="... with your desired content.
FaviconReplace the existing favicons.apps/block_scout_web/assets/static/imagesReplace favicons in the specified folder.
MenusUse the APPS_MENU environment variable to add an apps menu.docker-compose/envs/common-blockscout.envSet APPS_MENU=true and EXTERNAL_APPS=[{"title": "App", "url": "https://app", "embedded?": true}].
Top Navigation BarData for this section is rendered from a specific template.apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eexRefer to the specific template.
FooterThe data for the footer is sourced from another template.apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eexChange FOOTER_GITHUB_LINK=https://example.com to FOOTER_GITHUB_LINK=https://example.io.

Reflect settings for network changes

cd docker-compose
./modify_networks.sh default_network_name

This script rewrites the following variables

  • SUPPORTED_CHAINS
  • SUBNETWORK

You can check the this page for the detail of manual deployment.

Run Container

Finally, run the container with docker-compose.

docker compose up -d

When you finished docker-compose up, you can explore via http://localhost:4000/.