If a different chaincode deployed a world state variable, is it still accessible by another chaincode?

0 votes

Are variables in the World State access protected?

If it is not possible, how can I make a chaincode read the variables from another chaincode? I need it for my use case please help.

Apr 4, 2018 in Blockchain by Christine
• 15,790 points
60 views

1 answer to this question.

0 votes
No, variables stored by some chaincode (A) can only be accessed by the same chaincode (A). So if another chaincode (B) tries to access the variable, access will be denied.

If you wanted to access such variables (because your use case requires interconnection between chaincodes) you can invoke/query chaincode A from chaincode B.
answered Apr 4, 2018 by Perry
• 17,020 points

Related Questions In Blockchain

0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Is it possible to send eth to a contract through its constructor from another contract?

I found the solution for this: pragma solidity ...READ MORE

answered Sep 26, 2018 in Blockchain by slayer
• 29,170 points
103 views
0 votes
1 answer
+1 vote
1 answer

Hyperledger - How can I use transaction certificates to enforce privacy?

The transaction certificates don't actually address privacy ...READ MORE

answered Apr 17, 2018 in Blockchain by Perry
• 17,020 points
142 views
0 votes
1 answer

How to read a state after writing it into a chaincode?

Data that is 'written' in chaincode is ...READ MORE

answered May 28, 2018 in Blockchain by Perry
• 17,020 points
947 views
+1 vote
1 answer