Subscan Essentials is a high-precision blockchain explorer scaffold project. It supports substrate-based blockchain networks with developer-friendly interface, standard or custom module parsing capabilities. It's developed by the Subscan team and used in subscan.io. Subscan Essentials is a high-precision blockchain explorer scaffold project. It supports substrate-based blockchain networks with developer-friendly interface, standard or custom module parsing capabilities. It's developed by the Subscan team and used in subscan.io. Developers are free to use the codebase to extend functionalities and develop unique user experiences for their audiences.
- Support Substrate network custom type registration
- Support Substrate network custom type registration
- Support index Block, Extrinsic, Event, log
- More data can be indexed by custom plugins
- Gen tool can automatically generate plugin templates
- Built-in default HTTP API DOC
- Linux / Mac OSX
- Git
- Golang 1.20+
- Redis 3.0.4+
- MySQL 5.6+
- Node 8.9.0+
./build.sh build
cp configs/config.yaml.example configs/config.yaml
-
Redis configs/redis.toml
addr: redis host and port (default: 127.0.0.1:6379)
-
Mysql configs/mysql.toml
host: mysql host (default: 127.0.0.1) user: mysql user (default: root) pass: mysql user passwd (default: "") db: mysql db name (default: "subscan")
-
Http configs/http.toml
addr: local http server port (default: 0.0.0.0:4399)
-
Start DB Make sure you have started redis and mysql
-
Substrate Daemon
cd cmd ./subscan start substrate
-
Api Server
cd cmd ./subscan
-
Help
-
Help
NAME: SubScan - SubScan Backend Service, use -h get help USAGE: main [global options] command [command options] [arguments...] VERSION: 1.0 DESCRIPTION: SubScan Backend Service, substrate blockchain explorer COMMANDS: start Start one worker, E.g substrate install Create database and create default conf file help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --conf value (default: "../configs") --help, -h show help --version, -v print the version
If you prefer running containers, you can use docker-compose.
Create local network
docker network create app_net
Run mysql and redis container
docker-compose -f docker-compose.db.yml up -d
Run subscan service
docker-compose build
docker-compose up -d
Note: The default test mysql database is subscan_test. Please CREATE it or change configs/mysql.toml.
go test ./...
We welcome contributions of any kind. Issues labeled can be good (first) contributions.
GPL-3.0