3DPscan is a block Explorer providing blockchain data for "The Ledger of Things" and also can be used for Substrate-based blockchains.
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
docker-compose up --build
- 3DPscan UI: http://127.0.0.1:8080/
- 3DPscan API playground: http://127.0.0.1:8000/graphql/
- 3DPscan API websocket: ws://127.0.0.1:8000/graphql-ws
The explorer application consist of several components:
The harvester retrieves data from the connected 3DPass node and stores it into a MySQL (by default) database.
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 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.
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.
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 (C) 2021 POLKASCAN https://github.com/polkascan/explorer
- Copyright (C) 2022 3DPass https://github.com/3Dpass/explorer