Tendermint Explorer的特性及安装简介

Tendermint Explorer是一个开源的Tendermint区块及交易浏览器, 采用Node.JS和Vue开发,非常适合用于Tendermint区块链应用的开发与调试。

## 1、Tendermint Explorer的主要特性 * 区块列表 ![](https://img.learnblockchain.cn/2020/01/15783684662735.jpg) * 交易详情 如果区块中包含JSON格式的交易,Tendermint Explorer可以自动识别 并显示所有的交易字段: ![](https://img.learnblockchain.cn/2020/01/15783686151305.jpg) ## 2、安装Tendermint Explorer 首先将Tendermint Explorer源码克隆到本地: ``` ~$ git clone https://github.com/dappforce/tendermint-explorer.git ~$ cd tendermint-explorer ~/tendermint-explorer$ ``` Tendermint Explorer是无状态的,需要连接到一个tendermint全节点 来获取区块和交易数据,因此需要首先修改全节点URL。 修改`./src/store/modules/blockchain.js`文件中的rpc配置信息来指向你自己的tendermint节点,例如: ``` //line 5# rpc: "http://localhost:26657" ... //line 27# const client = RpcClient("ws://localhost:26657") ``` 从源代码运行Tendermint Explorer很简单,执行如下命令 首先安装依赖包,然后启动即可: ``` # Install dependencies ~/tendermint-explorer$ yarn # Serve with hot reload at localhost:8080 ~/tendermint-explorer$ yarn serve ``` 执行如下的命令构建可发布的包: ``` # Build for production with minification ~/tendermint-explorer$ yarn build ``` 现在使用任何一个web服务器来发布`./dist`目录即可!

1、Tendermint Explorer的主要特性

  • 区块列表

  • 交易详情 如果区块中包含JSON格式的交易,Tendermint Explorer可以自动识别 并显示所有的交易字段:

2、安装Tendermint Explorer

首先将Tendermint Explorer源码克隆到本地:

~$ git clone https://github.com/dappforce/tendermint-explorer.git
~$ cd tendermint-explorer
~/tendermint-explorer$

Tendermint Explorer是无状态的,需要连接到一个tendermint全节点 来获取区块和交易数据,因此需要首先修改全节点URL。

修改./src/store/modules/blockchain.js文件中的rpc配置信息来指向你自己的tendermint节点,例如:

//line 5#
rpc: "http://localhost:26657"
...
//line 27#
const client = RpcClient("ws://localhost:26657")

从源代码运行Tendermint Explorer很简单,执行如下命令 首先安装依赖包,然后启动即可:

# Install dependencies
~/tendermint-explorer$ yarn

# Serve with hot reload at localhost:8080
~/tendermint-explorer$ yarn serve

执行如下的命令构建可发布的包:

# Build for production with minification
~/tendermint-explorer$ yarn build

现在使用任何一个web服务器来发布./dist目录即可!

区块链技术网。

  • 发表于 2020-01-07 11:50
  • 阅读 ( 1075 )
  • 学分 ( 18 )
  • 分类:Cosmos

评论