Giter Club home page Giter Club logo

hlf-cicero-contract's People

Contributors

dependabot[bot] avatar dselman avatar kthomas-digicat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hlf-cicero-contract's Issues

Getting a Contract to work with Hyperledger Fabric V2.2(or V2.1.1)

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.

Support Deploying Templates

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.

[Question] After modification in install.sh and initialize.sh to my username is still looking for FABRIC_CFG_PATH does not exist?

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

[Question] Initializing a custom contract

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.