Merge remote-tracking branch 'origin/master'

This commit is contained in:
xxq250 2024-09-09 09:19:23 +08:00
commit d893c3a104
1 changed files with 21 additions and 0 deletions

21
readme.md Normal file
View File

@ -0,0 +1,21 @@
# 区块链搭建及合约部署说明文档
## 1. FISCO BCOS搭建
请参考
https://fisco-bcos-documentation.readthedocs.io/zh_CN/v2.6.0/docs/installation.html
按照流程执行完“检查日志输出”这一步
## 2. 部署合约
- 安装go开发环境1.18.2(参考 https://www.cnblogs.com/haima/p/12057933.html
- 在go的src目录下运行 `git clone https://github.com/sulenn/trustie-fisco-bcos.git`
- 加入FISCO BCOS链的证书证书位于~/fisco/nodes/127.0.0.1/sdk目录下拷贝文件`ca.crt, sdk.crt, sdk.key`到trustie-fisco-bcos项目的根目录
- 修改config.toml文件的NodeURL为部署的IP地址
- bash console/get_account.sh
- go run contract/deploy_call/deploy/deploy.go 生成合约地址
- contract/flag.go 中修改ContractAddress
- 修改trustie-fisco-bcos/main.go的监听接口
- 在trustie-fisco-bcos根目录下运行命令`nohup go run main.go > main.log 2>&1 &`
## 3. 测试合约部署情况
使用postmanget请求合约地址例如http://8.130.51.51:3023/),正常情况下返回"hello world"