其他分享
首页 > 其他分享> > 通过test-network-k8s和chaincode service在vscode调试智能合约

通过test-network-k8s和chaincode service在vscode调试智能合约

作者:互联网

概要步骤

通过fabric sample中的test-network-k8s和chaincode service在vscode调试智能合约。 合约选用fabric sample中的chaincode-external
在这里插入图片描述

网络配置

127.0.0.1 host.docker.internal > /etc/hosts

合约配置

{
  "address": "host.docker.internal:9999",
  "dial_timeout": "10s",
  "tls_required": false
}

启动test-network-k8s指向位于host.docker.internal:9999的合约

$ ./network up
$ ./network channel create
$ export TEST_NETWORK_CHAINCODE_NAME=asset-transfer-basic-debug
$ export TEST_NETWORK_CHAINCODE_IMAGE=localhost:5000/asset-transfer-basic

$ ./network chaincode install
Installing chaincode "asset-transfer-basic-debug":
✅ - Packaging chaincode folder chaincode/asset-transfer-basic-debug ...
✅ - Transferring chaincode archive to org1 ...
✅ - Installing chaincode for org org1 ...

标签:network,service,vscode,chaincode,basic,CHAINCODE,debug
来源: https://blog.csdn.net/oe1019/article/details/121062832