Skip to content

This is a tool that integrates Neo-cli, neofura, and neo-explorer, and you can visualize your private chain through Neo-explorer

License

Notifications You must be signed in to change notification settings

RookieCoderrr/Neo-Explorer-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neo-Explorer-Tool

This is a project that integrates neo-cli, neo-modules-fura, neo3fura, and neo-explorer. You could configure and start a neo chain, view and query chain data through API service, mongoDb and blockchain browser.

Table of Contents

Requirements

Neo-Explorer-Tool requires docker to run, all of these modules are built in docker.

Tools recommanded

  • docker-desktop, The GUI tool for docker, you can operate the container on the UI interface such as enter the container command line, view the container status, restart and delete the container, etc.

  • Mongo Compass , The GUI for MongoDB, you can view the chain data recorded in default database.

  • Postman, An API platform for building and using APIs, you can send http request to obtain your chain data.

Getting started

Downdload project

git clone https://github.com/RookieCoderrr/Neo-Explorer-Tool.git

Start project

cd Neo-Explorer-Tool-main
./delpy.sh 

image

Docker images and respective containers are built successfully as shown above. Now, a default private chain is running in background in the container neo-cr2-private, and you can view the private chain data in your browser http://localhost:8080.

If you want to create your own private chain, or connect to the mainnet/testnet, please follow the Usages part

Usages

Neo-cli Usage

Enter the neo-rc2-private container command line

docker exec -it neo-rc2-private /bin/bash

Switch to the neo-cli command line

screen -r node 

Now you are in the neo-cli command line, a default wallet has been opened.

It locates at Neo-Explorer-Tool/neo-cli/defaultWallet.json with password 111111.

Its rpc port is 20332, and the network id is 1234567890.

You can excute cli command on your node such as “list asset" etc.

For more info, please refer to neo-cli command.

Notes: If you intend to deploy a contract on the chain, please put your contract manifest file into Neo-Explorer-Tool/neocli/SmartContract directory on you local host, the neo-rc2-private container will automatically synchronize the local SmartContract directory to its /SmartContract directory.

Neo-cli Configuration

How to configure your own chain ? Please refer to Build a private chain.

Notes: All of your modification and configurantion should be done in your local host (not in neo-rc2-private container which will cause data confusion)

After your configuration, excute this command to rebuild the project.

./delpy.sh 
  • Tips

Switch to docker command line from neo-cli command line, and neo-cli run in background.

Press control+A then D,

Switch to neo-cli command line from docker command line

screen -r

If you shut up neo-cli accidentally, run this command to reenter neo-cli

dotnet neo-cli.dll

Mongodb

enter into docker command line in mongodb1_test container

docker exec -it mongodb1_test /bin/bash

then enter into mongo command line

mongo

enter into database

show dbs
use pChainDb3

For more info about mongo command line, please refer to Mongo command.

If you prefer GUI interface, Mongo Compass is a good choice, connect to db with these configuration below.

database configuration

Host:localhost
Port:27001
Username:pChain3
Password:123
Databse:pchainDb3

API service

use curl command to send http request

request format

curl --location --request POST 'http://127.0.0.1:1926' \ --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc": "2.0", "method": "GetBestBlockHash", "params": {}, "id": 1 }'

response format

{ "id": 1, "result": { "hash": "0x226844a595780dd2881bbfedbf4ffabe25fcc691969359aa1b7f87a715cdea75" }, "error": null }

Refer to Neofura-Doc for more API service info.

The url and port exposed for API service is http://127.0.0.1:1926

Blockchain browser

The url and port exposed for Blocakchain browser is http://localhost:8080/

About

This is a tool that integrates Neo-cli, neofura, and neo-explorer, and you can visualize your private chain through Neo-explorer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published