Skip to content

This repository contains the advance fabric topics with the link to the details explanation.

Notifications You must be signed in to change notification settings

adityajoshi12/fabric-samples-advance-topics

Repository files navigation

Fabric Advance Topics

This repository contains the advance fabric topics with the link to the details explanation. If you find this repository , Please Star and Fork this repository it really gives me motivation to make such content and you can also follow me on medium for such content.

Table of Contents

  1. Roadmap
  2. Content
  3. Courses
  4. CFSSL

Roadmap for Hyperledger Fabric - Use Coupon LAUNCH-OFFER and get it for FREE.


Install cfssl

Linux

VERSION=$(curl --silent "https://api.github.com/repos/cloudflare/cfssl/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
VNUMBER=${VERSION#"v"}
wget https://github.com/cloudflare/cfssl/releases/download/${VERSION}/cfssl_${VNUMBER}_linux_amd64 -O cfssl
chmod +x cfssl
sudo mv cfssl /usr/local/bin
VERSION=$(curl --silent "https://api.github.com/repos/cloudflare/cfssl/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
VNUMBER=${VERSION#"v"}
wget https://github.com/cloudflare/cfssl/releases/download/${VERSION}/cfssljson_${VNUMBER}_linux_amd64 -O cfssljson
chmod +x cfssljson
sudo mv cfssljson /usr/local/bin

MacOS

VERSION=$(curl --silent "https://api.github.com/repos/cloudflare/cfssl/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
VNUMBER=${VERSION#"v"}
wget https://github.com/cloudflare/cfssl/releases/download/${VERSION}/cfssl_${VNUMBER}_darwin_amd64 -O cfssl
chmod +x cfssl
sudo mv cfssl /usr/local/bin

VERSION=$(curl --silent "https://api.github.com/repos/cloudflare/cfssl/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
VNUMBER=${VERSION#"v"}
wget https://github.com/cloudflare/cfssl/releases/download/${VERSION}/cfssljson_${VNUMBER}_darwin_amd64 -O cfssljson
chmod +x cfssljson
sudo mv cfssljson /usr/local/bin

Setup CLI

export PATH=$PWD/../bin/linux:$PATH
export FABRIC_CFG_PATH=${PWD}/../config
source ./scripts/envVar.sh
setGlobals 1

Chaincode invoke

peer chaincode invoke -o localhost:7050 --tls true --cafile $ORDERER_CA -C testchannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["InitLedger"]}'


peer chaincode query -C testchannel -n basic -c '{"Args":["GetAllAssets"]}'

peer chaincode invoke -o localhost:7050 --tls true --cafile $ORDERER_CA -C testchannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["CreateAsset","100","Red","5","Aditya","2000"]}'


peer chaincode invoke -o localhost:7050 --tls true --cafile $ORDERER_CA -C testchannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["TransferAsset","100","Nithin"]}'

peer chaincode query -C testchannel -n basic -c '{"Args":["GetAllAssets"]}'

About

This repository contains the advance fabric topics with the link to the details explanation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published