From ef1c54c5b5202e05a6172c12a0e55cbe602539a4 Mon Sep 17 00:00:00 2001 From: Jeffery Walsh Date: Mon, 8 May 2023 17:09:52 -0700 Subject: [PATCH] . --- .../test/genesis/GenerateGenesis.g.sol | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/packages/protocol/test/genesis/GenerateGenesis.g.sol b/packages/protocol/test/genesis/GenerateGenesis.g.sol index c1651441f86..4def615351e 100644 --- a/packages/protocol/test/genesis/GenerateGenesis.g.sol +++ b/packages/protocol/test/genesis/GenerateGenesis.g.sol @@ -32,6 +32,8 @@ contract TestGenerateGenesis is Test, AddressResolver { string.concat(vm.projectRoot(), "/deployments/genesis_alloc.json") ); address private owner = configJSON.readAddress(".contractOwner"); + address private admin = configJSON.readAddress(".contractOwner"); + uint64 public constant BLOCK_GAS_LIMIT = 30000000; function testContractDeployment() public { @@ -46,12 +48,22 @@ contract TestGenerateGenesis is Test, AddressResolver { checkDeployedCode("ProxiedSignalService"); // check proxies - checkDeployedCode("TaikoL1Proxy"); + checkDeployedCode("TaikoL2Proxy"); checkDeployedCode("TokenVaultProxy"); checkDeployedCode("EtherVaultProxy"); checkDeployedCode("BridgeProxy"); checkDeployedCode("AddressManagerProxy"); checkDeployedCode("SignalServiceProxy"); + + checkProxyImplementation("TaikoL2Proxy", "ProxiedTaikoL2"); + checkProxyImplementation("TokenVaultProxy", "ProxiedTokenVault"); + checkProxyImplementation("EtherVaultProxy", "ProxiedEtherVault"); + checkProxyImplementation("BridgeProxy", "ProxiedBridge"); + checkProxyImplementation( + "AddressManagerProxy", + "ProxiedAddressManager" + ); + checkProxyImplementation("SignalServiceProxy", "ProxiedSignalService"); } function testAddressManager() public { @@ -210,6 +222,23 @@ contract TestGenerateGenesis is Test, AddressResolver { assertEq(address(contractAddress).code, vm.parseBytes(deployedCode)); } + function checkProxyImplementation( + string memory proxyName, + string memory contractName + ) private { + address contractAddress = getPredeployedContractAddress(contractName); + address proxyAddress = getPredeployedContractAddress(proxyName); + assertEq( + TransparentUpgradeableProxy(payable(proxyAddress)).implementation(), + address(contractAddress) + ); + + assertEq( + TransparentUpgradeableProxy(payable(proxyAddress)).admin(), + owner + ); + } + function checkSavedAddress( AddressManager addressManager, string memory contractName,