I deployed a contract for an sub organisation of admin org with the following parameters:
[ AccountRole.SubOrgAdmin, 'ADMINORG' + '.' + subOrgName, 3, false, true ]
and deployed a contract for the sub org: const encodedABI = orgStoreHashContract.deploy({
data: byteCode,
arguments: [[integrityOrg.accountAddress]],
}).encodeABI();
const privateKey = config.get('quorum.adminOrg.privateKey');
const adminAccountAddress = web3.eth.accounts.privateKeyToAccount(privateKey).address;
const acctNonce = await web3.eth.getTransactionCount(adminAccountAddress);
const txParams = {
nonce: acctNonce,
gas: '0x0',
gasLimit: `0x${(config.get('quorum.gasLimit')).toString(16)}`,
gasPrice: '0x0',
data: encodedABI,
chainId: config.get('quorum.chainId'),
};
const signedTx = await signTx(txParams, web3);
const receipt = await web3.eth.sendSignedTransaction(signedTx);`
the contract get deployed successfully. But, when I try to do a transaction using the private key and address of created org, I get the error : 'Returned error: account does not have permission for the transaction'. Althoug, if I do transaction using the admin organization key , it is getting successful. Any idea what is going wrong here
I was expecting the transactions to get successful using the private key of sub org.