Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4,988 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

blockchain plugins

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages