https://github.com/pangz-lab/verus-explorer
Locally setup and run the Verus coin and other Verus Pbaas coin explorer
https://github.com/pangz-lab/verus-explorer
Last synced: about 2 months ago
JSON representation
Locally setup and run the Verus coin and other Verus Pbaas coin explorer
- Host: GitHub
- URL: https://github.com/pangz-lab/verus-explorer
- Owner: pangz-lab
- License: mit
- Created: 2024-07-10T06:35:24.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-11T17:21:48.000Z (11 months ago)
- Last Synced: 2024-07-11T19:47:22.761Z (11 months ago)
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# verus-explorer
- Setup and run Verus Coin / PbaaS coin web explorer locally.
- This enables running an web explorer quickly using the newly developed API and updated UI(based from insight-ui) built using docker for a seemless, scalable deployment.## Prerequisite:
1. Verus Node
2. [Docker](https://docs.docker.com/engine/install/) - `v27.0.3+`## Setup
1. Update the chain configurations; `VRSC.conf` or `.conf`
- stop node
- add the explorer related configs
```bash
# insight explorer
addressindex=1
txindex=1
timestampindex=1
idindex=1
insightexplorer=1
spentindex=1
```
- enable the ZMQ server configs
```bash
#ZMQ server
zmqpubrawblock=tcp://127.0.0.1:99000
zmqpubrawtx=tcp://127.0.0.1:99000
zmqpubhashtx=tcp://127.0.0.1:99000
zmqpubhashblock=tcp://127.0.0.1:99000
```
- restart node2. Update each `.env.*` files based on local `VRSC.conf` or `.conf` configurations.(see the following)
### RPC Server
*Dotenv file*: `.env.rpc_server`
| Evironment Variable | Config Key | Example |
|---------------------|-------------|-------------|
|`RPC_NODE_URL` | `:"` | `RPC_NODE_URL="localhost:27486"` |
|`RPC_NODE_USER` | `` | `RPC_NODE_USER="user1679505996"` |
|`RPC_NODE_PASSWORD` | `` | `RPC_NODE_PASSWORD="password"` |### Explorer API
*Dotenv file*: `.env.api`
- Values of `zmqpubrawblock`, `zmqpubrawtx`, `zmqpubhashtx`, `zmqpubhashblock` are expected to be the same.
- Get the `host` and the `port` from the configuration. Example is `tcp://127.0.0.1:99000`| Evironment Variable | Data | Example |
|-----------------------|-------------|-------------|
|`NODE_ZMQ_ADDRESS` | `"127.0.0.1"` | `NODE_ZMQ_ADDRESS="127.0.0.1"` |
|`NODE_ZMQ_PORT` | `"99000"` | `NODE_ZMQ_PORT="99000"` |### Explorer UI
*Dotenv file*: `.env.ui`
- Get your local IP address.
```bash
hostname -I
```
- Replace `localhost` value found in keys `ENV_API_SERVER` and `ENV_WS_SERVER`## Run
- Make sure your local node is `100%` synced, otherwise you'll encounter an issue.
- Run `docker compose` to deploy
```bash
sudo docker compose up -d
```
- If everything goes well, you can now access your explorer locally.
- `VRSC` ⇨ http://localhost:2221
- `vARRR` ⇨ http://localhost:3331
- Sometimes, initial load takes some seconds to fully show up.## Issues/Error
- It's possible that you might have a conflicting port or keys.
- Update the values accordingly.| `.env.rpc_server` | `.env.api` | `.env.ui` |
|-------------------------------|------------------------------------------------------|-------------|
|`SERVER_ADDRESS`.`SERVER_PORT` | `EXT_API_HOST=http://.` | `-` |
|`-` | `LOCAL_SERVER_PORT` | `ENV_API_SERVER=http://192.168.2.105:` |
|`-` | `LOCAL_SERVER_PORT` | `ENV_WS_SERVER=ws://192.168.2.105:/verus/wss ` |
|`-` | `LOCAL_SERVER_API_KEY` | `ENV_API_TOKEN` |# References
## [](https://github.com/pangz-lab/) Github
1. **verus-explorer-ui** - https://github.com/pangz-lab/verus-explorer-ui
2. **verus-explorer-api** - https://github.com/pangz-lab/verus-explorer-api
3. **verus-rpc-server** - https://github.com/pangz-lab/rust_verusd_rpc_server## [](https://docs.docker.com/get-docker/) Docker Hub
1. **verus-explorer-ui** - https://hub.docker.com/r/pangzlab/verus-explorer-ui
2. **verus-explorer-api** - https://hub.docker.com/r/pangzlab/verus-explorer-api
3. **verus-rpc-server** - https://hub.docker.com/r/pangzlab/verus-rpc-server