mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 07:25:10 +00:00
Adds a docker environment for running peer in dev mode pre-baked crypto and orderer/channel artifacts README still needs an updated curl command to bundle these scripts. simplified some of the paths add sacc from write your first chaincode remove binary Change-Id: Ic1537987c819f0350ae6dbf740fd00e1571045e5 Signed-off-by: Nick Gaski <ngaski@us.ibm.com> Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
26 lines
1,019 B
Bash
Executable file
26 lines
1,019 B
Bash
Executable file
#!/bin/bash
|
|
# Copyright London Stock Exchange Group All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
set -e
|
|
# This script expedites the chaincode development process by automating the
|
|
# requisite channel create/join commands
|
|
|
|
# We use a pre-generated orderer.block and channel transaction artifact (myc.tx),
|
|
# both of which are created using the configtxgen tool
|
|
|
|
# first we create the channel against the specified configuration in myc.tx
|
|
# this call returns a channel configuration block - myc.block - to the CLI container
|
|
peer channel create -c myc -f myc.tx -o orderer:7050
|
|
|
|
# now we will join the channel and start the chain with myc.block serving as the
|
|
# channel's first block (i.e. the genesis block)
|
|
peer channel join -b myc.block
|
|
|
|
# Now the user can proceed to build and start chaincode in one terminal
|
|
# And leverage the CLI container to issue install instantiate invoke query commands in another
|
|
|
|
#we should have bailed if above commands failed.
|
|
#we are here, so they worked
|
|
sleep 600000
|
|
exit 0
|