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
81929060
Unverified
Commit
81929060
authored
Jan 13, 2023
by
mergify[bot]
Committed by
GitHub
Jan 13, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4713 from ethereum-optimism/sc/ctb-sys-config-first
feat(ctb): set up SystemConfig in step 1
parents
9866c60c
13987417
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
57 deletions
+53
-57
SystemDictator.sol
...contracts-bedrock/contracts/deployment/SystemDictator.sol
+17
-17
020-SystemDictatorSteps-1.ts
...ges/contracts-bedrock/deploy/020-SystemDictatorSteps-1.ts
+36
-0
021-SystemDictatorSteps-2.ts
...ges/contracts-bedrock/deploy/021-SystemDictatorSteps-2.ts
+0
-40
No files found.
packages/contracts-bedrock/contracts/deployment/SystemDictator.sol
View file @
81929060
...
...
@@ -188,6 +188,23 @@ contract SystemDictator is OwnableUpgradeable {
config.proxyAddressConfig.l1StandardBridgeProxy,
ProxyAdmin.ProxyType.CHUGSPLASH
);
// Upgrade and initialize the SystemConfig so the Sequencer can start up.
config.globalConfig.proxyAdmin.upgradeAndCall(
payable(config.proxyAddressConfig.systemConfigProxy),
address(config.implementationAddressConfig.systemConfigImpl),
abi.encodeCall(
SystemConfig.initialize,
(
config.systemConfigConfig.owner,
config.systemConfigConfig.overhead,
config.systemConfigConfig.scalar,
config.systemConfigConfig.batcherHash,
config.systemConfigConfig.gasLimit,
config.systemConfigConfig.unsafeBlockSigner
)
)
);
}
/**
...
...
@@ -343,23 +360,6 @@ contract SystemDictator is OwnableUpgradeable {
address(config.implementationAddressConfig.l1ERC721BridgeImpl)
);
// Upgrade and initialize the SystemConfig.
config.globalConfig.proxyAdmin.upgradeAndCall(
payable(config.proxyAddressConfig.systemConfigProxy),
address(config.implementationAddressConfig.systemConfigImpl),
abi.encodeCall(
SystemConfig.initialize,
(
config.systemConfigConfig.owner,
config.systemConfigConfig.overhead,
config.systemConfigConfig.scalar,
config.systemConfigConfig.batcherHash,
config.systemConfigConfig.gasLimit,
config.systemConfigConfig.unsafeBlockSigner
)
)
);
// Pause the L1CrossDomainMessenger, chance to check that everything is OK.
L1CrossDomainMessenger(config.proxyAddressConfig.l1CrossDomainMessengerProxy).pause();
}
...
...
packages/contracts-bedrock/deploy/020-SystemDictatorSteps-1.ts
View file @
81929060
...
...
@@ -28,6 +28,7 @@ const deployFn: DeployFunction = async (hre) => {
L1StandardBridgeProxyWithSigner
,
L1ERC721BridgeProxy
,
L1ERC721BridgeProxyWithSigner
,
SystemConfigProxy
,
]
=
await
getContractsFromArtifacts
(
hre
,
[
{
name
:
'
SystemDictatorProxy
'
,
...
...
@@ -61,6 +62,11 @@ const deployFn: DeployFunction = async (hre) => {
name
:
'
L1ERC721BridgeProxy
'
,
signerOrProvider
:
deployer
,
},
{
name
:
'
SystemConfigProxy
'
,
iface
:
'
SystemConfig
'
,
signerOrProvider
:
deployer
,
},
])
// If we have the key for the controller then we don't need to wait for external txns.
...
...
@@ -251,6 +257,36 @@ const deployFn: DeployFunction = async (hre) => {
getDeploymentAddress
(
hre
,
'
Proxy__OVM_L1StandardBridge
'
)
))
===
1
)
// Check the SystemConfig was initialized properly.
await
assertContractVariable
(
SystemConfigProxy
,
'
owner
'
,
hre
.
deployConfig
.
finalSystemOwner
)
await
assertContractVariable
(
SystemConfigProxy
,
'
overhead
'
,
hre
.
deployConfig
.
gasPriceOracleOverhead
)
await
assertContractVariable
(
SystemConfigProxy
,
'
scalar
'
,
hre
.
deployConfig
.
gasPriceOracleScalar
)
await
assertContractVariable
(
SystemConfigProxy
,
'
batcherHash
'
,
ethers
.
utils
.
hexZeroPad
(
hre
.
deployConfig
.
batchSenderAddress
.
toLowerCase
(),
32
)
)
await
assertContractVariable
(
SystemConfigProxy
,
'
gasLimit
'
,
hre
.
deployConfig
.
l2GenesisBlockGasLimit
)
},
})
...
...
packages/contracts-bedrock/deploy/021-SystemDictatorSteps-2.ts
View file @
81929060
...
...
@@ -30,7 +30,6 @@ const deployFn: DeployFunction = async (hre) => {
OptimismPortal
,
OptimismMintableERC20Factory
,
L1ERC721Bridge
,
SystemConfigProxy
,
]
=
await
getContractsFromArtifacts
(
hre
,
[
{
name
:
'
SystemDictatorProxy
'
,
...
...
@@ -78,11 +77,6 @@ const deployFn: DeployFunction = async (hre) => {
iface
:
'
L1ERC721Bridge
'
,
signerOrProvider
:
deployer
,
},
{
name
:
'
SystemConfigProxy
'
,
iface
:
'
SystemConfig
'
,
signerOrProvider
:
deployer
,
},
])
// If we have the key for the controller then we don't need to wait for external txns.
...
...
@@ -286,40 +280,6 @@ const deployFn: DeployFunction = async (hre) => {
'
messenger
'
,
L1CrossDomainMessenger
.
address
)
// Check the SystemConfig was initialized properly.
await
assertContractVariable
(
SystemConfigProxy
,
'
owner
'
,
hre
.
deployConfig
.
finalSystemOwner
)
await
assertContractVariable
(
SystemConfigProxy
,
'
overhead
'
,
hre
.
deployConfig
.
gasPriceOracleOverhead
)
await
assertContractVariable
(
SystemConfigProxy
,
'
scalar
'
,
hre
.
deployConfig
.
gasPriceOracleScalar
)
await
assertContractVariable
(
SystemConfigProxy
,
'
batcherHash
'
,
ethers
.
utils
.
hexZeroPad
(
hre
.
deployConfig
.
batchSenderAddress
.
toLowerCase
(),
32
)
)
await
assertContractVariable
(
SystemConfigProxy
,
'
gasLimit
'
,
hre
.
deployConfig
.
l2GenesisBlockGasLimit
)
},
})
...
...
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