diff --git a/packages/protocol/genesis/GenerateGenesis.g.sol b/packages/protocol/genesis/GenerateGenesis.g.sol index 531570fab1c..9a9cda53bee 100644 --- a/packages/protocol/genesis/GenerateGenesis.g.sol +++ b/packages/protocol/genesis/GenerateGenesis.g.sol @@ -20,8 +20,7 @@ contract TestGenerateGenesis is Test, AddressResolver { vm.readFile(string.concat(vm.projectRoot(), "/deployments/genesis_config.json")); string private genesisAllocJSON = vm.readFile(string.concat(vm.projectRoot(), "/deployments/genesis_alloc.json")); - address private ownerTimelockController = configJSON.readAddress(".ownerTimelockController"); - address private ownerSecurityCouncil = configJSON.readAddress(".ownerSecurityCouncil"); + address private contractOwner = configJSON.readAddress(".contractOwner"); uint256 private l1ChainId = configJSON.readUint(".l1ChainId"); function testSharedContractsDeployment() public { @@ -61,7 +60,7 @@ contract TestGenerateGenesis is Test, AddressResolver { checkDeployedCode("RollupAddressManager"); // check proxy implementations - checkProxyImplementation("TaikoL2", ownerTimelockController); + checkProxyImplementation("TaikoL2", contractOwner); checkProxyImplementation("RollupAddressManager"); // check proxies @@ -73,7 +72,7 @@ contract TestGenerateGenesis is Test, AddressResolver { AddressManager addressManagerProxy = AddressManager(getPredeployedContractAddress("SharedAddressManager")); - assertEq(ownerSecurityCouncil, addressManagerProxy.owner()); + assertEq(contractOwner, addressManagerProxy.owner()); checkSavedAddress(addressManagerProxy, "Bridge", "bridge"); checkSavedAddress(addressManagerProxy, "ERC20Vault", "erc20_vault"); @@ -92,7 +91,7 @@ contract TestGenerateGenesis is Test, AddressResolver { AddressManager addressManagerProxy = AddressManager(getPredeployedContractAddress("RollupAddressManager")); - assertEq(ownerSecurityCouncil, addressManagerProxy.owner()); + assertEq(contractOwner, addressManagerProxy.owner()); checkSavedAddress(addressManagerProxy, "TaikoL2", "taiko"); checkSavedAddress(addressManagerProxy, "SignalService", "signal_service"); @@ -107,7 +106,7 @@ contract TestGenerateGenesis is Test, AddressResolver { function testTaikoL2() public { TaikoL2 taikoL2Proxy = TaikoL2(getPredeployedContractAddress("TaikoL2")); - assertEq(ownerTimelockController, taikoL2Proxy.owner()); + assertEq(contractOwner, taikoL2Proxy.owner()); assertEq(l1ChainId, taikoL2Proxy.l1ChainId()); vm.startPrank(taikoL2Proxy.GOLDEN_TOUCH_ADDRESS()); @@ -152,7 +151,7 @@ contract TestGenerateGenesis is Test, AddressResolver { addressManager.setAddress(1, "bridge", bridgeAddress); vm.stopPrank(); - assertEq(ownerSecurityCouncil, bridgeProxy.owner()); + assertEq(contractOwner, bridgeProxy.owner()); vm.expectRevert(Bridge.B_PERMISSION_DENIED.selector); bridgeProxy.processMessage( @@ -174,7 +173,7 @@ contract TestGenerateGenesis is Test, AddressResolver { assertEq(bridgeProxy.paused(), false); - vm.startPrank(ownerSecurityCouncil); + vm.startPrank(contractOwner); bridgeProxy.pause(); assertEq(bridgeProxy.paused(), true); @@ -212,7 +211,7 @@ contract TestGenerateGenesis is Test, AddressResolver { AddressManager addressManager = AddressManager(getPredeployedContractAddress("SharedAddressManager")); - assertEq(ownerSecurityCouncil, erc20VaultProxy.owner()); + assertEq(contractOwner, erc20VaultProxy.owner()); vm.startPrank(addressManager.owner()); addressManager.setAddress(1, "bridge", bridgeAddress); @@ -234,7 +233,7 @@ contract TestGenerateGenesis is Test, AddressResolver { AddressManager addressManager = AddressManager(getPredeployedContractAddress("SharedAddressManager")); - assertEq(ownerSecurityCouncil, erc721VaultProxy.owner()); + assertEq(contractOwner, erc721VaultProxy.owner()); vm.startPrank(addressManager.owner()); addressManager.setAddress(1, "bridge", bridgeAddress); @@ -256,7 +255,7 @@ contract TestGenerateGenesis is Test, AddressResolver { AddressManager addressManager = AddressManager(getPredeployedContractAddress("SharedAddressManager")); - assertEq(ownerSecurityCouncil, erc1155VaultProxy.owner()); + assertEq(contractOwner, erc1155VaultProxy.owner()); vm.startPrank(addressManager.owner()); addressManager.setAddress(1, "bridge", bridgeProxyAddress); @@ -276,11 +275,11 @@ contract TestGenerateGenesis is Test, AddressResolver { SignalService signalServiceProxy = SignalService(getPredeployedContractAddress("SignalService")); - assertEq(ownerSecurityCouncil, signalServiceProxy.owner()); + assertEq(contractOwner, signalServiceProxy.owner()); signalServiceProxy.sendSignal(keccak256(abi.encodePacked(block.prevrandao))); - vm.startPrank(ownerSecurityCouncil); + vm.startPrank(contractOwner); // SignalService signalService = // SignalService(payable(getPredeployedContractAddress("SignalServiceImpl"))); @@ -314,7 +313,7 @@ contract TestGenerateGenesis is Test, AddressResolver { ) private { - return checkProxyImplementation(proxyName, ownerSecurityCouncil); + return checkProxyImplementation(proxyName, contractOwner); } function checkProxyImplementation( diff --git a/packages/protocol/genesis/test_config.js b/packages/protocol/genesis/test_config.js index c0a90698ed3..43637193643 100644 --- a/packages/protocol/genesis/test_config.js +++ b/packages/protocol/genesis/test_config.js @@ -2,8 +2,7 @@ const ADDRESS_LENGTH = 40; module.exports = { - ownerTimelockController: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - ownerSecurityCouncil: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + contractOwner: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", l1ChainId: 1, chainId: 167, seedAccounts: [ diff --git a/packages/protocol/script/DeployOnL1.s.sol b/packages/protocol/script/DeployOnL1.s.sol index 5f65a2b1ebb..6c1a07461af 100644 --- a/packages/protocol/script/DeployOnL1.s.sol +++ b/packages/protocol/script/DeployOnL1.s.sol @@ -11,8 +11,6 @@ import "../contracts/L1/tiers/DevnetTierProvider.sol"; import "../contracts/L1/tiers/TierProviderV1.sol"; import "../contracts/L1/tiers/TierProviderV2.sol"; import "../contracts/L1/hooks/AssignmentHook.sol"; -import "../contracts/L1/gov/TaikoTimelockController.sol"; -import "../contracts/L1/gov/TaikoGovernor.sol"; import "../contracts/bridge/Bridge.sol"; import "../contracts/tokenvault/ERC20Vault.sol"; import "../contracts/tokenvault/ERC1155Vault.sol"; @@ -36,12 +34,10 @@ import { P256Verifier } from "p256-verifier/src/P256Verifier.sol"; /// @notice This script deploys the core Taiko protocol smart contract on L1, /// initializing the rollup. contract DeployOnL1 is DeployCapability { - uint256 public constant NUM_GUARDIANS = 5; + uint256 public constant NUM_MIN_MAJORITY_GUARDIANS = 7; + uint256 public constant NUM_MIN_MINORITY_GUARDIANS = 2; - address public constant MAINNET_SECURITY_COUNCIL = 0x7C50d60743D3FCe5a39FdbF687AFbAe5acFF49Fd; - - address securityCouncil = - block.chainid == 1 ? MAINNET_SECURITY_COUNCIL : vm.envAddress("SECURITY_COUNCIL"); + address public constant MAINNET_CONTRACT_OWNER = 0x9CBeE534B5D8a6280e01a14844Ee8aF350399C7F; // admin.taiko.eth modifier broadcast() { uint256 privateKey = vm.envUint("PRIVATE_KEY"); @@ -54,16 +50,18 @@ contract DeployOnL1 is DeployCapability { function run() external broadcast { addressNotNull(vm.envAddress("TAIKO_L2_ADDRESS"), "TAIKO_L2_ADDRESS"); addressNotNull(vm.envAddress("L2_SIGNAL_SERVICE"), "L2_SIGNAL_SERVICE"); + addressNotNull(vm.envAddress("CONTRACT_OWNER"), "CONTRACT_OWNER"); + require(vm.envBytes32("L2_GENESIS_HASH") != 0, "L2_GENESIS_HASH"); + address contractOwner = vm.envAddress("CONTRACT_OWNER"); // --------------------------------------------------------------- // Deploy shared contracts - (address sharedAddressManager, address timelock, address governor) = deploySharedContracts(); + (address sharedAddressManager) = deploySharedContracts(contractOwner); console2.log("sharedAddressManager: ", sharedAddressManager); - console2.log("timelock: ", timelock); // --------------------------------------------------------------- // Deploy rollup contracts - address rollupAddressManager = deployRollupContracts(sharedAddressManager, timelock); + address rollupAddressManager = deployRollupContracts(sharedAddressManager, contractOwner); // --------------------------------------------------------------- // Signal service need to authorize the new rollup @@ -92,24 +90,8 @@ contract DeployOnL1 is DeployCapability { console2.log("signalService.owner(): ", signalService.owner()); console2.log("------------------------------------------"); - TaikoTimelockController _timelock = TaikoTimelockController(payable(timelock)); - if (signalService.owner() == msg.sender) { - // Setup time lock roles - // Only the governor can make proposals after holders voting. - _timelock.grantRole(_timelock.PROPOSER_ROLE(), governor); - _timelock.grantRole(_timelock.PROPOSER_ROLE(), msg.sender); - - // Granting address(0) the executor role to allow open execution. - _timelock.grantRole(_timelock.EXECUTOR_ROLE(), address(0)); - _timelock.grantRole(_timelock.EXECUTOR_ROLE(), msg.sender); - - _timelock.grantRole(_timelock.TIMELOCK_ADMIN_ROLE(), securityCouncil); - _timelock.grantRole(_timelock.PROPOSER_ROLE(), securityCouncil); - _timelock.grantRole(_timelock.EXECUTOR_ROLE(), securityCouncil); - - signalService.transferOwnership(timelock); - acceptOwnership(signalServiceAddr, TimelockControllerUpgradeable(payable(timelock))); + signalService.transferOwnership(contractOwner); } else { console2.log("------------------------------------------"); console2.log("Warning - you need to transact manually:"); @@ -138,35 +120,21 @@ contract DeployOnL1 is DeployCapability { // --------------------------------------------------------------- // Deploy other contracts - deployAuxContracts(); + if (block.chainid != 1) { + deployAuxContracts(); + } if (AddressManager(sharedAddressManager).owner() == msg.sender) { - AddressManager(sharedAddressManager).transferOwnership(timelock); - acceptOwnership(sharedAddressManager, TimelockControllerUpgradeable(payable(timelock))); - console2.log("** sharedAddressManager ownership transferred to timelock:", timelock); + AddressManager(sharedAddressManager).transferOwnership(contractOwner); + console2.log("** sharedAddressManager ownership transferred to:", contractOwner); } - AddressManager(rollupAddressManager).transferOwnership(timelock); - acceptOwnership(rollupAddressManager, TimelockControllerUpgradeable(payable(timelock))); - console2.log("** rollupAddressManager ownership transferred to timelock:", timelock); - - _timelock.revokeRole(_timelock.TIMELOCK_ADMIN_ROLE(), address(this)); - _timelock.revokeRole(_timelock.PROPOSER_ROLE(), msg.sender); - _timelock.revokeRole(_timelock.EXECUTOR_ROLE(), msg.sender); - _timelock.transferOwnership(securityCouncil); - _timelock.renounceRole(_timelock.TIMELOCK_ADMIN_ROLE(), msg.sender); + AddressManager(rollupAddressManager).transferOwnership(contractOwner); + console2.log("** rollupAddressManager ownership transferred to:", contractOwner); } - function deploySharedContracts() - internal - returns (address sharedAddressManager, address timelock, address governor) - { - // Deploy the timelock - timelock = deployProxy({ - name: "timelock_controller", - impl: address(new TaikoTimelockController()), - data: abi.encodeCall(TaikoTimelockController.init, (address(0), 7 days)) - }); + function deploySharedContracts(address owner) internal returns (address sharedAddressManager) { + addressNotNull(owner, "owner"); sharedAddressManager = vm.envAddress("SHARED_ADDRESS_MANAGER"); if (sharedAddressManager == address(0)) { @@ -185,7 +153,7 @@ contract DeployOnL1 is DeployCapability { data: abi.encodeCall( TaikoToken.init, ( - timelock, + owner, vm.envString("TAIKO_TOKEN_NAME"), vm.envString("TAIKO_TOKEN_SYMBOL"), vm.envAddress("TAIKO_TOKEN_PREMINT_RECIPIENT") @@ -195,19 +163,6 @@ contract DeployOnL1 is DeployCapability { }); } - governor = deployProxy({ - name: "taiko_governor", - impl: address(new TaikoGovernor()), - data: abi.encodeCall( - TaikoGovernor.init, - ( - timelock, - IVotesUpgradeable(taikoToken), - TimelockControllerUpgradeable(payable(timelock)) - ) - ) - }); - // Deploy Bridging contracts deployProxy({ name: "signal_service", @@ -219,7 +174,7 @@ contract DeployOnL1 is DeployCapability { deployProxy({ name: "bridge", impl: address(new Bridge()), - data: abi.encodeCall(Bridge.init, (timelock, sharedAddressManager)), + data: abi.encodeCall(Bridge.init, (owner, sharedAddressManager)), registerTo: sharedAddressManager }); @@ -236,21 +191,21 @@ contract DeployOnL1 is DeployCapability { deployProxy({ name: "erc20_vault", impl: address(new ERC20Vault()), - data: abi.encodeCall(ERC20Vault.init, (timelock, sharedAddressManager)), + data: abi.encodeCall(ERC20Vault.init, (owner, sharedAddressManager)), registerTo: sharedAddressManager }); deployProxy({ name: "erc721_vault", impl: address(new ERC721Vault()), - data: abi.encodeCall(ERC721Vault.init, (timelock, sharedAddressManager)), + data: abi.encodeCall(ERC721Vault.init, (owner, sharedAddressManager)), registerTo: sharedAddressManager }); deployProxy({ name: "erc1155_vault", impl: address(new ERC1155Vault()), - data: abi.encodeCall(ERC1155Vault.init, (timelock, sharedAddressManager)), + data: abi.encodeCall(ERC1155Vault.init, (owner, sharedAddressManager)), registerTo: sharedAddressManager }); @@ -277,13 +232,13 @@ contract DeployOnL1 is DeployCapability { function deployRollupContracts( address _sharedAddressManager, - address timelock + address owner ) internal returns (address rollupAddressManager) { addressNotNull(_sharedAddressManager, "sharedAddressManager"); - addressNotNull(timelock, "timelock"); + addressNotNull(owner, "owner"); rollupAddressManager = deployProxy({ name: "rollup_address_manager", @@ -303,7 +258,7 @@ contract DeployOnL1 is DeployCapability { data: abi.encodeCall( TaikoL1.init, ( - timelock, + owner, rollupAddressManager, vm.envBytes32("L2_GENESIS_HASH"), vm.envBool("PAUSE_TAIKO_L1") @@ -315,20 +270,20 @@ contract DeployOnL1 is DeployCapability { deployProxy({ name: "assignment_hook", impl: address(new AssignmentHook()), - data: abi.encodeCall(AssignmentHook.init, (timelock, rollupAddressManager)) + data: abi.encodeCall(AssignmentHook.init, (owner, rollupAddressManager)) }); deployProxy({ name: "tier_provider", impl: deployTierProvider(vm.envString("TIER_PROVIDER")), - data: abi.encodeCall(TierProviderV1.init, (timelock)), + data: abi.encodeCall(TierProviderV1.init, (owner)), registerTo: rollupAddressManager }); deployProxy({ name: "tier_sgx", impl: address(new SgxVerifier()), - data: abi.encodeCall(SgxVerifier.init, (timelock, rollupAddressManager)), + data: abi.encodeCall(SgxVerifier.init, (owner, rollupAddressManager)), registerTo: rollupAddressManager }); @@ -355,11 +310,13 @@ contract DeployOnL1 is DeployCapability { address[] memory guardians = vm.envAddress("GUARDIAN_PROVERS", ","); - GuardianProver(guardianProverMinority).setGuardians(guardians, 1); - GuardianProver(guardianProverMinority).transferOwnership(timelock); + GuardianProver(guardianProverMinority).setGuardians( + guardians, uint8(NUM_MIN_MINORITY_GUARDIANS) + ); + GuardianProver(guardianProverMinority).transferOwnership(owner); - GuardianProver(guardianProver).setGuardians(guardians, uint8(vm.envUint("MIN_GUARDIANS"))); - GuardianProver(guardianProver).transferOwnership(timelock); + GuardianProver(guardianProver).setGuardians(guardians, uint8(NUM_MIN_MAJORITY_GUARDIANS)); + GuardianProver(guardianProver).transferOwnership(owner); // No need to proxy these, because they are 3rd party. If we want to modify, we simply // change the registerAddress("automata_dcap_attestation", address(attestation)); @@ -400,12 +357,4 @@ contract DeployOnL1 is DeployCapability { function addressNotNull(address addr, string memory err) private pure { require(addr != address(0), err); } - - function acceptOwnership(address proxy, TimelockControllerUpgradeable timelock) internal { - bytes32 salt = bytes32(block.timestamp); - bytes memory payload = abi.encodeCall(Ownable2StepUpgradeable(proxy).acceptOwnership, ()); - - timelock.schedule(proxy, 0, payload, bytes32(0), salt, 0); - timelock.execute(proxy, 0, payload, bytes32(0), salt); - } } diff --git a/packages/protocol/script/test_deploy_on_l1.sh b/packages/protocol/script/test_deploy_on_l1.sh index e63f92771a1..7dce3a714f7 100755 --- a/packages/protocol/script/test_deploy_on_l1.sh +++ b/packages/protocol/script/test_deploy_on_l1.sh @@ -7,11 +7,10 @@ export PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f PROPOSER=0x0000000000000000000000000000000000000000 \ TAIKO_TOKEN=0x0000000000000000000000000000000000000000 \ PROPOSER_ONE=0x0000000000000000000000000000000000000000 \ -GUARDIAN_PROVERS="0x1000777700000000000000000000000000000001,0x1000777700000000000000000000000000000002,0x1000777700000000000000000000000000000003,0x1000777700000000000000000000000000000004,0x1000777700000000000000000000000000000005" \ -MIN_GUARDIANS=3 \ +GUARDIAN_PROVERS="0x1000777700000000000000000000000000000001,0x1000777700000000000000000000000000000002,0x1000777700000000000000000000000000000003,0x1000777700000000000000000000000000000004,0x1000777700000000000000000000000000000005,0x1000777700000000000000000000000000000006,0x1000777700000000000000000000000000000007" \ TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \ L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \ -SECURITY_COUNCIL=0x60997970C51812dc3A010C7d01b50e0d17dc79C8 \ +CONTRACT_OWNER=0x60997970C51812dc3A010C7d01b50e0d17dc79C8 \ TAIKO_TOKEN_PREMINT_RECIPIENT=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \ TAIKO_TOKEN_NAME="Taiko Token Katla" \ TAIKO_TOKEN_SYMBOL=TTKOk \ diff --git a/packages/protocol/utils/generate_genesis/interface.ts b/packages/protocol/utils/generate_genesis/interface.ts index 34b7f337bf1..e3a6c2aa9bf 100644 --- a/packages/protocol/utils/generate_genesis/interface.ts +++ b/packages/protocol/utils/generate_genesis/interface.ts @@ -1,6 +1,5 @@ export interface Config { - ownerTimelockController: string; - ownerSecurityCouncil: string; + contractOwner: string; l1ChainId: number; chainId: number; seedAccounts: Array<{ diff --git a/packages/protocol/utils/generate_genesis/main.ts b/packages/protocol/utils/generate_genesis/main.ts index d50bd9d9f0e..a792c95a1c5 100644 --- a/packages/protocol/utils/generate_genesis/main.ts +++ b/packages/protocol/utils/generate_genesis/main.ts @@ -18,15 +18,13 @@ async function main() { : path.join(process.cwd(), process.argv[2]), ); - const ownerTimelockController = config.ownerTimelockController; - const ownerSecurityCouncil = config.ownerSecurityCouncil; + const contractOwner = config.contractOwner; const chainId = config.chainId; const seedAccounts = config.seedAccounts; const predeployERC20 = config.predeployERC20; if ( - !ethers.utils.isAddress(ownerTimelockController) || - !ethers.utils.isAddress(ownerSecurityCouncil) || + !ethers.utils.isAddress(contractOwner) || !Number.isInteger(chainId) || !Array.isArray(seedAccounts) || !seedAccounts.every((seedAccount) => { @@ -40,8 +38,7 @@ async function main() { ) { throw new Error( `invalid input: ${JSON.stringify({ - ownerTimelockController, - ownerSecurityCouncil, + contractOwner, chainId, seedAccounts, })}`, diff --git a/packages/protocol/utils/generate_genesis/taikoL2.ts b/packages/protocol/utils/generate_genesis/taikoL2.ts index c76864a69d3..f9d02b79d57 100644 --- a/packages/protocol/utils/generate_genesis/taikoL2.ts +++ b/packages/protocol/utils/generate_genesis/taikoL2.ts @@ -14,13 +14,7 @@ export async function deployTaikoL2( config: Config, result: Result, ): Promise { - const { - ownerTimelockController, - ownerSecurityCouncil, - l1ChainId, - chainId, - seedAccounts, - } = config; + const { contractOwner, l1ChainId, chainId, seedAccounts } = config; const alloc: any = {}; @@ -45,8 +39,7 @@ export async function deployTaikoL2( console.log("\n"); const contractConfigs: any = await generateContractConfigs( - ownerTimelockController, - ownerSecurityCouncil, + contractOwner, l1ChainId, chainId, config.contractAddresses, @@ -117,8 +110,7 @@ export async function deployTaikoL2( // generateContractConfigs returns all L2 contracts address, deployedBytecode, // and initialized variables. async function generateContractConfigs( - ownerTimelockController: string, - ownerSecurityCouncil: string, + contractOwner: string, l1ChainId: number, chainId: number, hardCodedAddresses: any, @@ -205,7 +197,7 @@ async function generateContractConfigs( addressMap[contractName] = hardCodedAddresses[contractName]; } else { addressMap[contractName] = ethers.utils.getCreate2Address( - ownerSecurityCouncil, + contractOwner, ethers.utils.keccak256( ethers.utils.toUtf8Bytes(`${chainId}${contractName}`), ), @@ -230,7 +222,7 @@ async function generateContractConfigs( ), ).deployedBytecode.object, variables: { - _owner: ownerSecurityCouncil, + _owner: contractOwner, }, }, SharedAddressManager: { @@ -245,7 +237,7 @@ async function generateContractConfigs( _initialized: 1, _initializing: false, // EssentialContract => Ownable2StepUpgradeable - _owner: ownerSecurityCouncil, + _owner: contractOwner, // AddressManager __addresses: { [chainId]: { @@ -292,7 +284,7 @@ async function generateContractConfigs( addressMap, ), variables: { - _owner: ownerSecurityCouncil, + _owner: contractOwner, }, }, Bridge: { @@ -306,7 +298,7 @@ async function generateContractConfigs( _initialized: 1, _initializing: false, // EssentialContract => Ownable2StepUpgradeable - _owner: ownerSecurityCouncil, + _owner: contractOwner, // EssentialContract => AddressResolver addressManager: addressMap.SharedAddressManager, }, @@ -326,7 +318,7 @@ async function generateContractConfigs( addressMap, ), variables: { - _owner: ownerSecurityCouncil, + _owner: contractOwner, }, }, ERC20Vault: { @@ -341,7 +333,7 @@ async function generateContractConfigs( _initialized: 1, _initializing: false, // EssentialContract => Ownable2StepUpgradeable - _owner: ownerSecurityCouncil, + _owner: contractOwner, // EssentialContract => AddressResolver addressManager: addressMap.SharedAddressManager, }, @@ -361,7 +353,7 @@ async function generateContractConfigs( addressMap, ), variables: { - _owner: ownerSecurityCouncil, + _owner: contractOwner, }, }, ERC721Vault: { @@ -376,7 +368,7 @@ async function generateContractConfigs( _initialized: 1, _initializing: false, // EssentialContract => Ownable2StepUpgradeable - _owner: ownerSecurityCouncil, + _owner: contractOwner, // EssentialContract => AddressResolver addressManager: addressMap.SharedAddressManager, }, @@ -396,7 +388,7 @@ async function generateContractConfigs( addressMap, ), variables: { - _owner: ownerSecurityCouncil, + _owner: contractOwner, }, }, ERC1155Vault: { @@ -411,7 +403,7 @@ async function generateContractConfigs( _initialized: 1, _initializing: false, // EssentialContract => Ownable2StepUpgradeable - _owner: ownerSecurityCouncil, + _owner: contractOwner, // EssentialContract => AddressResolver addressManager: addressMap.SharedAddressManager, }, @@ -422,27 +414,36 @@ async function generateContractConfigs( }, BridgedERC20: { address: addressMap.BridgedERC20Impl, - deployedBytecode: linkContractLibs(replaceUUPSImmutableValues( - contractArtifacts.BridgedERC20Impl, - uupsImmutableReferencesMap, - ethers.utils.hexZeroPad(addressMap.BridgedERC20Impl, 32), - ), addressMap), + deployedBytecode: linkContractLibs( + replaceUUPSImmutableValues( + contractArtifacts.BridgedERC20Impl, + uupsImmutableReferencesMap, + ethers.utils.hexZeroPad(addressMap.BridgedERC20Impl, 32), + ), + addressMap, + ), }, BridgedERC721: { address: addressMap.BridgedERC721Impl, - deployedBytecode: linkContractLibs(replaceUUPSImmutableValues( - contractArtifacts.BridgedERC721Impl, - uupsImmutableReferencesMap, - ethers.utils.hexZeroPad(addressMap.BridgedERC721Impl, 32), - ), addressMap), + deployedBytecode: linkContractLibs( + replaceUUPSImmutableValues( + contractArtifacts.BridgedERC721Impl, + uupsImmutableReferencesMap, + ethers.utils.hexZeroPad(addressMap.BridgedERC721Impl, 32), + ), + addressMap, + ), }, BridgedERC1155: { address: addressMap.BridgedERC1155Impl, - deployedBytecode: linkContractLibs(replaceUUPSImmutableValues( - contractArtifacts.BridgedERC1155Impl, - uupsImmutableReferencesMap, - ethers.utils.hexZeroPad(addressMap.BridgedERC1155Impl, 32), - ), addressMap), + deployedBytecode: linkContractLibs( + replaceUUPSImmutableValues( + contractArtifacts.BridgedERC1155Impl, + uupsImmutableReferencesMap, + ethers.utils.hexZeroPad(addressMap.BridgedERC1155Impl, 32), + ), + addressMap, + ), }, SignalServiceImpl: { address: addressMap.SignalServiceImpl, @@ -455,7 +456,7 @@ async function generateContractConfigs( addressMap, ), variables: { - _owner: ownerSecurityCouncil, + _owner: contractOwner, }, }, SignalService: { @@ -470,7 +471,7 @@ async function generateContractConfigs( _initialized: 1, _initializing: false, // EssentialContract => Ownable2StepUpgradeable - _owner: ownerSecurityCouncil, + _owner: contractOwner, // EssentialContract => AddressResolver addressManager: addressMap.SharedAddressManager, isAuthorized: { @@ -494,7 +495,7 @@ async function generateContractConfigs( addressMap, ), variables: { - _owner: ownerTimelockController, + _owner: contractOwner, }, }, TaikoL2: { @@ -508,7 +509,7 @@ async function generateContractConfigs( _initialized: 1, _initializing: false, // EssentialContract => Ownable2StepUpgradeable - _owner: ownerTimelockController, + _owner: contractOwner, // EssentialContract => AddressResolver addressManager: addressMap.RollupAddressManager, // TaikoL2 => CrossChainOwned @@ -545,7 +546,7 @@ async function generateContractConfigs( ), ).deployedBytecode.object, variables: { - _owner: ownerSecurityCouncil, + _owner: contractOwner, }, }, RollupAddressManager: { @@ -560,7 +561,7 @@ async function generateContractConfigs( _initialized: 1, _initializing: false, // EssentialContract => Ownable2StepUpgradeable - _owner: ownerSecurityCouncil, + _owner: contractOwner, // AddressManager __addresses: { [chainId]: { @@ -584,7 +585,8 @@ async function generateContractConfigs( // Libraries LibNetwork: { address: addressMap.LibNetwork, - deployedBytecode: contractArtifacts.LibNetwork.deployedBytecode.object, + deployedBytecode: + contractArtifacts.LibNetwork.deployedBytecode.object, }, }; }