Commit 4252ddd3 authored by Michael Amadi's avatar Michael Amadi Committed by GitHub

use camel case for opcm outputversion var (#13815)

* use camel case for opcm outputversion var

* fix test

* rm entirely
parent df5ba615
...@@ -129,19 +129,6 @@ ...@@ -129,19 +129,6 @@
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "constructor" "type": "constructor"
}, },
{
"inputs": [],
"name": "OUTPUT_VERSION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [ "inputs": [
{ {
...@@ -629,12 +616,6 @@ ...@@ -629,12 +616,6 @@
{ {
"anonymous": false, "anonymous": false,
"inputs": [ "inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "outputVersion",
"type": "uint256"
},
{ {
"indexed": true, "indexed": true,
"internalType": "uint256", "internalType": "uint256",
......
...@@ -129,19 +129,6 @@ ...@@ -129,19 +129,6 @@
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "constructor" "type": "constructor"
}, },
{
"inputs": [],
"name": "OUTPUT_VERSION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [ "inputs": [
{ {
...@@ -629,12 +616,6 @@ ...@@ -629,12 +616,6 @@
{ {
"anonymous": false, "anonymous": false,
"inputs": [ "inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "outputVersion",
"type": "uint256"
},
{ {
"indexed": true, "indexed": true,
"internalType": "uint256", "internalType": "uint256",
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
"sourceCodeHash": "0xc6613d35d1ad95cbef26a503a10b5dd8663ceb80426f8c528835d39f79e4b4cf" "sourceCodeHash": "0xc6613d35d1ad95cbef26a503a10b5dd8663ceb80426f8c528835d39f79e4b4cf"
}, },
"src/L1/OPContractsManager.sol": { "src/L1/OPContractsManager.sol": {
"initCodeHash": "0x1acc2f3d7cf2b0dd380fbf3230648a8beb77e8d3eca05fb5da46efdb91c08530", "initCodeHash": "0xd523359106bfdca4189401bba564d2856a7122b705f9ad2698b8b43bb28169c8",
"sourceCodeHash": "0xdfd5c91e5ddbbf2ad82b867cbf7403437decd6ca70b87891eec935665f17ffd5" "sourceCodeHash": "0x823041c951d9df921295b25f9151b57292a64de98fec2c12849e9fe6a3fb635d"
}, },
"src/L1/OptimismPortal2.sol": { "src/L1/OptimismPortal2.sol": {
"initCodeHash": "0x969e3687d4497cc168af61e610ba0ae187e80f86aaa7b5d5bb598de19f279f08", "initCodeHash": "0x969e3687d4497cc168af61e610ba0ae187e80f86aaa7b5d5bb598de19f279f08",
......
...@@ -135,12 +135,8 @@ contract OPContractsManager is ISemver { ...@@ -135,12 +135,8 @@ contract OPContractsManager is ISemver {
// -------- Constants and Variables -------- // -------- Constants and Variables --------
/// @custom:semver 1.0.0-beta.31 /// @custom:semver 1.0.0-beta.32
string public constant version = "1.0.0-beta.31"; string public constant version = "1.0.0-beta.32";
/// @notice Represents the interface version so consumers know how to decode the DeployOutput struct
/// that's emitted in the `Deployed` event. Whenever that struct changes, a new version should be used.
uint256 public constant OUTPUT_VERSION = 0;
/// @notice Address of the SuperchainConfig contract shared by all chains. /// @notice Address of the SuperchainConfig contract shared by all chains.
ISuperchainConfig public immutable superchainConfig; ISuperchainConfig public immutable superchainConfig;
...@@ -167,13 +163,10 @@ contract OPContractsManager is ISemver { ...@@ -167,13 +163,10 @@ contract OPContractsManager is ISemver {
// -------- Events -------- // -------- Events --------
/// @notice Emitted when a new OP Stack chain is deployed. /// @notice Emitted when a new OP Stack chain is deployed.
/// @param outputVersion Version that indicates how to decode the `deployOutput` argument.
/// @param l2ChainId Chain ID of the new chain. /// @param l2ChainId Chain ID of the new chain.
/// @param deployer Address that deployed the chain. /// @param deployer Address that deployed the chain.
/// @param deployOutput ABI-encoded output of the deployment. /// @param deployOutput ABI-encoded output of the deployment.
event Deployed( event Deployed(uint256 indexed l2ChainId, address indexed deployer, bytes deployOutput);
uint256 indexed outputVersion, uint256 indexed l2ChainId, address indexed deployer, bytes deployOutput
);
// -------- Errors -------- // -------- Errors --------
...@@ -397,7 +390,7 @@ contract OPContractsManager is ISemver { ...@@ -397,7 +390,7 @@ contract OPContractsManager is ISemver {
// 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(OUTPUT_VERSION, l2ChainId, msg.sender, abi.encode(output)); emit Deployed(l2ChainId, msg.sender, abi.encode(output));
return output; return output;
} }
......
...@@ -56,9 +56,7 @@ contract OPContractsManager_Harness is OPContractsManager { ...@@ -56,9 +56,7 @@ contract OPContractsManager_Harness is OPContractsManager {
contract OPContractsManager_Deploy_Test is DeployOPChain_TestBase { contract OPContractsManager_Deploy_Test is DeployOPChain_TestBase {
using stdStorage for StdStorage; using stdStorage for StdStorage;
event Deployed( event Deployed(uint256 indexed l2ChainId, address indexed deployer, bytes deployOutput);
uint256 indexed outputVersion, uint256 indexed l2ChainId, address indexed deployer, bytes deployOutput
);
function setUp() public override { function setUp() public override {
DeployOPChain_TestBase.setUp(); DeployOPChain_TestBase.setUp();
...@@ -127,7 +125,7 @@ contract OPContractsManager_Deploy_Test is DeployOPChain_TestBase { ...@@ -127,7 +125,7 @@ contract OPContractsManager_Deploy_Test is DeployOPChain_TestBase {
function test_deploy_succeeds() public { function test_deploy_succeeds() public {
vm.expectEmit(true, true, true, false); // TODO precompute the expected `deployOutput`. vm.expectEmit(true, true, true, false); // TODO precompute the expected `deployOutput`.
emit Deployed(0, doi.l2ChainId(), address(this), bytes("")); emit Deployed(doi.l2ChainId(), address(this), bytes(""));
opcm.deploy(toOPCMDeployInput(doi)); opcm.deploy(toOPCMDeployInput(doi));
} }
} }
......
...@@ -779,7 +779,6 @@ contract Specification_Test is CommonTest { ...@@ -779,7 +779,6 @@ contract Specification_Test is CommonTest {
_addSpec({ _name: "OPContractsManager", _sel: _getSel("superchainConfig()") }); _addSpec({ _name: "OPContractsManager", _sel: _getSel("superchainConfig()") });
_addSpec({ _name: "OPContractsManager", _sel: _getSel("protocolVersions()") }); _addSpec({ _name: "OPContractsManager", _sel: _getSel("protocolVersions()") });
_addSpec({ _name: "OPContractsManager", _sel: _getSel("l1ContractsRelease()") }); _addSpec({ _name: "OPContractsManager", _sel: _getSel("l1ContractsRelease()") });
_addSpec({ _name: "OPContractsManager", _sel: _getSel("OUTPUT_VERSION()") });
_addSpec({ _name: "OPContractsManager", _sel: OPContractsManager.deploy.selector }); _addSpec({ _name: "OPContractsManager", _sel: OPContractsManager.deploy.selector });
_addSpec({ _name: "OPContractsManager", _sel: OPContractsManager.blueprints.selector }); _addSpec({ _name: "OPContractsManager", _sel: OPContractsManager.blueprints.selector });
_addSpec({ _name: "OPContractsManager", _sel: OPContractsManager.chainIdToBatchInboxAddress.selector }); _addSpec({ _name: "OPContractsManager", _sel: OPContractsManager.chainIdToBatchInboxAddress.selector });
...@@ -791,7 +790,6 @@ contract Specification_Test is CommonTest { ...@@ -791,7 +790,6 @@ contract Specification_Test is CommonTest {
_addSpec({ _name: "OPContractsManagerInterop", _sel: _getSel("superchainConfig()") }); _addSpec({ _name: "OPContractsManagerInterop", _sel: _getSel("superchainConfig()") });
_addSpec({ _name: "OPContractsManagerInterop", _sel: _getSel("protocolVersions()") }); _addSpec({ _name: "OPContractsManagerInterop", _sel: _getSel("protocolVersions()") });
_addSpec({ _name: "OPContractsManagerInterop", _sel: _getSel("l1ContractsRelease()") }); _addSpec({ _name: "OPContractsManagerInterop", _sel: _getSel("l1ContractsRelease()") });
_addSpec({ _name: "OPContractsManagerInterop", _sel: _getSel("OUTPUT_VERSION()") });
_addSpec({ _name: "OPContractsManagerInterop", _sel: OPContractsManager.deploy.selector }); _addSpec({ _name: "OPContractsManagerInterop", _sel: OPContractsManager.deploy.selector });
_addSpec({ _name: "OPContractsManagerInterop", _sel: OPContractsManager.blueprints.selector }); _addSpec({ _name: "OPContractsManagerInterop", _sel: OPContractsManager.blueprints.selector });
_addSpec({ _name: "OPContractsManagerInterop", _sel: OPContractsManager.chainIdToBatchInboxAddress.selector }); _addSpec({ _name: "OPContractsManagerInterop", _sel: OPContractsManager.chainIdToBatchInboxAddress.selector });
......
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