In quorum.network, every node can deploy smart contract. How can I prevent the node from deploying smart contract or allow only specific node to do this.
Thank.
You can use "privateFor" field while deploying contract.In privateFor object pass the publicKey of participant node. Please refer below code:
web3.eth.contract(contract.abi).new({
data: "0x" + contract.bytecode,
gas: 80000000,
privateFor: ["bvpFyZCYmtPX3hyxNhmPXu0Rn/95S3IoqyK+IiZPlHw="],
from: owner,
}
Thanks,
You should consider using enhanced permissioning for Quorum. https://consensys.net/docs/goquorum/en/latest/configure-and-manage/manage/enhanced-permissions/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.