Giter VIP home page Giter VIP logo

cgschaincode's Introduction

cgschaincode

Testing Using dev mode:

Navigate to the chaincode-docker-devmode directory of the fabric-samples clone:

cd chaincode-docker-devmode

Terminal 1 - Start the network

docker-compose -f docker-compose-simple.yaml up

Terminal 2 - Build & start the chaincode

docker exec -it chaincode bash

cd cgschaincode

go build

CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0 ./cgschaincode

Terminal 3 - Use the chaincode

docker exec -it cli bash

peer chaincode install -p chaincodedev/chaincode/cgschaincode -n mycc -v 0

peer chaincode instantiate -n mycc -v 0 -c '{"Args":[""]}' -C myc

Upgrade with the new version 1.0

CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:1 ./cgschaincode

peer chaincode install -p chaincodedev/chaincode/cgschaincode -n mycc -v 1

peer chaincode upgrade -n mycc2 -v 1 -c '{"Args":[""]}' -C myc

Security Chaincode Functions:

  1. querySecurity(APIstub, args)
  2. initLedger(APIstub, args)
  3. createSecurity(APIstub, args)
  4. queryAllSecurities(APIstub, args)
  5. querySecurityStatus(APIstub, args)
  6. queryOwner(APIstub, args)
  7. queryOwnerAccount(APIstub, args)
  8. queryOwnerLength(APIstub, args)
  9. changeSecurity(APIstub, args)
  10. changeSecurityStatus(APIstub, args)
  11. changeOwnerAvaliable(APIstub, args)
  12. deleteSecurity(APIstub, args)
  13. deleteOwner(APIstub, args)
  14. updateOwnerInterest(APIstub, args)
  15. getHistoryForSecurity(APIstub, args)
  16. getHistoryTXIDForSecurity(APIstub, args)
  17. queryAllSecurityKeys(APIstub, args)
  18. changeBankSecurityTotals(APIstub, args)
  19. queryBankSecurityTotals(APIstub, args)
  20. querySecurityTotals(APIstub, args)

Account Chaincode Functions

  1. initAccount(APIstub, args)
  2. deleteAccount(APIstub, args)
  3. getStateAsBytes(APIstub, args)
  4. updateAccountStatus(APIstub, args)
  5. updateAccount(APIstub, args)
  6. updateAsset(APIstub, args)
  7. updateAssetBalance(APIstub, args)
  8. deleteAsset(APIstub, args)
  9. queryAsset(APIstub, args)
  10. queryAssetInfo(APIstub, args)
  11. queryAssetLength(APIstub, args)
  12. queryAccountStatus(APIstub, args)
  13. queryAllAccounts(APIstub, args)
  14. getHistoryForAccount(APIstub, args)
  15. getHistoryTXIDForAccount(APIstub, args)
  16. queryAllAccountKeys(APIstub, args)

Bank Chaincode Functions

  1. initBank(APIstub, args)
  2. updateBank(APIstub, args)
  3. deleteBank(APIstub, args)
  4. verifyBankList(APIstub, args)
  5. getStateAsBytes(APIstub, args)
  6. queryAllBanks(APIstub, args)
  7. getHistoryForBank(APIstub, args)
  8. getHistoryTXIDForBank(APIstub, args)
  9. queryAllBankKeys(APIstub, args)
  10. queryBankTotals(APIstub, args)

Transaction Chaincode Functions

  1. submitApproveTransaction(APIstub, args)
  2. submitEndDayTransaction(APIstub, args)
  3. securityTransfer(APIstub, args)
  4. securityCorrectTransfer(APIstub, args)
  5. queryTXIDTransactions(APIstub, args)
  6. queryTXKEYTransactions(APIstub, args)
  7. queryHistoryTXKEYTransactions(APIstub, args)
  8. getHistoryForTransaction(APIstub, args)
  9. getHistoryTXIDForTransaction(APIstub, args)
  10. getHistoryForQueuedTransaction(APIstub, args)
  11. getHistoryTXIDForQueuedTransaction(APIstub, args)
  12. queryAllTransactions(APIstub, args)
  13. queryAllQueuedTransactions(APIstub, args)
  14. queryAllHistoryTransactions(APIstub, args)
  15. queryAllTransactionKeys(APIstub, args)
  16. queryQueuedTransactionStatus(APIstub, args)
  17. queryHistoryTransactionStatus(APIstub, args)
  18. updateQueuedTransactionHcode(APIstub, args)
  19. updateHistoryTransactionHcode(APIstub, args)

Other Chaincode Functions

  1. mapFunction(APIstub, function, args)
  2. get(APIstub, function, args)
  3. put(APIstub, function, args)
  4. remove(APIstub, function, args)
  5. keys(APIstub, function, args)
  6. query(APIstub, function, args)

cgschaincode's People

Contributors

elliechen23 avatar

Watchers

James Cloos avatar

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.