plugin

command module
v0.0.0-...-b770cea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

README

API Reference pipeline status Go Report Card Windows Build Status codecov

<<<<<<< HEAD

chain 官方插件系统(v1.68.4)

chain 官方插件系统(v1.68.2)

c7f90405aaee21be0ead6b9b99d81458fc46c947

环境
golang1.19+

支持 make file 的平台
//开启mod功能
export GO111MODULE=on

//国内用户需要导入阿里云代理,用于下载依赖包
export GOPROXY=https://mirrors.aliyun.com/goproxy

make

就可以完成编译安装

注意:国内用户需要导入一下代理,才能获取依赖包,mod功能在Makefile中默认开启

运行

./chain -f chain.toml

注意,默认配置会连接 chain 测试网络

注意:

使用 mod 管理依赖包,主要就是翻墙问题 为了解决包依赖翻墙下载问题,我们提供了阿里云代理。

贡献代码:

详细的细节步骤可以见 https://github.com/assetcloud/chain 这里只是简单的步骤:

准备阶段:
  • 首先点击 右上角的 fork 图标, 把 chain fork 到自己的分支 比如我的是 vipwzw/plugin
  • git clone https://github.com/vipwzw/plugin.git $GOPATH/src/github.com/assetcloud/plugin
注意:这里要 clone 到 $GOPATH/src/github.com/assetcloud/plugin, 否则go 包路径会找不到

clone 完成后,执行

make addupstream
创建分支准备开发新功能
make branch b=branch_dev_name
提交代码
make push b=branch_dev_name m="hello world"

如果 m 不设置,那么不会执行 git commit 的命令

测试代码

类似 plugin/dapp/relay,在 cmd 目录下编写自己插件的 Makefile 和 build.sh 在 build 目录下写 testcase 和相关的 Dockerfile 和 docker-compose 配置文件, testcase 的规则参考 plugin/dapp/testcase_compose_rule.md

用户可以在 travis 自己工程里面设置自己 plugin 的 DAPP 变量,如 DAPP 设置为 relay,则 travis 里面 run relay 的 testcase

Documentation

Overview

每个系统的功能通过插件完成,插件分成4类: 共识 加密 dapp 存储 这个go 包提供了 官方提供的 插件。

Directories

Path Synopsis
cli
consensus/dpos
Package dpos Uses nacl's secret_box to encrypt a net.Conn.
Package dpos Uses nacl's secret_box to encrypt a net.Conn.
consensus/dpos/types
Package types is a generated protocol buffer package.
Package types is a generated protocol buffer package.
consensus/qbft
Package qbftNode Uses nacl's secret_box to encrypt a net.Conn.
Package qbftNode Uses nacl's secret_box to encrypt a net.Conn.
consensus/tendermint
Package tendermint Uses nacl's secret_box to encrypt a net.Conn.
Package tendermint Uses nacl's secret_box to encrypt a net.Conn.
dapp/accountmanager/commands
Package commands implement dapp client commands
Package commands implement dapp client commands
dapp/blackwhite
Package blackwhite 黑白配游戏插件
Package blackwhite 黑白配游戏插件
dapp/coinsx
Package coins 系统级coins dapp插件
Package coins 系统级coins dapp插件
dapp/coinsx/executor
Package executor coins执行器
Package executor coins执行器
Package sync ...
Package sync ...
dapp/echo/types/echo
Package echo is a generated protocol buffer package.
Package echo is a generated protocol buffer package.
dapp/evm/executor/vm/common/math
Package math provides integer math utilities.
Package math provides integer math utilities.
dapp/evmxgo/commands
Package commands implement dapp client commands
Package commands implement dapp client commands
dapp/exchange/commands
Package commands implement dapp client commands
Package commands implement dapp client commands
dapp/mix/wallet
Package ecdh implements the Diffie-Hellman key exchange using elliptic curves (ECDH).
Package ecdh implements the Diffie-Hellman key exchange using elliptic curves (ECDH).
dapp/paracross
Package paracross 实现了跨链合约.
Package paracross 实现了跨链合约.
dapp/privacy/types
Package types ...
Package types ...
dapp/rollup/commands
Package commands implement dapp client commands
Package commands implement dapp client commands
dapp/storage/commands
Package commands implement dapp client commands
Package commands implement dapp client commands
dapp/token
Package token 创建token
Package token 创建token
dapp/token/cmd/signatory-server/signatory
Package signatory is a generated protocol buffer package.
Package signatory is a generated protocol buffer package.
dapp/vote/commands
Package commands implement dapp client commands
Package commands implement dapp client commands
dapp/x2ethereum/commands
Package commands implement dapp client commands
Package commands implement dapp client commands
Package sync ...
Package sync ...
dapp/x2ethereum/ebrelayer/types
Package types is a generated protocol buffer package.
Package types is a generated protocol buffer package.
dapp/zksync/commands
Package commands implement dapp client commands
Package commands implement dapp client commands
p2p/gossip
Package gossip 实现了gossip网络拓扑
Package gossip 实现了gossip网络拓扑
p2p/gossip/nat
Package nat provides access to common network port mapping protocols.
Package nat provides access to common network port mapping protocols.
p2p/init
Package init init p2p
Package init init p2p
store/kvmvccmavl
Package kvmvccmavl kvmvcc+mavl接口
Package kvmvccmavl kvmvcc+mavl接口
store/mpt/db
Package mpt implements Merkle Patricia Tries.
Package mpt implements Merkle Patricia Tries.
store/mpt/db2
Package mpt implements Merkle Patricia Tries.
Package mpt implements Merkle Patricia Tries.
store/mpt/db2/rlp
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL