Skip to content

3Dpass/explorer

 
 

Repository files navigation

3DPscan block Explorer

3DPscan is a block Explorer providing blockchain data for "The Ledger of Things" and also can be used for Substrate-based blockchains.

Installation

Run init.sh to initialize repository; this will basically run:

  • git submodule update --init --recursive
  • cp explorer-ui-config.json explorer-ui/src/assets/config.json

The explorer-ui-config.json file contains the URLs of theexposed Substrate and Explorer API endpoints

Running the application

  • docker-compose up --build

Links

Components

The explorer application consist of several components:

Harvester component

The harvester retrieves data from the connected 3DPass node and stores it into a MySQL (by default) database.

Explorer API component

The explorer API transforms the data via an ETL process into an explorer-specific format. It exposes a GraphQL endpoint and enables subscription-based communication to the UI.

Explorer UI component

Explorer UI is a client-sided Angular based application that utilizes PolkADAPT and its Adapters to obtain data from multiple data sources, like the Explorer API and the Substrate node. Its design is based on flat Material component design.

Modifications

The Node

By default, a build of 3DPass Node is used. If a local node is already running on the host machine, you can change environment variable in the docker-compose.yml: SUBSTRATE_RPC_URL=ws://host.docker.internal:9944

Using any public or private websocket API endpoint:

To use 3DPass wallet and explorer with the local node, go to https://wallet.3dpass.org and change wss API point in the settings.

Explorer UI

Datasources

The UI is utilizing PolkAdapt to combine on-chain data retrieved directly from the Substrate node, with the GraphQL endpoint with indexed data served by the Explorer API. In this way data like events and extrinsics can be retrieved fast, with the verification of on-chain data.

By default, the UI are using the 3DPass endpoints, new networks can be added by extending the dict:

{
  "local": {
    "substrateRpcUrlArray": ["ws://127.0.0.1:9944"],
    "explorerWsUrlArray": ["ws://127.0.0.1:8000/graphql-ws"]
  },
  "3DPass": {
    "substrateRpcUrlArray": ["wss://<PUBLIC_ENDPOINT>"],
    "explorerWsUrlArray": ["wss://<HOSTED_EXPLORER_API_ENDPOINT>/graphql-ws"]
  }
}

Copyright

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%