Tools, FAQ, Tutorials:
Install PaperNet Chaincode (Smart Contract)
How to install the PaperNet Chaincode (Smart Contract), papercontract.js?
✍: FYIcenter.com
If you are the MagnetoCorp administrator, you need to use
the peer chaincode install command to copy the papercontract chaincode
from their local machine’s file system to the file system within
the target peer’s docker container. Once the chaincode is installed
on the peer and instantiated on a channel, papercontract can be invoked
by client applications.
1. Install the chaincode:
(magnetocorp admin)$ cd ~/hyperledger-binaries/fabric-samples (magnetocorp admin)$ cd commercial-paper/organization/magnetocorp/contract (magnetocorp admin)$ docker exec cliMagnetoCorp peer chaincode install -n papercontract \ -v 0 -p /opt/gopath/src/github.com/contract -l node [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
Note that the "peer chaincode install" command takes the chaincode from the path on the cliMagnetoCorp container, /opt/gopath/src/github.com/contract, which is mapped to the commercial-paper/organization/magnetocorp/contract on the local system in the docker-compose.yml file.
2. Verify the installed chaincode:
(magnetocorp admin)$ docker exec cliMagnetoCorp peer chaincode list --installed Get installed chaincodes on peer: Name: papercontract, Version: 0, Path: /opt/gopath/src/github.com/contract, Id: 8532f0458c10ba741bc3791e7042da3771f17941008a6f156139582be63df6dd
Â
⇒ Instantiate PaperNet Chaincode (Smart Contract)
⇠papercontract.js - PaperNet Chaincode (Smart Contract)
⇑ commercial-paper Sample Network
⇑⇑ Hyperledger Tutorials
2019-12-02, 958👍, 0💬
Popular Posts:
How to pull NVIDIA CUDA Docker Image with the "docker image pull nvidia/cuda" command? If you are ru...
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how ...
How to extend json.JSONEncoder class? I want to encode other Python data types to JSON. If you encod...
What is EPUB 2.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 2.0 Metadata "dc:publisher" ...
How to use the "find-and-replace" Policy Statement for an Azure API service operation? The "find-and...