Skip to content

Commit

Permalink
feat(connector-fabric): contract deployment Fabric 2.x
Browse files Browse the repository at this point in the history
Primary change:
--------------

Add support for deploying contracts to Fabric 2.x ledgers
Languages supported (and covered by tests):
- golang
- javascript
- typescript

It is assumed that the server that is running the Fabric
ledger containers have the required dependencies to build
the contracts.
In the case of the tests this is provided by the Cactus
Fabric All-In-One container image which has NodeJS and Go
installed on it.

Secondary change(s):
-------------------

Breaking API change: renamed the contract deployment endpoint
that supports Fabric 1.4.x so that:
- the default implementation of it now assumes Fabric 2.x
- there is still a compatible version of the endpoint for 1.4.x

Fixes #654

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Apr 25, 2021
1 parent 985f12f commit 3ec94ec
Show file tree
Hide file tree
Showing 35 changed files with 3,282 additions and 4,278 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export class SupplyChainAppDummyInfrastructure {
instanceId: "PluginLedgerConnectorFabric_Contract_Deployment",
dockerBinary: "/usr/local/bin/docker",
pluginRegistry,
peerBinary: "peer",
sshConfig: sshConfig,
logLevel: this.options.logLevel || "INFO",
connectionProfile: connectionProfile,
Expand All @@ -260,7 +261,7 @@ export class SupplyChainAppDummyInfrastructure {
},
});

const res = await connector.deployContract({
const res = await connector.deployContractGoSourceV1({
tlsRootCertFiles: org1Env.CORE_PEER_TLS_ROOTCERT_FILE as string,
targetPeerAddresses: [org1Env.CORE_PEER_ADDRESS as string],
policyDslSource: "OR('Org1MSP.member','Org2MSP.member')",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ export class SupplyChainApp {
const fabricConnector = new PluginLedgerConnectorFabric({
instanceId: "PluginLedgerConnectorFabric_C",
dockerBinary: "/usr/local/bin/docker",
peerBinary: "peer",
cliContainerEnv: org1Env,
connectionProfile: connectionProfile,
sshConfig: sshConfig,
Expand Down
Loading

0 comments on commit 3ec94ec

Please sign in to comment.