How to create a test with asset ownership? #fabric


Hi all,

We have a test case where multiple orgs can put assets into a blockchain, but only its "owner" can alter the asset's state. The owner is identified by the MspId of the transaction.
Is there a way to pass (or create) the context of the owner organization to the callback?

To illustrate: = function() {
let asset = asset_array[count++];
let tx = {
'transaction_type': 'AlterAsset',

//contx must be the context of the owner of the asset.
return bc.invokeSmartContract(contx, 'mychannel', '0', [tx], 100);


Join { to automatically receive all group messages.