Skip to content

Commit 9bec049

Browse files
authored
Feat: Fablo init CCaaS (#630)
1 parent 8f7f9d9 commit 9bec049

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

SUPPORTED_FEATURES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This document provides an overview of Fablo features. The table below tracks fea
6161
**Supported Fabric versions:**
6262

6363
Fabric v2 = 2.5.12<br>
64-
Fabric v3 = 3.0.0
64+
Fabric v3 = 3.1.0
6565

6666
**Legend:**
6767

src/init/index.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,27 @@ export default class InitGenerator extends Generator {
7878
return acc;
7979
}, {} as Record<string, true>);
8080

81+
if (flags.ccaas) {
82+
if (flags.dev || flags.node){
83+
this.log(chalk.red("Error: --ccaas flag cannot be used together with --dev or --node flags"));
84+
process.exit(1);
85+
}
86+
console.log("Creating sample CCAAS chaincode");
87+
88+
const chaincodeConfig: ChaincodeJson = {
89+
name: "chaincode1",
90+
version: "0.0.1",
91+
channel: "my-channel1",
92+
lang: "ccaas",
93+
image: "hyperledger/fabric-ccaasenv:${FABRIC_CCAASENV_VERSION:-2.5}",
94+
privateData: [],
95+
};
96+
fabloConfigJson = {
97+
...fabloConfigJson,
98+
chaincodes: [...fabloConfigJson.chaincodes, chaincodeConfig],
99+
};
100+
}
101+
81102
if (flags.node) {
82103
console.log("Creating sample Node.js chaincode");
83104
this.fs.copy(this.templatePath("chaincodes"), this.destinationPath("chaincodes"));

0 commit comments

Comments
 (0)