区块链服务 BCS-实例化链代码:请求示例

时间:2025-01-14 15:42:36

请求示例

POST https://192.168.0.90:30603/v2/agent/apis/chaincode/instantiate{  "chaincode_name" : "gochaincode2",  "chaincode_version" : "1.0",  "channel_name" : "channel001",  "endorsement_policy" : {    "operation" : "AND",    "group" : [ {      "org_id" : "8cc7155fb1f26ebac1743f481386c14223be511f",      "category" : "member"    } ]  },  "init_variable" : {    "func_name" : "init",    "args" : [ "a", "200", "b", "100" ]  },  "private_data" : "[{\"name\": \"kvstore-collection\",\"policy\": \"OR('8cc7155fb1f26ebac1743f481386c14223be511fMSP.member','8cc7155fb1f26ebac1743f481386c14223be511fMSP.member')\",\"requiredPeerCount\": 0,\"maxPeerCount\": 2,\"blockToLive\": 0,\"memberOnlyRead\": true}]"}
support.huaweicloud.com/devg-bcs/EnableChainCode_0.html