@@ -9,9 +9,11 @@ import {
9
9
} from "@hyperledger/cactus-common" ;
10
10
import {
11
11
BesuTestLedger ,
12
- DEFAULT_FABRIC_2_AIO_FABRIC_VERSION ,
13
12
DEFAULT_FABRIC_2_AIO_IMAGE_NAME ,
14
- DEFAULT_FABRIC_2_AIO_IMAGE_VERSION ,
13
+ FABRIC_25_LTS_AIO_FABRIC_VERSION ,
14
+ FABRIC_25_LTS_AIO_IMAGE_VERSION ,
15
+ FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1 ,
16
+ FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2 ,
15
17
FabricTestLedgerV1 ,
16
18
} from "@hyperledger/cactus-test-tooling" ;
17
19
import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory" ;
@@ -86,46 +88,20 @@ export class CbdcBridgingAppDummyInfrastructure {
86
88
this . fabric = new FabricTestLedgerV1 ( {
87
89
publishAllPorts : true ,
88
90
imageName : DEFAULT_FABRIC_2_AIO_IMAGE_NAME ,
89
- imageVersion : DEFAULT_FABRIC_2_AIO_IMAGE_VERSION ,
91
+ imageVersion : FABRIC_25_LTS_AIO_IMAGE_VERSION ,
90
92
envVars : new Map ( [
91
- [ "FABRIC_VERSION" , DEFAULT_FABRIC_2_AIO_FABRIC_VERSION ] ,
93
+ [ "FABRIC_VERSION" , FABRIC_25_LTS_AIO_FABRIC_VERSION ] ,
92
94
] ) ,
93
95
logLevel : level || "DEBUG" ,
94
96
} ) ;
95
97
}
96
98
97
99
public get org1Env ( ) : NodeJS . ProcessEnv & DeploymentTargetOrgFabric2x {
98
- return {
99
- CORE_LOGGING_LEVEL : "debug" ,
100
- FABRIC_LOGGING_SPEC : "debug" ,
101
- CORE_PEER_LOCALMSPID : "Org1MSP" ,
102
-
103
- ORDERER_CA : `${ this . orgCfgDir } ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem` ,
104
-
105
- FABRIC_CFG_PATH : "/etc/hyperledger/fabric" ,
106
- CORE_PEER_TLS_ENABLED : "true" ,
107
- CORE_PEER_TLS_ROOTCERT_FILE : `${ this . orgCfgDir } peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt` ,
108
- CORE_PEER_MSPCONFIGPATH : `${ this . orgCfgDir } peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp` ,
109
- CORE_PEER_ADDRESS : "peer0.org1.example.com:7051" ,
110
- ORDERER_TLS_ROOTCERT_FILE : `${ this . orgCfgDir } ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem` ,
111
- } ;
100
+ return FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1 ;
112
101
}
113
102
114
103
public get org2Env ( ) : NodeJS . ProcessEnv & DeploymentTargetOrgFabric2x {
115
- return {
116
- CORE_LOGGING_LEVEL : "debug" ,
117
- FABRIC_LOGGING_SPEC : "debug" ,
118
- CORE_PEER_LOCALMSPID : "Org2MSP" ,
119
-
120
- FABRIC_CFG_PATH : "/etc/hyperledger/fabric" ,
121
- CORE_PEER_TLS_ENABLED : "true" ,
122
- ORDERER_CA : `${ this . orgCfgDir } ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem` ,
123
-
124
- CORE_PEER_ADDRESS : "peer0.org2.example.com:9051" ,
125
- CORE_PEER_MSPCONFIGPATH : `${ this . orgCfgDir } peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp` ,
126
- CORE_PEER_TLS_ROOTCERT_FILE : `${ this . orgCfgDir } peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt` ,
127
- ORDERER_TLS_ROOTCERT_FILE : `${ this . orgCfgDir } ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem` ,
128
- } ;
104
+ return FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2 ;
129
105
}
130
106
131
107
public async start ( ) : Promise < void > {
@@ -411,7 +387,7 @@ export class CbdcBridgingAppDummyInfrastructure {
411
387
sourceFiles,
412
388
ccName : contractName ,
413
389
targetOrganizations : [ this . org1Env , this . org2Env ] ,
414
- caFile : ` ${ this . orgCfgDir } ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem` ,
390
+ caFile : FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1 . ORDERER_TLS_ROOTCERT_FILE ,
415
391
ccLabel : "asset-reference-contract" ,
416
392
ccLang : ChainCodeProgrammingLanguage . Typescript ,
417
393
ccSequence : 1 ,
@@ -538,7 +514,7 @@ export class CbdcBridgingAppDummyInfrastructure {
538
514
sourceFiles,
539
515
ccName : contractName ,
540
516
targetOrganizations : [ this . org1Env , this . org2Env ] ,
541
- caFile : ` ${ this . orgCfgDir } ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem` ,
517
+ caFile : FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1 . ORDERER_TLS_ROOTCERT_FILE ,
542
518
ccLabel : "cbdc" ,
543
519
ccLang : ChainCodeProgrammingLanguage . Javascript ,
544
520
ccSequence : 1 ,
0 commit comments