accordproject / hlf-cicero-contract Goto Github PK
View Code? Open in Web Editor NEWAccord Project Cicero contracts on Hyperledger Fabric v2
License: Apache License 2.0
Accord Project Cicero contracts on Hyperledger Fabric v2
License: Apache License 2.0
I am trying to get this project to work with HLF V2.2 (or V2.1.1)
I have succeeded in loading the chaincode and initialising the chaincode.
The README is not clear on how to then invoke the "instance" / trigger.
Happy to help refine the README so that it works with V2.2.
Proposal to create a single shell script to check all the project requisites and install all the dependencies including the fabric-sample repository.
Currently the chaincode downloaded templates at runtime from an HTTPS url. It would be safer and more flexible to also support packaging the templates and deploying with the chaincode, and/or deploying the templates on-chain.
initialize.sh
# set these three values based on your HLF install location
export HLF_INSTALL_DIR=$HOME/Desktop/fabric-samples
export HLF_TEST_NETWORK=${HLF_INSTALL_DIR}/test-network
# end set
install.sh
# set these three values based on your HLF install location
export HLF_INSTALL_DIR=/Users/mincheung/Desktop/fabric-samples
export HLF_TEST_NETWORK=${HLF_INSTALL_DIR}/test-network
# end set
-> hlf-cicero-contract git:(master) ✗ ./install.sh && ./initialize.sh
Approved for org1
{
"approvals": {
"Org1MSP": true,
"Org2MSP": true
}
}
checkcommitreadiness
2020-09-02 23:27:28.772 BST [chaincodeCmd] ClientWait -> INFO 001 txid [e2ab45169434d98d67f8e3ffdec4938890bb2c177a47614be21e67142e04ef64] committed with status (VALID) at localhost:7051
2020-09-02 23:27:28.801 BST [chaincodeCmd] ClientWait -> INFO 002 txid [e2ab45169434d98d67f8e3ffdec4938890bb2c177a47614be21e67142e04ef64] committed with status (VALID) at localhost:9051
chaincode committed
2020-09-02 23:27:35.206 BST [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200 payload:"Initialized 1 clauses."
So the above of install and initialise were ok.
But trigger.sh is still looking for FABRIC_CFG_PATH, which was previously defined in my ~/.zshrc
export PATH=$HOME/Desktop/fabric-samples/bin:$PATH
export FABRIC_CFG_PATH=$HOME/Desktop/fabric-samples/config
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp
export CORE_PEER_ADDRESS=localhost:7051
# Environment variables for Org2
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID="Org2MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org2.example.com/users/[email protected]/msp
export CORE_PEER_ADDRESS=localhost:9051
So when executing .trigger.sh:
➜ hlf-cicero-contract git:(master) ✗ ./trigger.sh
2020-09-02 23:28:13.640 BST [main] InitCmd -> ERRO 001 Fatal error when initializing core config : FABRIC_CFG_PATH /Users/dselman/dev/fabric-samples/config/ does not exit
EDIT:
Forgot to also change trigger.sh:
export HLF_INSTALL_DIR=$HOME/Desktop/fabric-samples
Any idea if this contract runs on HLF v1.4, specifically on an AWS Managed Blockchain networK?
I would like to try some self made cicero contracts using the test network. However, I don't really understand where the src inside the markdown contracts are pointing to. Is it the .cta or .cto contract, the .ergo logic, the state of the contract or something else? Is there a way to initialize locally stored contracts? Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.