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
549f2a9e
Unverified
Commit
549f2a9e
authored
Nov 25, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock/op-chain-ops: Rename Guardian config var
parent
63c71b69
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
33 additions
and
35 deletions
+33
-35
config.go
op-chain-ops/genesis/config.go
+4
-4
test-deploy-config-full.json
op-chain-ops/genesis/testdata/test-deploy-config-full.json
+1
-1
l1.go
op-chain-ops/upgrades/l1.go
+4
-4
devnetL1-template.json
...es/contracts-bedrock/deploy-config/devnetL1-template.json
+1
-1
goerli.json
packages/contracts-bedrock/deploy-config/goerli.json
+1
-1
hardhat.json
packages/contracts-bedrock/deploy-config/hardhat.json
+1
-1
internal-devnet.json
...ages/contracts-bedrock/deploy-config/internal-devnet.json
+1
-1
mainnet.json
packages/contracts-bedrock/deploy-config/mainnet.json
+1
-1
pgn-sepolia.json
packages/contracts-bedrock/deploy-config/pgn-sepolia.json
+1
-1
pgn.json
packages/contracts-bedrock/deploy-config/pgn.json
+1
-1
sepolia.json
packages/contracts-bedrock/deploy-config/sepolia.json
+1
-1
zora-goerli.json
packages/contracts-bedrock/deploy-config/zora-goerli.json
+1
-1
zora.json
packages/contracts-bedrock/deploy-config/zora.json
+1
-1
ChainAssertions.sol
packages/contracts-bedrock/scripts/ChainAssertions.sol
+6
-6
Deploy.s.sol
packages/contracts-bedrock/scripts/Deploy.s.sol
+3
-5
DeployConfig.s.sol
packages/contracts-bedrock/scripts/DeployConfig.s.sol
+2
-2
config.sh
packages/contracts-bedrock/scripts/getting-started/config.sh
+1
-1
OptimismPortal.t.sol
packages/contracts-bedrock/test/OptimismPortal.t.sol
+1
-1
SuperchainConfig.t.sol
packages/contracts-bedrock/test/SuperchainConfig.t.sol
+1
-1
No files found.
op-chain-ops/genesis/config.go
View file @
549f2a9e
...
@@ -122,8 +122,8 @@ type DeployConfig struct {
...
@@ -122,8 +122,8 @@ type DeployConfig struct {
// FinalSystemOwner is the owner of the system on L1. Any L1 contract that is ownable has
// FinalSystemOwner is the owner of the system on L1. Any L1 contract that is ownable has
// this account set as its owner.
// this account set as its owner.
FinalSystemOwner
common
.
Address
`json:"finalSystemOwner"`
FinalSystemOwner
common
.
Address
`json:"finalSystemOwner"`
//
PortalGuardian represents the GUARDIAN account in the OptimismPortal
. Has the ability to pause withdrawals.
//
SuperchainConfigGuardian represents the GUARDIAN account in the SuperchainConfig
. Has the ability to pause withdrawals.
PortalGuardian
common
.
Address
`json:"portal
Guardian"`
SuperchainConfigGuardian
common
.
Address
`json:"superchainConfig
Guardian"`
// BaseFeeVaultRecipient represents the recipient of fees accumulated in the BaseFeeVault.
// BaseFeeVaultRecipient represents the recipient of fees accumulated in the BaseFeeVault.
// Can be an account on L1 or L2, depending on the BaseFeeVaultWithdrawalNetwork value.
// Can be an account on L1 or L2, depending on the BaseFeeVaultWithdrawalNetwork value.
BaseFeeVaultRecipient
common
.
Address
`json:"baseFeeVaultRecipient"`
BaseFeeVaultRecipient
common
.
Address
`json:"baseFeeVaultRecipient"`
...
@@ -252,8 +252,8 @@ func (d *DeployConfig) Check() error {
...
@@ -252,8 +252,8 @@ func (d *DeployConfig) Check() error {
if
d
.
L2OutputOracleStartingBlockNumber
==
0
{
if
d
.
L2OutputOracleStartingBlockNumber
==
0
{
log
.
Warn
(
"L2OutputOracleStartingBlockNumber is 0, should only be 0 for fresh chains"
)
log
.
Warn
(
"L2OutputOracleStartingBlockNumber is 0, should only be 0 for fresh chains"
)
}
}
if
d
.
Portal
Guardian
==
(
common
.
Address
{})
{
if
d
.
SuperchainConfig
Guardian
==
(
common
.
Address
{})
{
return
fmt
.
Errorf
(
"%w:
Portal
Guardian cannot be address(0)"
,
ErrInvalidDeployConfig
)
return
fmt
.
Errorf
(
"%w:
SuperchainConfig
Guardian cannot be address(0)"
,
ErrInvalidDeployConfig
)
}
}
if
d
.
MaxSequencerDrift
==
0
{
if
d
.
MaxSequencerDrift
==
0
{
return
fmt
.
Errorf
(
"%w: MaxSequencerDrift cannot be 0"
,
ErrInvalidDeployConfig
)
return
fmt
.
Errorf
(
"%w: MaxSequencerDrift cannot be 0"
,
ErrInvalidDeployConfig
)
...
...
op-chain-ops/genesis/testdata/test-deploy-config-full.json
View file @
549f2a9e
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
"l1GenesisBlockGasLimit"
:
"0x1c9c380"
,
"l1GenesisBlockGasLimit"
:
"0x1c9c380"
,
"l1GenesisBlockDifficulty"
:
"0x1"
,
"l1GenesisBlockDifficulty"
:
"0x1"
,
"finalSystemOwner"
:
"0xbcd4042de499d14e55001ccbb24a551f3b954096"
,
"finalSystemOwner"
:
"0xbcd4042de499d14e55001ccbb24a551f3b954096"
,
"
portal
Guardian"
:
"0x0000000000000000000000000000000000000112"
,
"
superchainConfig
Guardian"
:
"0x0000000000000000000000000000000000000112"
,
"finalizationPeriodSeconds"
:
2
,
"finalizationPeriodSeconds"
:
2
,
"l1GenesisBlockMixHash"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
,
"l1GenesisBlockMixHash"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
,
"l1GenesisBlockCoinbase"
:
"0x0000000000000000000000000000000000000000"
,
"l1GenesisBlockCoinbase"
:
"0x0000000000000000000000000000000000000000"
,
...
...
op-chain-ops/upgrades/l1.go
View file @
549f2a9e
...
@@ -269,9 +269,9 @@ func OptimismPortal(batch *safe.Batch, implementations superchain.Implementation
...
@@ -269,9 +269,9 @@ func OptimismPortal(batch *safe.Batch, implementations superchain.Implementation
return
err
return
err
}
}
var
portal
Guardian
common
.
Address
var
superchainConfig
Guardian
common
.
Address
if
config
!=
nil
{
if
config
!=
nil
{
portalGuardian
=
config
.
Portal
Guardian
superchainConfigGuardian
=
config
.
SuperchainConfig
Guardian
}
else
{
}
else
{
optimismPortal
,
err
:=
bindings
.
NewOptimismPortalCaller
(
common
.
HexToAddress
(
list
.
OptimismPortalProxy
.
String
()),
backend
)
optimismPortal
,
err
:=
bindings
.
NewOptimismPortalCaller
(
common
.
HexToAddress
(
list
.
OptimismPortalProxy
.
String
()),
backend
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -281,10 +281,10 @@ func OptimismPortal(batch *safe.Batch, implementations superchain.Implementation
...
@@ -281,10 +281,10 @@ func OptimismPortal(batch *safe.Batch, implementations superchain.Implementation
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
portal
Guardian
=
guardian
superchainConfig
Guardian
=
guardian
}
}
calldata
,
err
:=
optimismPortalABI
.
Pack
(
"initialize"
,
common
.
HexToAddress
(
list
.
L2OutputOracleProxy
.
String
()),
portal
Guardian
,
common
.
HexToAddress
(
chainConfig
.
SystemConfigAddr
.
String
()),
false
)
calldata
,
err
:=
optimismPortalABI
.
Pack
(
"initialize"
,
common
.
HexToAddress
(
list
.
L2OutputOracleProxy
.
String
()),
superchainConfig
Guardian
,
common
.
HexToAddress
(
chainConfig
.
SystemConfigAddr
.
String
()),
false
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
packages/contracts-bedrock/deploy-config/devnetL1-template.json
View file @
549f2a9e
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
"sequencerFeeVaultWithdrawalNetwork"
:
"remote"
,
"sequencerFeeVaultWithdrawalNetwork"
:
"remote"
,
"proxyAdminOwner"
:
"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"
,
"proxyAdminOwner"
:
"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"
,
"finalSystemOwner"
:
"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"
,
"finalSystemOwner"
:
"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"
,
"
portal
Guardian"
:
"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"
,
"
superchainConfig
Guardian"
:
"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"
,
"finalizationPeriodSeconds"
:
2
,
"finalizationPeriodSeconds"
:
2
,
"fundDevAccounts"
:
true
,
"fundDevAccounts"
:
true
,
"l2GenesisBlockBaseFeePerGas"
:
"0x1"
,
"l2GenesisBlockBaseFeePerGas"
:
"0x1"
,
...
...
packages/contracts-bedrock/deploy-config/goerli.json
View file @
549f2a9e
{
{
"finalSystemOwner"
:
"0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f"
,
"finalSystemOwner"
:
"0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f"
,
"
portal
Guardian"
:
"0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f"
,
"
superchainConfig
Guardian"
:
"0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f"
,
"l1StartingBlockTag"
:
"0x6ffc1bf3754c01f6bb9fe057c1578b87a8571ce2e9be5ca14bace6eccfd336c7"
,
"l1StartingBlockTag"
:
"0x6ffc1bf3754c01f6bb9fe057c1578b87a8571ce2e9be5ca14bace6eccfd336c7"
,
"l1ChainID"
:
5
,
"l1ChainID"
:
5
,
"l2ChainID"
:
420
,
"l2ChainID"
:
420
,
...
...
packages/contracts-bedrock/deploy-config/hardhat.json
View file @
549f2a9e
{
{
"finalSystemOwner"
:
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
,
"finalSystemOwner"
:
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
,
"
portal
Guardian"
:
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
,
"
superchainConfig
Guardian"
:
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
,
"proxyAdminOwner"
:
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
,
"proxyAdminOwner"
:
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
,
"l1StartingBlockTag"
:
"earliest"
,
"l1StartingBlockTag"
:
"earliest"
,
"l1ChainID"
:
900
,
"l1ChainID"
:
900
,
...
...
packages/contracts-bedrock/deploy-config/internal-devnet.json
View file @
549f2a9e
{
{
"finalSystemOwner"
:
"0x858F0751ef8B4067f0d2668C076BDB50a8549fbF"
,
"finalSystemOwner"
:
"0x858F0751ef8B4067f0d2668C076BDB50a8549fbF"
,
"
portal
Guardian"
:
"0x858F0751ef8B4067f0d2668C076BDB50a8549fbF"
,
"
superchainConfig
Guardian"
:
"0x858F0751ef8B4067f0d2668C076BDB50a8549fbF"
,
"l1StartingBlockTag"
:
"0x19c7e6b18fe156e45f4cfef707294fd8f079fa9c30a7b7cd6ec1ce3682ec6a2e"
,
"l1StartingBlockTag"
:
"0x19c7e6b18fe156e45f4cfef707294fd8f079fa9c30a7b7cd6ec1ce3682ec6a2e"
,
"l1ChainID"
:
5
,
"l1ChainID"
:
5
,
"l2ChainID"
:
998
,
"l2ChainID"
:
998
,
...
...
packages/contracts-bedrock/deploy-config/mainnet.json
View file @
549f2a9e
{
{
"finalSystemOwner"
:
"0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A"
,
"finalSystemOwner"
:
"0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A"
,
"
portal
Guardian"
:
"0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A"
,
"
superchainConfig
Guardian"
:
"0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A"
,
"l1StartingBlockTag"
:
"0x438335a20d98863a4c0c97999eb2481921ccd28553eac6f913af7c12aec04108"
,
"l1StartingBlockTag"
:
"0x438335a20d98863a4c0c97999eb2481921ccd28553eac6f913af7c12aec04108"
,
"l1ChainID"
:
1
,
"l1ChainID"
:
1
,
"l2ChainID"
:
10
,
"l2ChainID"
:
10
,
...
...
packages/contracts-bedrock/deploy-config/pgn-sepolia.json
View file @
549f2a9e
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
"batchInboxAddress"
:
"0x454A2A86132C937AD4eFc8721f1b85418f92cbCe"
,
"batchInboxAddress"
:
"0x454A2A86132C937AD4eFc8721f1b85418f92cbCe"
,
"batchSenderAddress"
:
"0x7224e05E6cF6E07aFBE1eFa09a3fA23A637DD485"
,
"batchSenderAddress"
:
"0x7224e05E6cF6E07aFBE1eFa09a3fA23A637DD485"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"
portal
Guardian"
:
"0x45eFFbD799Ab49122eeEAB75B78D9C56A187F9A7"
,
"
superchainConfig
Guardian"
:
"0x45eFFbD799Ab49122eeEAB75B78D9C56A187F9A7"
,
"l2OutputOracleSubmissionInterval"
:
180
,
"l2OutputOracleSubmissionInterval"
:
180
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleProposer"
:
"0xD457799C5ba870D609f21048c67a9b11aC611BF0"
,
"l2OutputOracleProposer"
:
"0xD457799C5ba870D609f21048c67a9b11aC611BF0"
,
...
...
packages/contracts-bedrock/deploy-config/pgn.json
View file @
549f2a9e
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
"batchInboxAddress"
:
"0xC1B90E1e459aBBDcEc4DCF90dA45ba077d83BFc5"
,
"batchInboxAddress"
:
"0xC1B90E1e459aBBDcEc4DCF90dA45ba077d83BFc5"
,
"batchSenderAddress"
:
"0x99526b0e49A95833E734EB556A6aBaFFAb0Ee167"
,
"batchSenderAddress"
:
"0x99526b0e49A95833E734EB556A6aBaFFAb0Ee167"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"
portal
Guardian"
:
"0x39E13D1AB040F6EA58CE19998edCe01B3C365f84"
,
"
superchainConfig
Guardian"
:
"0x39E13D1AB040F6EA58CE19998edCe01B3C365f84"
,
"l2OutputOracleSubmissionInterval"
:
1800
,
"l2OutputOracleSubmissionInterval"
:
1800
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleProposer"
:
"0x69968Ce0E92d9c101BAd81de55EFbcb69603cFe3"
,
"l2OutputOracleProposer"
:
"0x69968Ce0E92d9c101BAd81de55EFbcb69603cFe3"
,
...
...
packages/contracts-bedrock/deploy-config/sepolia.json
View file @
549f2a9e
{
{
"finalSystemOwner"
:
"0xfd1D2e729aE8eEe2E146c033bf4400fE75284301"
,
"finalSystemOwner"
:
"0xfd1D2e729aE8eEe2E146c033bf4400fE75284301"
,
"
portal
Guardian"
:
"0xfd1D2e729aE8eEe2E146c033bf4400fE75284301"
,
"
superchainConfig
Guardian"
:
"0xfd1D2e729aE8eEe2E146c033bf4400fE75284301"
,
"l1StartingBlockTag"
:
"0x48f520cf4ddaf34c8336e6e490632ea3cf1e5e93b0b2bc6e917557e31845371b"
,
"l1StartingBlockTag"
:
"0x48f520cf4ddaf34c8336e6e490632ea3cf1e5e93b0b2bc6e917557e31845371b"
,
"l1ChainID"
:
11155111
,
"l1ChainID"
:
11155111
,
"l2ChainID"
:
11155420
,
"l2ChainID"
:
11155420
,
...
...
packages/contracts-bedrock/deploy-config/zora-goerli.json
View file @
549f2a9e
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
"batchInboxAddress"
:
"0xcF628E24aC574866D3d0a7CFE4e9DA7278b7ef13"
,
"batchInboxAddress"
:
"0xcF628E24aC574866D3d0a7CFE4e9DA7278b7ef13"
,
"batchSenderAddress"
:
"0x427c9a666d3b27873111cE3894712Bf64C6343A0"
,
"batchSenderAddress"
:
"0x427c9a666d3b27873111cE3894712Bf64C6343A0"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"
portal
Guardian"
:
"0x45eFFbD799Ab49122eeEAB75B78D9C56A187F9A7"
,
"
superchainConfig
Guardian"
:
"0x45eFFbD799Ab49122eeEAB75B78D9C56A187F9A7"
,
"l2OutputOracleSubmissionInterval"
:
180
,
"l2OutputOracleSubmissionInterval"
:
180
,
"l2OutputOracleStartingTimestamp"
:
0
,
"l2OutputOracleStartingTimestamp"
:
0
,
"l2OutputOracleProposer"
:
"0xa98B585654fC03E2fEa3FAB56E1C851E4f5c2B54"
,
"l2OutputOracleProposer"
:
"0xa98B585654fC03E2fEa3FAB56E1C851E4f5c2B54"
,
...
...
packages/contracts-bedrock/deploy-config/zora.json
View file @
549f2a9e
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
"batchInboxAddress"
:
"0x6F54Ca6F6EdE96662024Ffd61BFd18f3f4e34DFf"
,
"batchInboxAddress"
:
"0x6F54Ca6F6EdE96662024Ffd61BFd18f3f4e34DFf"
,
"batchSenderAddress"
:
"0x625726c858dBF78c0125436C943Bf4b4bE9d9033"
,
"batchSenderAddress"
:
"0x625726c858dBF78c0125436C943Bf4b4bE9d9033"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"
portal
Guardian"
:
"0xC72aE5c7cc9a332699305E29F68Be66c73b60542"
,
"
superchainConfig
Guardian"
:
"0xC72aE5c7cc9a332699305E29F68Be66c73b60542"
,
"l2OutputOracleSubmissionInterval"
:
1800
,
"l2OutputOracleSubmissionInterval"
:
1800
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleProposer"
:
"0x48247032092e7b0ecf5dEF611ad89eaf3fC888Dd"
,
"l2OutputOracleProposer"
:
"0x48247032092e7b0ecf5dEF611ad89eaf3fC888Dd"
,
...
...
packages/contracts-bedrock/scripts/ChainAssertions.sol
View file @
549f2a9e
...
@@ -145,15 +145,15 @@ library ChainAssertions {
...
@@ -145,15 +145,15 @@ library ChainAssertions {
{
{
OptimismPortal portal = OptimismPortal(payable(_contracts.OptimismPortal));
OptimismPortal portal = OptimismPortal(payable(_contracts.OptimismPortal));
address guardian = _cfg.
portal
Guardian();
address guardian = _cfg.
superchainConfig
Guardian();
if (guardian.code.length == 0) {
if (guardian.code.length == 0) {
console.log("Portal guardian has no code: %s", guardian);
console.log("Portal guardian has no code: %s", guardian);
}
}
require(address(portal.L2_ORACLE()) == _contracts.L2OutputOracle);
require(address(portal.L2_ORACLE()) == _contracts.L2OutputOracle);
require(address(portal.l2Oracle()) == _contracts.L2OutputOracle);
require(address(portal.l2Oracle()) == _contracts.L2OutputOracle);
require(portal.GUARDIAN() == _cfg.
portal
Guardian());
require(portal.GUARDIAN() == _cfg.
superchainConfig
Guardian());
require(portal.guardian() == _cfg.
portal
Guardian());
require(portal.guardian() == _cfg.
superchainConfig
Guardian());
require(address(portal.SYSTEM_CONFIG()) == _contracts.SystemConfig);
require(address(portal.SYSTEM_CONFIG()) == _contracts.SystemConfig);
require(address(portal.systemConfig()) == _contracts.SystemConfig);
require(address(portal.systemConfig()) == _contracts.SystemConfig);
require(address(portal.superchainConfig()) == address(_contracts.SuperchainConfig));
require(address(portal.superchainConfig()) == address(_contracts.SuperchainConfig));
...
@@ -183,15 +183,15 @@ library ChainAssertions {
...
@@ -183,15 +183,15 @@ library ChainAssertions {
/// @notice Asserts that the SuperchainConfig is setup correctly
/// @notice Asserts that the SuperchainConfig is setup correctly
function checkSuperchainConfig(
function checkSuperchainConfig(
Types.ContractSet memory _
proxie
s,
Types.ContractSet memory _
contract
s,
DeployConfig _cfg,
DeployConfig _cfg,
bool _isPaused
bool _isPaused
)
)
internal
internal
view
view
{
{
SuperchainConfig superchainConfig = SuperchainConfig(_
proxie
s.SuperchainConfig);
SuperchainConfig superchainConfig = SuperchainConfig(_
contract
s.SuperchainConfig);
require(superchainConfig.guardian() == _cfg.
portal
Guardian());
require(superchainConfig.guardian() == _cfg.
superchainConfig
Guardian());
require(superchainConfig.paused() == _isPaused);
require(superchainConfig.paused() == _isPaused);
}
}
}
}
packages/contracts-bedrock/scripts/Deploy.s.sol
View file @
549f2a9e
...
@@ -497,7 +497,7 @@ contract Deploy is Deployer {
...
@@ -497,7 +497,7 @@ contract Deploy is Deployer {
/// @notice Deploy the OptimismPortal
/// @notice Deploy the OptimismPortal
function deployOptimismPortal() public broadcast returns (address addr_) {
function deployOptimismPortal() public broadcast returns (address addr_) {
console.log("Deploying OptimismPortal implementation");
console.log("Deploying OptimismPortal implementation");
address guardian = cfg.
portal
Guardian();
address guardian = cfg.
superchainConfig
Guardian();
if (guardian.code.length == 0) {
if (guardian.code.length == 0) {
console.log("Portal guardian has no code: %s", guardian);
console.log("Portal guardian has no code: %s", guardian);
}
}
...
@@ -508,8 +508,6 @@ contract Deploy is Deployer {
...
@@ -508,8 +508,6 @@ contract Deploy is Deployer {
OptimismPortal portal = new OptimismPortal{ salt: _implSalt() }({
OptimismPortal portal = new OptimismPortal{ salt: _implSalt() }({
_l2Oracle: l2OutputOracle,
_l2Oracle: l2OutputOracle,
_guardian: guardian,
_paused: true,
_systemConfig: systemConfig,
_systemConfig: systemConfig,
_superchainConfig: superchainConfig
_superchainConfig: superchainConfig
});
});
...
@@ -735,10 +733,10 @@ contract Deploy is Deployer {
...
@@ -735,10 +733,10 @@ contract Deploy is Deployer {
_upgradeAndCallViaSafe({
_upgradeAndCallViaSafe({
_proxy: superchainConfigProxy,
_proxy: superchainConfigProxy,
_implementation: superchainConfig,
_implementation: superchainConfig,
_innerCallData: abi.encodeCall(SuperchainConfig.initialize, (cfg.
portal
Guardian()))
_innerCallData: abi.encodeCall(SuperchainConfig.initialize, (cfg.
superchainConfig
Guardian()))
});
});
ChainAssertions.checkSuperchainConfig({ _
proxie
s: _proxiesUnstrict(), _cfg: cfg, _isPaused: false });
ChainAssertions.checkSuperchainConfig({ _
contract
s: _proxiesUnstrict(), _cfg: cfg, _isPaused: false });
}
}
/// @notice Initialize the DisputeGameFactory
/// @notice Initialize the DisputeGameFactory
...
...
packages/contracts-bedrock/scripts/DeployConfig.s.sol
View file @
549f2a9e
...
@@ -15,7 +15,7 @@ contract DeployConfig is Script {
...
@@ -15,7 +15,7 @@ contract DeployConfig is Script {
string internal _json;
string internal _json;
address public finalSystemOwner;
address public finalSystemOwner;
address public
portal
Guardian;
address public
superchainConfig
Guardian;
uint256 public l1ChainID;
uint256 public l1ChainID;
uint256 public l2ChainID;
uint256 public l2ChainID;
uint256 public l2BlockTime;
uint256 public l2BlockTime;
...
@@ -64,7 +64,7 @@ contract DeployConfig is Script {
...
@@ -64,7 +64,7 @@ contract DeployConfig is Script {
}
}
finalSystemOwner = stdJson.readAddress(_json, "$.finalSystemOwner");
finalSystemOwner = stdJson.readAddress(_json, "$.finalSystemOwner");
portalGuardian = stdJson.readAddress(_json, "$.portal
Guardian");
superchainConfigGuardian = stdJson.readAddress(_json, "$.superchainConfig
Guardian");
l1ChainID = stdJson.readUint(_json, "$.l1ChainID");
l1ChainID = stdJson.readUint(_json, "$.l1ChainID");
l2ChainID = stdJson.readUint(_json, "$.l2ChainID");
l2ChainID = stdJson.readUint(_json, "$.l2ChainID");
l2BlockTime = stdJson.readUint(_json, "$.l2BlockTime");
l2BlockTime = stdJson.readUint(_json, "$.l2BlockTime");
...
...
packages/contracts-bedrock/scripts/getting-started/config.sh
View file @
549f2a9e
...
@@ -28,7 +28,7 @@ blockhash=$(echo "$block" | awk '/hash/ { print $2 }')
...
@@ -28,7 +28,7 @@ blockhash=$(echo "$block" | awk '/hash/ { print $2 }')
config
=
$(
cat
<<
EOL
config
=
$(
cat
<<
EOL
{
{
"finalSystemOwner": "
$GS_ADMIN_ADDRESS
",
"finalSystemOwner": "
$GS_ADMIN_ADDRESS
",
"
portal
Guardian": "
$GS_ADMIN_ADDRESS
",
"
superchainConfig
Guardian": "
$GS_ADMIN_ADDRESS
",
"l1StartingBlockTag": "
$blockhash
",
"l1StartingBlockTag": "
$blockhash
",
...
...
packages/contracts-bedrock/test/OptimismPortal.t.sol
View file @
549f2a9e
...
@@ -30,7 +30,7 @@ contract OptimismPortal_Test is CommonTest {
...
@@ -30,7 +30,7 @@ contract OptimismPortal_Test is CommonTest {
/// @dev Tests that the constructor sets the correct values.
/// @dev Tests that the constructor sets the correct values.
function test_constructor_succeeds() external {
function test_constructor_succeeds() external {
address guardian = deploy.cfg().
portal
Guardian();
address guardian = deploy.cfg().
superchainConfig
Guardian();
assertEq(address(optimismPortal.L2_ORACLE()), address(l2OutputOracle));
assertEq(address(optimismPortal.L2_ORACLE()), address(l2OutputOracle));
assertEq(address(optimismPortal.l2Oracle()), address(l2OutputOracle));
assertEq(address(optimismPortal.l2Oracle()), address(l2OutputOracle));
assertEq(optimismPortal.GUARDIAN(), guardian);
assertEq(optimismPortal.GUARDIAN(), guardian);
...
...
packages/contracts-bedrock/test/SuperchainConfig.t.sol
View file @
549f2a9e
...
@@ -17,7 +17,7 @@ contract SuperchainConfig_Init_Test is CommonTest {
...
@@ -17,7 +17,7 @@ contract SuperchainConfig_Init_Test is CommonTest {
/// @dev Tests that initialization sets the correct values. These are defined in CommonTest.sol.
/// @dev Tests that initialization sets the correct values. These are defined in CommonTest.sol.
function test_initialize_values_succeeds() external {
function test_initialize_values_succeeds() external {
assertFalse(superchainConfig.paused());
assertFalse(superchainConfig.paused());
assertEq(superchainConfig.guardian(), deploy.cfg().
portal
Guardian());
assertEq(superchainConfig.guardian(), deploy.cfg().
superchainConfig
Guardian());
}
}
}
}
...
...
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