Invoking qscc from client SDK (V2.0) #fabric-sdk-node #qscc


tingli_huoh@...
 

I think system chaincodes can be invoked from either client SDK or peer CLI.
Under the same fabric environment, I am able to invoke qscc from CLI but having an error when invoking from client SDK.
I was using the same method as invoking user chaincode.
The error reports "peer is not running chaincode qscc" at the code line of network.getContract('qscc')

So, I am wondering how can I invoke qscc from client SDK? Thank you!! 


Nicholas Leonardi
 

Hey Tingli,
Are you running fabric 2.x? 
Those functions won't work on 1.4 

Em quarta-feira, 2 de dezembro de 2020 23:49:58 BRT, tingli_huoh@... <tingli_huoh@...> escreveu:


I think system chaincodes can be invoked from either client SDK or peer CLI.
Under the same fabric environment, I am able to invoke qscc from CLI but having an error when invoking from client SDK.
I was using the same method as invoking user chaincode.
The error reports "peer is not running chaincode qscc" at the code line of network.getContract('qscc')

So, I am wondering how can I invoke qscc from client SDK? Thank you!! 


tingli_huoh@...
 

Hi Nicholas,

Yes. Just checked through <peer version> command and it is running on 2.x


Nicholas Leonardi
 

Check in your package.json if you're using     "fabric-network": "^2.2.0". If you're using 1.4 then it won't work. Also, from 1.4 to 2.2, there is no more fabric-client node package. You can check the documentation here Hyperledger Fabric SDK for Node.js Index




Em quinta-feira, 3 de dezembro de 2020 00:11:07 BRT, tingli_huoh@... <tingli_huoh@...> escreveu:


Hi Nicholas,

Yes. Just checked through <peer version> command and it is running on 2.x


Brett T Logan <brett.t.logan@...>
 

 
You'll need to upgrade to the absolute latest npm package, though I'm not sure if its been released yet, so you may need to use one of the snapshot packages: https://www.npmjs.com/package/fabric-network?activeTab=versions
 
Brett Logan
Software Engineer, IBM Blockchain
Phone: 1-984-242-6890
 
 
 

----- Original message -----
From: tingli_huoh@...
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Invoking qscc from client SDK (V2.0) #fabric-sdk-node #qscc
Date: Wed, Dec 2, 2020 10:11 PM
 
Hi Nicholas,

Yes. Just checked through <peer version> command and it is running on 2.x
 


tingli_huoh@...
 

Hi Nicholas,
It shows in my package.json with "fabric-network": "^2.1.0".
Also, thanks for the helpful info!

Hi Brett,
I see. Thanks for the information. Then I will try it out and get back...


Adhav Pavan
 

Hello Tingli,

I have verified with fabric v2.2 and it works fine.

We can invoke any qscc from fabric-network sdk.

Thank you.

Heartfelt Regards,

Pavan Adhav
Blockchain Developer, Infinichains
phone:  8390114357
email:  pavan@...
------
Please excuse my brevity.


On Thu, Dec 3, 2020 at 8:56 AM <tingli_huoh@...> wrote:
Hi Nicholas,
It shows in my package.json with "fabric-network": "^2.1.0".
Also, thanks for the helpful info!

Hi Brett,
I see. Thanks for the information. Then I will try it out and get back...