0

I am trying to create a chaincode with different assets types.

Imagine that I have a chaincode where I store the users created and also the transactions where the users receive points.

How can I create a chaincode in a way that I am able to queryAllUsers and queryAllPointsTransactions? without using lists as it is available in this github https://github.com/IBM/customer-loyalty-program-hyperledger-fabric-VSCode Because when using lists we have problems with multiple clients and with multiple transactions at the same time.

Does anyone can help me on this?

Thanks a lot!

catsdev
  • 83
  • 1
  • 1
  • 5

1 Answers1

0

PutState the asset separately from each key, and use the function below.

GetQueryResult

GetStateByRange

myeongkil kim
  • 2,465
  • 4
  • 16
  • 22