Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
8312d611
Unverified
Commit
8312d611
authored
Sep 17, 2024
by
Maurelian
Committed by
GitHub
Sep 17, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: remove dgf impl from DeployOpChain and OPSM (#11942)
parent
290dde27
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
28 additions
and
42 deletions
+28
-42
apply_test.go
op-chain-ops/deployer/integration_test/apply_test.go
+0
-1
opchain.go
op-chain-ops/deployer/opsm/opchain.go
+0
-1
opchain.go
op-chain-ops/deployer/pipeline/opchain.go
+0
-1
state.go
op-chain-ops/deployer/state/state.go
+0
-1
deployments.go
op-chain-ops/interopgen/deployments.go
+0
-1
DeployImplementations.s.sol
...ges/contracts-bedrock/scripts/DeployImplementations.s.sol
+8
-1
DeployOPChain.s.sol
packages/contracts-bedrock/scripts/DeployOPChain.s.sol
+0
-10
semver-lock.json
packages/contracts-bedrock/semver-lock.json
+2
-2
OPStackManager.json
packages/contracts-bedrock/snapshots/abi/OPStackManager.json
+0
-5
OPStackManagerInterop.json
...ontracts-bedrock/snapshots/abi/OPStackManagerInterop.json
+0
-5
OPStackManager.sol
packages/contracts-bedrock/src/L1/OPStackManager.sol
+18
-3
DeployOPChain.t.sol
packages/contracts-bedrock/test/DeployOPChain.t.sol
+0
-11
No files found.
op-chain-ops/deployer/integration_test/apply_test.go
View file @
8312d611
...
@@ -181,7 +181,6 @@ func TestEndToEndApply(t *testing.T) {
...
@@ -181,7 +181,6 @@ func TestEndToEndApply(t *testing.T) {
{
"L1CrossDomainMessengerProxyAddress"
,
chainState
.
L1CrossDomainMessengerProxyAddress
},
{
"L1CrossDomainMessengerProxyAddress"
,
chainState
.
L1CrossDomainMessengerProxyAddress
},
{
"OptimismPortalProxyAddress"
,
chainState
.
OptimismPortalProxyAddress
},
{
"OptimismPortalProxyAddress"
,
chainState
.
OptimismPortalProxyAddress
},
{
"DisputeGameFactoryProxyAddress"
,
chainState
.
DisputeGameFactoryProxyAddress
},
{
"DisputeGameFactoryProxyAddress"
,
chainState
.
DisputeGameFactoryProxyAddress
},
{
"DisputeGameFactoryImplAddress"
,
chainState
.
DisputeGameFactoryImplAddress
},
{
"AnchorStateRegistryProxyAddress"
,
chainState
.
AnchorStateRegistryProxyAddress
},
{
"AnchorStateRegistryProxyAddress"
,
chainState
.
AnchorStateRegistryProxyAddress
},
{
"AnchorStateRegistryImplAddress"
,
chainState
.
AnchorStateRegistryImplAddress
},
{
"AnchorStateRegistryImplAddress"
,
chainState
.
AnchorStateRegistryImplAddress
},
{
"FaultDisputeGameAddress"
,
chainState
.
FaultDisputeGameAddress
},
{
"FaultDisputeGameAddress"
,
chainState
.
FaultDisputeGameAddress
},
...
...
op-chain-ops/deployer/opsm/opchain.go
View file @
8312d611
...
@@ -39,7 +39,6 @@ type DeployOPChainOutput struct {
...
@@ -39,7 +39,6 @@ type DeployOPChainOutput struct {
// Fault proof contracts below.
// Fault proof contracts below.
OptimismPortalProxy
common
.
Address
OptimismPortalProxy
common
.
Address
DisputeGameFactoryProxy
common
.
Address
DisputeGameFactoryProxy
common
.
Address
DisputeGameFactoryImpl
common
.
Address
AnchorStateRegistryProxy
common
.
Address
AnchorStateRegistryProxy
common
.
Address
AnchorStateRegistryImpl
common
.
Address
AnchorStateRegistryImpl
common
.
Address
FaultDisputeGame
common
.
Address
FaultDisputeGame
common
.
Address
...
...
op-chain-ops/deployer/pipeline/opchain.go
View file @
8312d611
...
@@ -85,7 +85,6 @@ func DeployOPChain(ctx context.Context, env *Env, intent *state.Intent, st *stat
...
@@ -85,7 +85,6 @@ func DeployOPChain(ctx context.Context, env *Env, intent *state.Intent, st *stat
L1CrossDomainMessengerProxyAddress
:
dco
.
L1CrossDomainMessengerProxy
,
L1CrossDomainMessengerProxyAddress
:
dco
.
L1CrossDomainMessengerProxy
,
OptimismPortalProxyAddress
:
dco
.
OptimismPortalProxy
,
OptimismPortalProxyAddress
:
dco
.
OptimismPortalProxy
,
DisputeGameFactoryProxyAddress
:
dco
.
DisputeGameFactoryProxy
,
DisputeGameFactoryProxyAddress
:
dco
.
DisputeGameFactoryProxy
,
DisputeGameFactoryImplAddress
:
dco
.
DisputeGameFactoryImpl
,
AnchorStateRegistryProxyAddress
:
dco
.
AnchorStateRegistryProxy
,
AnchorStateRegistryProxyAddress
:
dco
.
AnchorStateRegistryProxy
,
AnchorStateRegistryImplAddress
:
dco
.
AnchorStateRegistryImpl
,
AnchorStateRegistryImplAddress
:
dco
.
AnchorStateRegistryImpl
,
FaultDisputeGameAddress
:
dco
.
FaultDisputeGame
,
FaultDisputeGameAddress
:
dco
.
FaultDisputeGame
,
...
...
op-chain-ops/deployer/state/state.go
View file @
8312d611
...
@@ -86,7 +86,6 @@ type ChainState struct {
...
@@ -86,7 +86,6 @@ type ChainState struct {
L1CrossDomainMessengerProxyAddress
common
.
Address
`json:"l1CrossDomainMessengerProxyAddress"`
L1CrossDomainMessengerProxyAddress
common
.
Address
`json:"l1CrossDomainMessengerProxyAddress"`
OptimismPortalProxyAddress
common
.
Address
`json:"optimismPortalProxyAddress"`
OptimismPortalProxyAddress
common
.
Address
`json:"optimismPortalProxyAddress"`
DisputeGameFactoryProxyAddress
common
.
Address
`json:"disputeGameFactoryProxyAddress"`
DisputeGameFactoryProxyAddress
common
.
Address
`json:"disputeGameFactoryProxyAddress"`
DisputeGameFactoryImplAddress
common
.
Address
`json:"disputeGameFactoryImplAddress"`
AnchorStateRegistryProxyAddress
common
.
Address
`json:"anchorStateRegistryProxyAddress"`
AnchorStateRegistryProxyAddress
common
.
Address
`json:"anchorStateRegistryProxyAddress"`
AnchorStateRegistryImplAddress
common
.
Address
`json:"anchorStateRegistryImplAddress"`
AnchorStateRegistryImplAddress
common
.
Address
`json:"anchorStateRegistryImplAddress"`
FaultDisputeGameAddress
common
.
Address
`json:"faultDisputeGameAddress"`
FaultDisputeGameAddress
common
.
Address
`json:"faultDisputeGameAddress"`
...
...
op-chain-ops/interopgen/deployments.go
View file @
8312d611
...
@@ -45,7 +45,6 @@ type L2OpchainDeployment struct {
...
@@ -45,7 +45,6 @@ type L2OpchainDeployment struct {
// Fault proof contracts below.
// Fault proof contracts below.
OptimismPortalProxy
common
.
Address
`json:"OptimismPortalProxy"`
OptimismPortalProxy
common
.
Address
`json:"OptimismPortalProxy"`
DisputeGameFactoryProxy
common
.
Address
`json:"DisputeGameFactoryProxy"`
DisputeGameFactoryProxy
common
.
Address
`json:"DisputeGameFactoryProxy"`
DisputeGameFactoryImpl
common
.
Address
`json:"DisputeGameFactoryImpl"`
AnchorStateRegistryProxy
common
.
Address
`json:"AnchorStateRegistryProxy"`
AnchorStateRegistryProxy
common
.
Address
`json:"AnchorStateRegistryProxy"`
AnchorStateRegistryImpl
common
.
Address
`json:"AnchorStateRegistryImpl"`
AnchorStateRegistryImpl
common
.
Address
`json:"AnchorStateRegistryImpl"`
FaultDisputeGame
common
.
Address
`json:"FaultDisputeGame"`
FaultDisputeGame
common
.
Address
`json:"FaultDisputeGame"`
...
...
packages/contracts-bedrock/scripts/DeployImplementations.s.sol
View file @
8312d611
...
@@ -363,7 +363,7 @@ contract DeployImplementations is Script {
...
@@ -363,7 +363,7 @@ contract DeployImplementations is Script {
vm.stopBroadcast();
vm.stopBroadcast();
// forgefmt: disable-end
// forgefmt: disable-end
OPStackManager.ImplementationSetter[] memory setters = new OPStackManager.ImplementationSetter[](
6
);
OPStackManager.ImplementationSetter[] memory setters = new OPStackManager.ImplementationSetter[](
7
);
setters[0] = OPStackManager.ImplementationSetter({
setters[0] = OPStackManager.ImplementationSetter({
name: "L1ERC721Bridge",
name: "L1ERC721Bridge",
info: OPStackManager.Implementation(address(_dio.l1ERC721BridgeImpl()), L1ERC721Bridge.initialize.selector)
info: OPStackManager.Implementation(address(_dio.l1ERC721BridgeImpl()), L1ERC721Bridge.initialize.selector)
...
@@ -390,6 +390,13 @@ contract DeployImplementations is Script {
...
@@ -390,6 +390,13 @@ contract DeployImplementations is Script {
info: OPStackManager.Implementation(address(_dio.l1StandardBridgeImpl()), L1StandardBridge.initialize.selector)
info: OPStackManager.Implementation(address(_dio.l1StandardBridgeImpl()), L1StandardBridge.initialize.selector)
});
});
setters[6] = OPStackManager.ImplementationSetter({
name: "DisputeGameFactory",
info: OPStackManager.Implementation(
address(_dio.disputeGameFactoryImpl()), DisputeGameFactory.initialize.selector
)
});
// This call contains a broadcast to deploy OPSM which is proxied.
// This call contains a broadcast to deploy OPSM which is proxied.
OPStackManager opsm = createOPSMContract(_dii, _dio, blueprints, release, setters);
OPStackManager opsm = createOPSMContract(_dii, _dio, blueprints, release, setters);
...
...
packages/contracts-bedrock/scripts/DeployOPChain.s.sol
View file @
8312d611
...
@@ -138,7 +138,6 @@ contract DeployOPChainOutput is BaseDeployIO {
...
@@ -138,7 +138,6 @@ contract DeployOPChainOutput is BaseDeployIO {
L1CrossDomainMessenger internal _l1CrossDomainMessengerProxy;
L1CrossDomainMessenger internal _l1CrossDomainMessengerProxy;
OptimismPortal2 internal _optimismPortalProxy;
OptimismPortal2 internal _optimismPortalProxy;
DisputeGameFactory internal _disputeGameFactoryProxy;
DisputeGameFactory internal _disputeGameFactoryProxy;
DisputeGameFactory internal _disputeGameFactoryImpl;
AnchorStateRegistry internal _anchorStateRegistryProxy;
AnchorStateRegistry internal _anchorStateRegistryProxy;
AnchorStateRegistry internal _anchorStateRegistryImpl;
AnchorStateRegistry internal _anchorStateRegistryImpl;
FaultDisputeGame internal _faultDisputeGame;
FaultDisputeGame internal _faultDisputeGame;
...
@@ -158,7 +157,6 @@ contract DeployOPChainOutput is BaseDeployIO {
...
@@ -158,7 +157,6 @@ contract DeployOPChainOutput is BaseDeployIO {
else if (sel == this.l1CrossDomainMessengerProxy.selector) _l1CrossDomainMessengerProxy = L1CrossDomainMessenger(_addr) ;
else if (sel == this.l1CrossDomainMessengerProxy.selector) _l1CrossDomainMessengerProxy = L1CrossDomainMessenger(_addr) ;
else if (sel == this.optimismPortalProxy.selector) _optimismPortalProxy = OptimismPortal2(payable(_addr)) ;
else if (sel == this.optimismPortalProxy.selector) _optimismPortalProxy = OptimismPortal2(payable(_addr)) ;
else if (sel == this.disputeGameFactoryProxy.selector) _disputeGameFactoryProxy = DisputeGameFactory(_addr) ;
else if (sel == this.disputeGameFactoryProxy.selector) _disputeGameFactoryProxy = DisputeGameFactory(_addr) ;
else if (sel == this.disputeGameFactoryImpl.selector) _disputeGameFactoryImpl = DisputeGameFactory(_addr) ;
else if (sel == this.anchorStateRegistryProxy.selector) _anchorStateRegistryProxy = AnchorStateRegistry(_addr) ;
else if (sel == this.anchorStateRegistryProxy.selector) _anchorStateRegistryProxy = AnchorStateRegistry(_addr) ;
else if (sel == this.anchorStateRegistryImpl.selector) _anchorStateRegistryImpl = AnchorStateRegistry(_addr) ;
else if (sel == this.anchorStateRegistryImpl.selector) _anchorStateRegistryImpl = AnchorStateRegistry(_addr) ;
else if (sel == this.faultDisputeGame.selector) _faultDisputeGame = FaultDisputeGame(_addr) ;
else if (sel == this.faultDisputeGame.selector) _faultDisputeGame = FaultDisputeGame(_addr) ;
...
@@ -189,7 +187,6 @@ contract DeployOPChainOutput is BaseDeployIO {
...
@@ -189,7 +187,6 @@ contract DeployOPChainOutput is BaseDeployIO {
address[] memory addrs2 = Solarray.addresses(
address[] memory addrs2 = Solarray.addresses(
address(_optimismPortalProxy),
address(_optimismPortalProxy),
address(_disputeGameFactoryProxy),
address(_disputeGameFactoryProxy),
address(_disputeGameFactoryImpl),
address(_anchorStateRegistryProxy),
address(_anchorStateRegistryProxy),
address(_anchorStateRegistryImpl),
address(_anchorStateRegistryImpl),
address(_faultDisputeGame),
address(_faultDisputeGame),
...
@@ -247,11 +244,6 @@ contract DeployOPChainOutput is BaseDeployIO {
...
@@ -247,11 +244,6 @@ contract DeployOPChainOutput is BaseDeployIO {
return _disputeGameFactoryProxy;
return _disputeGameFactoryProxy;
}
}
function disputeGameFactoryImpl() public view returns (DisputeGameFactory) {
DeployUtils.assertValidContractAddress(address(_disputeGameFactoryImpl));
return _disputeGameFactoryImpl;
}
function anchorStateRegistryProxy() public view returns (AnchorStateRegistry) {
function anchorStateRegistryProxy() public view returns (AnchorStateRegistry) {
DeployUtils.assertValidContractAddress(address(_anchorStateRegistryProxy));
DeployUtils.assertValidContractAddress(address(_anchorStateRegistryProxy));
return _anchorStateRegistryProxy;
return _anchorStateRegistryProxy;
...
@@ -448,7 +440,6 @@ contract DeployOPChain is Script {
...
@@ -448,7 +440,6 @@ contract DeployOPChain is Script {
vm.label(address(deployOutput.l1CrossDomainMessengerProxy), "l1CrossDomainMessengerProxy");
vm.label(address(deployOutput.l1CrossDomainMessengerProxy), "l1CrossDomainMessengerProxy");
vm.label(address(deployOutput.optimismPortalProxy), "optimismPortalProxy");
vm.label(address(deployOutput.optimismPortalProxy), "optimismPortalProxy");
vm.label(address(deployOutput.disputeGameFactoryProxy), "disputeGameFactoryProxy");
vm.label(address(deployOutput.disputeGameFactoryProxy), "disputeGameFactoryProxy");
vm.label(address(deployOutput.disputeGameFactoryImpl), "disputeGameFactoryImpl");
vm.label(address(deployOutput.anchorStateRegistryProxy), "anchorStateRegistryProxy");
vm.label(address(deployOutput.anchorStateRegistryProxy), "anchorStateRegistryProxy");
vm.label(address(deployOutput.anchorStateRegistryImpl), "anchorStateRegistryImpl");
vm.label(address(deployOutput.anchorStateRegistryImpl), "anchorStateRegistryImpl");
vm.label(address(deployOutput.faultDisputeGame), "faultDisputeGame");
vm.label(address(deployOutput.faultDisputeGame), "faultDisputeGame");
...
@@ -467,7 +458,6 @@ contract DeployOPChain is Script {
...
@@ -467,7 +458,6 @@ contract DeployOPChain is Script {
_doo.set(_doo.l1CrossDomainMessengerProxy.selector, address(deployOutput.l1CrossDomainMessengerProxy));
_doo.set(_doo.l1CrossDomainMessengerProxy.selector, address(deployOutput.l1CrossDomainMessengerProxy));
_doo.set(_doo.optimismPortalProxy.selector, address(deployOutput.optimismPortalProxy));
_doo.set(_doo.optimismPortalProxy.selector, address(deployOutput.optimismPortalProxy));
_doo.set(_doo.disputeGameFactoryProxy.selector, address(deployOutput.disputeGameFactoryProxy));
_doo.set(_doo.disputeGameFactoryProxy.selector, address(deployOutput.disputeGameFactoryProxy));
_doo.set(_doo.disputeGameFactoryImpl.selector, address(deployOutput.disputeGameFactoryImpl));
_doo.set(_doo.anchorStateRegistryProxy.selector, address(deployOutput.anchorStateRegistryProxy));
_doo.set(_doo.anchorStateRegistryProxy.selector, address(deployOutput.anchorStateRegistryProxy));
_doo.set(_doo.anchorStateRegistryImpl.selector, address(deployOutput.anchorStateRegistryImpl));
_doo.set(_doo.anchorStateRegistryImpl.selector, address(deployOutput.anchorStateRegistryImpl));
_doo.set(_doo.faultDisputeGame.selector, address(deployOutput.faultDisputeGame));
_doo.set(_doo.faultDisputeGame.selector, address(deployOutput.faultDisputeGame));
...
...
packages/contracts-bedrock/semver-lock.json
View file @
8312d611
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
"sourceCodeHash"
:
"0xde4df0f9633dc0cdb1c9f634003ea5b0f7c5c1aebc407bc1b2f44c0ecf938649"
"sourceCodeHash"
:
"0xde4df0f9633dc0cdb1c9f634003ea5b0f7c5c1aebc407bc1b2f44c0ecf938649"
},
},
"src/L1/OPStackManager.sol"
:
{
"src/L1/OPStackManager.sol"
:
{
"initCodeHash"
:
"0x
31378d0ea88a358f517927f5bc530a5b958f43c5462e4a822388ec70bd45e8d4
"
,
"initCodeHash"
:
"0x
fcb568c59e2b4fd927b27b3434db657b53571bf64f70bc8453aaf696eda9c3f9
"
,
"sourceCodeHash"
:
"0x
9ed271fbb40f25528652bfecc10d2010a588629047b3aaed2b14247d2fa7b45e
"
"sourceCodeHash"
:
"0x
fc9069d6967b9b90413fe391805509b178dd134b008a582e4dc64afe14cc1b2a
"
},
},
"src/L1/OptimismPortal.sol"
:
{
"src/L1/OptimismPortal.sol"
:
{
"initCodeHash"
:
"0xb7a7a28d5b3b88334e7cb4bc1c5fbbf9f691d934e907a2fed6a30e461eb1c0f6"
,
"initCodeHash"
:
"0xb7a7a28d5b3b88334e7cb4bc1c5fbbf9f691d934e907a2fed6a30e461eb1c0f6"
,
...
...
packages/contracts-bedrock/snapshots/abi/OPStackManager.json
View file @
8312d611
...
@@ -185,11 +185,6 @@
...
@@ -185,11 +185,6 @@
"name"
:
"disputeGameFactoryProxy"
,
"name"
:
"disputeGameFactoryProxy"
,
"type"
:
"address"
"type"
:
"address"
},
},
{
"internalType"
:
"contract DisputeGameFactory"
,
"name"
:
"disputeGameFactoryImpl"
,
"type"
:
"address"
},
{
{
"internalType"
:
"contract AnchorStateRegistry"
,
"internalType"
:
"contract AnchorStateRegistry"
,
"name"
:
"anchorStateRegistryProxy"
,
"name"
:
"anchorStateRegistryProxy"
,
...
...
packages/contracts-bedrock/snapshots/abi/OPStackManagerInterop.json
View file @
8312d611
...
@@ -185,11 +185,6 @@
...
@@ -185,11 +185,6 @@
"name"
:
"disputeGameFactoryProxy"
,
"name"
:
"disputeGameFactoryProxy"
,
"type"
:
"address"
"type"
:
"address"
},
},
{
"internalType"
:
"contract DisputeGameFactory"
,
"name"
:
"disputeGameFactoryImpl"
,
"type"
:
"address"
},
{
{
"internalType"
:
"contract AnchorStateRegistry"
,
"internalType"
:
"contract AnchorStateRegistry"
,
"name"
:
"anchorStateRegistryProxy"
,
"name"
:
"anchorStateRegistryProxy"
,
...
...
packages/contracts-bedrock/src/L1/OPStackManager.sol
View file @
8312d611
...
@@ -69,7 +69,6 @@ contract OPStackManager is ISemver, Initializable {
...
@@ -69,7 +69,6 @@ contract OPStackManager is ISemver, Initializable {
// Fault proof contracts below.
// Fault proof contracts below.
OptimismPortal2 optimismPortalProxy;
OptimismPortal2 optimismPortalProxy;
DisputeGameFactory disputeGameFactoryProxy;
DisputeGameFactory disputeGameFactoryProxy;
DisputeGameFactory disputeGameFactoryImpl;
AnchorStateRegistry anchorStateRegistryProxy;
AnchorStateRegistry anchorStateRegistryProxy;
AnchorStateRegistry anchorStateRegistryImpl;
AnchorStateRegistry anchorStateRegistryImpl;
FaultDisputeGame faultDisputeGame;
FaultDisputeGame faultDisputeGame;
...
@@ -206,8 +205,6 @@ contract OPStackManager is ISemver, Initializable {
...
@@ -206,8 +205,6 @@ contract OPStackManager is ISemver, Initializable {
// -------- TODO: Placeholders --------
// -------- TODO: Placeholders --------
// For contracts we don't yet deploy, we set the outputs to dummy proxies so they have code to pass assertions.
// For contracts we don't yet deploy, we set the outputs to dummy proxies so they have code to pass assertions.
// We do these first, that way the disputeGameFactoryProxy is set when passed to the SystemConfig input.
// We do these first, that way the disputeGameFactoryProxy is set when passed to the SystemConfig input.
output.disputeGameFactoryProxy = DisputeGameFactory(deployProxy(l2ChainId, output.opChainProxyAdmin, "1"));
output.disputeGameFactoryImpl = DisputeGameFactory(deployProxy(l2ChainId, output.opChainProxyAdmin, "2"));
output.anchorStateRegistryProxy = AnchorStateRegistry(deployProxy(l2ChainId, output.opChainProxyAdmin, "3"));
output.anchorStateRegistryProxy = AnchorStateRegistry(deployProxy(l2ChainId, output.opChainProxyAdmin, "3"));
output.anchorStateRegistryImpl = AnchorStateRegistry(deployProxy(l2ChainId, output.opChainProxyAdmin, "4"));
output.anchorStateRegistryImpl = AnchorStateRegistry(deployProxy(l2ChainId, output.opChainProxyAdmin, "4"));
output.faultDisputeGame = FaultDisputeGame(deployProxy(l2ChainId, output.opChainProxyAdmin, "5"));
output.faultDisputeGame = FaultDisputeGame(deployProxy(l2ChainId, output.opChainProxyAdmin, "5"));
...
@@ -238,6 +235,8 @@ contract OPStackManager is ISemver, Initializable {
...
@@ -238,6 +235,8 @@ contract OPStackManager is ISemver, Initializable {
output.optimismMintableERC20FactoryProxy = OptimismMintableERC20Factory(
output.optimismMintableERC20FactoryProxy = OptimismMintableERC20Factory(
deployProxy(l2ChainId, output.opChainProxyAdmin, "OptimismMintableERC20Factory")
deployProxy(l2ChainId, output.opChainProxyAdmin, "OptimismMintableERC20Factory")
);
);
output.disputeGameFactoryProxy =
DisputeGameFactory(deployProxy(l2ChainId, output.opChainProxyAdmin, "DisputeGameFactory"));
// Deploy legacy proxied contracts.
// Deploy legacy proxied contracts.
output.l1StandardBridgeProxy = L1StandardBridge(
output.l1StandardBridgeProxy = L1StandardBridge(
...
@@ -285,6 +284,10 @@ contract OPStackManager is ISemver, Initializable {
...
@@ -285,6 +284,10 @@ contract OPStackManager is ISemver, Initializable {
data = encodeL1StandardBridgeInitializer(impl.initializer, output);
data = encodeL1StandardBridgeInitializer(impl.initializer, output);
upgradeAndCall(output.opChainProxyAdmin, address(output.l1StandardBridgeProxy), impl.logic, data);
upgradeAndCall(output.opChainProxyAdmin, address(output.l1StandardBridgeProxy), impl.logic, data);
impl = getLatestImplementation("DisputeGameFactory");
data = encodeDisputeGameFactoryInitializer(impl.initializer, _input);
upgradeAndCall(output.opChainProxyAdmin, address(output.disputeGameFactoryProxy), impl.logic, data);
// -------- Finalize Deployment --------
// -------- Finalize Deployment --------
// 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);
...
@@ -440,6 +443,18 @@ contract OPStackManager is ISemver, Initializable {
...
@@ -440,6 +443,18 @@ contract OPStackManager is ISemver, Initializable {
);
);
}
}
function encodeDisputeGameFactoryInitializer(
bytes4 _selector,
DeployInput memory _input
)
internal
view
virtual
returns (bytes memory)
{
return abi.encodeWithSelector(_selector, _input.roles.opChainProxyAdminOwner);
}
/// @notice Returns default, standard config arguments for the SystemConfig initializer.
/// @notice Returns default, standard config arguments for the SystemConfig initializer.
/// This is used by subclasses to reduce code duplication.
/// This is used by subclasses to reduce code duplication.
function defaultSystemConfigParams(
function defaultSystemConfigParams(
...
...
packages/contracts-bedrock/test/DeployOPChain.t.sol
View file @
8312d611
...
@@ -121,7 +121,6 @@ contract DeployOPChainOutput_Test is Test {
...
@@ -121,7 +121,6 @@ contract DeployOPChainOutput_Test is Test {
L1CrossDomainMessenger l1CrossDomainMessengerProxy = L1CrossDomainMessenger(makeAddr("l1CrossDomainMessengerProxy"));
L1CrossDomainMessenger l1CrossDomainMessengerProxy = L1CrossDomainMessenger(makeAddr("l1CrossDomainMessengerProxy"));
OptimismPortal2 optimismPortalProxy = OptimismPortal2(payable(makeAddr("optimismPortalProxy")));
OptimismPortal2 optimismPortalProxy = OptimismPortal2(payable(makeAddr("optimismPortalProxy")));
DisputeGameFactory disputeGameFactoryProxy = DisputeGameFactory(makeAddr("disputeGameFactoryProxy"));
DisputeGameFactory disputeGameFactoryProxy = DisputeGameFactory(makeAddr("disputeGameFactoryProxy"));
DisputeGameFactory disputeGameFactoryImpl = DisputeGameFactory(makeAddr("disputeGameFactoryImpl"));
AnchorStateRegistry anchorStateRegistryProxy = AnchorStateRegistry(makeAddr("anchorStateRegistryProxy"));
AnchorStateRegistry anchorStateRegistryProxy = AnchorStateRegistry(makeAddr("anchorStateRegistryProxy"));
AnchorStateRegistry anchorStateRegistryImpl = AnchorStateRegistry(makeAddr("anchorStateRegistryImpl"));
AnchorStateRegistry anchorStateRegistryImpl = AnchorStateRegistry(makeAddr("anchorStateRegistryImpl"));
FaultDisputeGame faultDisputeGame = FaultDisputeGame(makeAddr("faultDisputeGame"));
FaultDisputeGame faultDisputeGame = FaultDisputeGame(makeAddr("faultDisputeGame"));
...
@@ -144,7 +143,6 @@ contract DeployOPChainOutput_Test is Test {
...
@@ -144,7 +143,6 @@ contract DeployOPChainOutput_Test is Test {
vm.etch(address(l1CrossDomainMessengerProxy), hex"01");
vm.etch(address(l1CrossDomainMessengerProxy), hex"01");
vm.etch(address(optimismPortalProxy), hex"01");
vm.etch(address(optimismPortalProxy), hex"01");
vm.etch(address(disputeGameFactoryProxy), hex"01");
vm.etch(address(disputeGameFactoryProxy), hex"01");
vm.etch(address(disputeGameFactoryImpl), hex"01");
vm.etch(address(anchorStateRegistryProxy), hex"01");
vm.etch(address(anchorStateRegistryProxy), hex"01");
vm.etch(address(anchorStateRegistryImpl), hex"01");
vm.etch(address(anchorStateRegistryImpl), hex"01");
vm.etch(address(faultDisputeGame), hex"01");
vm.etch(address(faultDisputeGame), hex"01");
...
@@ -161,7 +159,6 @@ contract DeployOPChainOutput_Test is Test {
...
@@ -161,7 +159,6 @@ contract DeployOPChainOutput_Test is Test {
doo.set(doo.l1CrossDomainMessengerProxy.selector, address(l1CrossDomainMessengerProxy));
doo.set(doo.l1CrossDomainMessengerProxy.selector, address(l1CrossDomainMessengerProxy));
doo.set(doo.optimismPortalProxy.selector, address(optimismPortalProxy));
doo.set(doo.optimismPortalProxy.selector, address(optimismPortalProxy));
doo.set(doo.disputeGameFactoryProxy.selector, address(disputeGameFactoryProxy));
doo.set(doo.disputeGameFactoryProxy.selector, address(disputeGameFactoryProxy));
doo.set(doo.disputeGameFactoryImpl.selector, address(disputeGameFactoryImpl));
doo.set(doo.anchorStateRegistryProxy.selector, address(anchorStateRegistryProxy));
doo.set(doo.anchorStateRegistryProxy.selector, address(anchorStateRegistryProxy));
doo.set(doo.anchorStateRegistryImpl.selector, address(anchorStateRegistryImpl));
doo.set(doo.anchorStateRegistryImpl.selector, address(anchorStateRegistryImpl));
doo.set(doo.faultDisputeGame.selector, address(faultDisputeGame));
doo.set(doo.faultDisputeGame.selector, address(faultDisputeGame));
...
@@ -178,7 +175,6 @@ contract DeployOPChainOutput_Test is Test {
...
@@ -178,7 +175,6 @@ contract DeployOPChainOutput_Test is Test {
assertEq(address(l1CrossDomainMessengerProxy), address(doo.l1CrossDomainMessengerProxy()), "700");
assertEq(address(l1CrossDomainMessengerProxy), address(doo.l1CrossDomainMessengerProxy()), "700");
assertEq(address(optimismPortalProxy), address(doo.optimismPortalProxy()), "800");
assertEq(address(optimismPortalProxy), address(doo.optimismPortalProxy()), "800");
assertEq(address(disputeGameFactoryProxy), address(doo.disputeGameFactoryProxy()), "900");
assertEq(address(disputeGameFactoryProxy), address(doo.disputeGameFactoryProxy()), "900");
assertEq(address(disputeGameFactoryImpl), address(doo.disputeGameFactoryImpl()), "1000");
assertEq(address(anchorStateRegistryProxy), address(doo.anchorStateRegistryProxy()), "1100");
assertEq(address(anchorStateRegistryProxy), address(doo.anchorStateRegistryProxy()), "1100");
assertEq(address(anchorStateRegistryImpl), address(doo.anchorStateRegistryImpl()), "1200");
assertEq(address(anchorStateRegistryImpl), address(doo.anchorStateRegistryImpl()), "1200");
assertEq(address(faultDisputeGame), address(doo.faultDisputeGame()), "1300");
assertEq(address(faultDisputeGame), address(doo.faultDisputeGame()), "1300");
...
@@ -217,9 +213,6 @@ contract DeployOPChainOutput_Test is Test {
...
@@ -217,9 +213,6 @@ contract DeployOPChainOutput_Test is Test {
vm.expectRevert(expectedErr);
vm.expectRevert(expectedErr);
doo.disputeGameFactoryProxy();
doo.disputeGameFactoryProxy();
vm.expectRevert(expectedErr);
doo.disputeGameFactoryImpl();
vm.expectRevert(expectedErr);
vm.expectRevert(expectedErr);
doo.anchorStateRegistryProxy();
doo.anchorStateRegistryProxy();
...
@@ -279,10 +272,6 @@ contract DeployOPChainOutput_Test is Test {
...
@@ -279,10 +272,6 @@ contract DeployOPChainOutput_Test is Test {
vm.expectRevert(expectedErr);
vm.expectRevert(expectedErr);
doo.disputeGameFactoryProxy();
doo.disputeGameFactoryProxy();
doo.set(doo.disputeGameFactoryImpl.selector, emptyAddr);
vm.expectRevert(expectedErr);
doo.disputeGameFactoryImpl();
doo.set(doo.anchorStateRegistryProxy.selector, emptyAddr);
doo.set(doo.anchorStateRegistryProxy.selector, emptyAddr);
vm.expectRevert(expectedErr);
vm.expectRevert(expectedErr);
doo.anchorStateRegistryProxy();
doo.anchorStateRegistryProxy();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment