Commit 9c02f544 authored by Matt Solomon's avatar Matt Solomon Committed by GitHub

chore: emit event on deploy (#12090)

parent 712b760f
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
"sourceCodeHash": "0xde4df0f9633dc0cdb1c9f634003ea5b0f7c5c1aebc407bc1b2f44c0ecf938649" "sourceCodeHash": "0xde4df0f9633dc0cdb1c9f634003ea5b0f7c5c1aebc407bc1b2f44c0ecf938649"
}, },
"src/L1/OPStackManager.sol": { "src/L1/OPStackManager.sol": {
"initCodeHash": "0x5b451782192b8429f6822c88270c4f0dbd10342518c5695ecf4dff7b5ebfb4e4", "initCodeHash": "0x92c72b75206e756742df25d67d295e4479e65db1473948b8f53cb4ca642025d5",
"sourceCodeHash": "0x4a9c242ce96471437ec97662d2365a7bda376db765c630a41cbe238811f1df51" "sourceCodeHash": "0x3cbd30c68cad0dd18d49165bd21d94422b7403174f91a733e2398539dadf8656"
}, },
"src/L1/OptimismPortal.sol": { "src/L1/OptimismPortal.sol": {
"initCodeHash": "0xbe2c0c81b3459014f287d8c89cdc0d27dde5d1f44e5d024fa1e4773ddc47c190", "initCodeHash": "0xbe2c0c81b3459014f287d8c89cdc0d27dde5d1f44e5d024fa1e4773ddc47c190",
......
...@@ -124,8 +124,8 @@ contract OPStackManager is ISemver, Initializable { ...@@ -124,8 +124,8 @@ contract OPStackManager is ISemver, Initializable {
// -------- Constants and Variables -------- // -------- Constants and Variables --------
/// @custom:semver 1.0.0-beta.5 /// @custom:semver 1.0.0-beta.6
string public constant version = "1.0.0-beta.5"; string public constant version = "1.0.0-beta.6";
/// @notice Address of the SuperchainConfig contract shared by all chains. /// @notice Address of the SuperchainConfig contract shared by all chains.
SuperchainConfig public immutable superchainConfig; SuperchainConfig public immutable superchainConfig;
...@@ -334,6 +334,7 @@ contract OPStackManager is ISemver, Initializable { ...@@ -334,6 +334,7 @@ contract OPStackManager is ISemver, Initializable {
// Transfer ownership of the ProxyAdmin from this contract to the specified owner. // Transfer ownership of the ProxyAdmin from this contract to the specified owner.
output.opChainProxyAdmin.transferOwnership(_input.roles.opChainProxyAdminOwner); output.opChainProxyAdmin.transferOwnership(_input.roles.opChainProxyAdminOwner);
emit Deployed(l2ChainId, output.systemConfigProxy);
return output; return output;
} }
......
...@@ -9,6 +9,7 @@ import { DeployOPChain_TestBase } from "test/DeployOPChain.t.sol"; ...@@ -9,6 +9,7 @@ import { DeployOPChain_TestBase } from "test/DeployOPChain.t.sol";
import { OPStackManager } from "src/L1/OPStackManager.sol"; import { OPStackManager } from "src/L1/OPStackManager.sol";
import { SuperchainConfig } from "src/L1/SuperchainConfig.sol"; import { SuperchainConfig } from "src/L1/SuperchainConfig.sol";
import { ProtocolVersions } from "src/L1/ProtocolVersions.sol"; import { ProtocolVersions } from "src/L1/ProtocolVersions.sol";
import { SystemConfig } from "src/L1/SystemConfig.sol";
// Exposes internal functions for testing. // Exposes internal functions for testing.
contract OPStackManager_Harness is OPStackManager { contract OPStackManager_Harness is OPStackManager {
...@@ -33,6 +34,8 @@ contract OPStackManager_Harness is OPStackManager { ...@@ -33,6 +34,8 @@ contract OPStackManager_Harness is OPStackManager {
contract OPStackManager_Deploy_Test is DeployOPChain_TestBase { contract OPStackManager_Deploy_Test is DeployOPChain_TestBase {
using stdStorage for StdStorage; using stdStorage for StdStorage;
event Deployed(uint256 indexed l2ChainId, SystemConfig indexed systemConfig);
function setUp() public override { function setUp() public override {
DeployOPChain_TestBase.setUp(); DeployOPChain_TestBase.setUp();
...@@ -83,6 +86,8 @@ contract OPStackManager_Deploy_Test is DeployOPChain_TestBase { ...@@ -83,6 +86,8 @@ contract OPStackManager_Deploy_Test is DeployOPChain_TestBase {
} }
function test_deploy_succeeds() public { function test_deploy_succeeds() public {
vm.expectEmit(true, false, true, true); // TODO precompute the system config address.
emit Deployed(doi.l2ChainId(), SystemConfig(address(1)));
opsm.deploy(toOPSMDeployInput(doi)); opsm.deploy(toOPSMDeployInput(doi));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment