Ethereum 如何在部署时管理合同的所有权
我有三份合同:Contract1.sol,Contract2.sol,Contract2.sol 还有这个块菌迁移文件:Ethereum 如何在部署时管理合同的所有权,ethereum,solidity,smartcontracts,truffle,Ethereum,Solidity,Smartcontracts,Truffle,我有三份合同:Contract1.sol,Contract2.sol,Contract2.sol 还有这个块菌迁移文件: const _startBlock = 18; module.exports = async function (deployer) { deployer .deploy(Contract1) .then(async function (instance) { deployer.deploy( Contract2,
const _startBlock = 18;
module.exports = async function (deployer) {
deployer
.deploy(Contract1)
.then(async function (instance) {
deployer.deploy(
Contract2,
instance.address,
_startBlock
);
});
deployer.deploy(Contract3);
};
我的目标是:
Contract1 Owned by Contract2
Contract2 Owned by Contract3
如何从块菌中管理它们?解决方案是按原样发布它们,然后转移所有权