Questions tagged [hyperledger-chaincode]
448 questions
0
votes
3 answers
failed to invoke chaincode name:"lscc" , error: transaction returned with failure: Undefined contract method called
i'm trying to install java chaincode of facar from fabric-samples but getting error.
https://github.com/hyperledger/fabric-samples/tree/release-1.4/chaincode/fabcar/java
above chaincode i'm trying & getting error during instantiation of…

Prafull Rawal
- 57
- 9
0
votes
1 answer
The changed code in chaincode does not take effort after restart the BYFN network?
I'm writing chaincode application using the provided byfn network in hyperledger fabric V1.4. When i add or delete some codes, i shutdown the byfn network and remove the docker container, and then restart the byfn network, install and instantiate…

liuqi
- 131
- 1
- 8
0
votes
1 answer
Integration between APPs in Hyperledger-Fabric
I have 2 applications (App1/App2) are deployed on same Hyperledger-Fabric network and both are running on different channel .
We have simple requirement to share some data from App1 to App2 .
So the question is : how to make the integration between…

Koptan
- 85
- 1
- 8
0
votes
1 answer
Chaincode Query Transcation is not executing in EC2 Insance
please find the image first intsertion was happened sucessfully.I am trying to query my transaction in Amazon-EC2 but it is returning NULL with endorsement failure even though my insertion transaction is working fine in the local system.
This is the…

nagendra megavat
- 1
- 2
0
votes
1 answer
How to add events in chaincode? (Hyperledger Fabric)
I am trying to make events work in Hyperledger Fabric. I have written the setEvent function in my chaincode and added a listener (addContractListener) in my application file. Nothing seems to happen
In my contract file, right after a putState…

Yash Damani
- 105
- 3
- 12
0
votes
1 answer
How I can deploy a couchDb index for my Hyperledger Fabric chaincode?
I'm trying to deploy a chaincode with a couchdb index, but it's not working.
I use Hyperledger fabric version 2.0 alpha and my chaincode is in go.
This is my index
{"index":{"fields":["price"]},"ddoc":"indexPriceDoc",…

pigoth
- 11
0
votes
1 answer
Is it possible to use external node module in our fabric chainCode/ smart contract?
I am trying to write a chainCode and for the implementation of logic, I need to use an external node package, which is not a part of fabric API. Is it possible to do that?
I've never seen a chainCode example, which requires an external node module.…

ethertest
- 317
- 4
- 13
0
votes
1 answer
Hyperledger Fabric - Implementing transaction types and configuring endorsement policies for each transaction type
In Hyperledger Fabric, one asset has multiple transactions. These transactions update the state of the asset and maintain a trace as well.
Currently, if I want to have different transaction types for one asset, then I've written different functions…

Raman Kishore
- 542
- 2
- 12
0
votes
1 answer
Track who did what using digital signatures
Currently I'm working with Hyperledger Fabric. I want to track info who submitted a transaction. Is there someone who can help my with this problem ? Who can tell what should i do?

TienThanh
- 34
- 1
- 13
0
votes
1 answer
How to use stub.getTransient() in Node Chaincode
I have a chaincode written in node.js and I am trying to read transient values but it's not working properly:
my code:
let secretData = stub.getTransient();
let value = secretData.get('privayeKey').toBuffer().toString('utf8')
value is not correct.…

Narayan Prusty
- 2,501
- 3
- 22
- 41
0
votes
0 answers
Issue with instantiating contract as per the MagnetoCorp example
Whenever I try to instantiate a contract according to the MagnetoCorp example, I receive the following errors. In the terminal:
$ docker exec cliMagnetoCorp peer chaincode instantiate -n
papercontract -v 0 -l node -c
…

mp94
- 11
- 1
- 7
0
votes
1 answer
GetStateByPartialCompositeKey by a specific key not working
Currently I'm working with Hyperledger chaincode,
I have a problem with the method "GetStateByPartialCompositeKey".
They index consists of 3 parts (key1~key2~key3).
If i try GetStateByPartialCompositeKey(index, key1) , it works perfectly.
But If…

TienThanh
- 34
- 1
- 13
0
votes
1 answer
How to get Transaction Submitter in Hyperledger Fabric chaincode
Currently I'm working with Hyperledger Fabric chaincode and trying to get at least any info regarding current user who invokes/queries chaincode.
How do I solve this problem?

TienThanh
- 34
- 1
- 13
0
votes
0 answers
Chaincode instantiation error, log says npm err! missing script: start, even though package.json with start script is present
I'm trying to install and instantiate chaincode in a hyperledger fabric network setup by me. I've written the chaincode in node.js and it installs perfectly from bash of cli container. But when I try to instantiate the chaincode it gives error…

Varan Shukla
- 1
- 1
0
votes
1 answer
Debug my already instanitated nodejs chaincode
I have developed Node.js chaincode in dev mode by following these three steps
peer chaincode install -n {} -v {} -p {} -l node
peer chaincode instantiate -n {} -v {} -c {} -o {} -C mychannel
peer chaincode invoke -n {} -v {} -o {} -c{}
Now each…

Rohit Kumar
- 438
- 2
- 6
- 16