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
25be16bf
Unverified
Commit
25be16bf
authored
Dec 07, 2022
by
mergify[bot]
Committed by
GitHub
Dec 07, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4269 from ethereum-optimism/sc/ctb-clean-deploy-config-4
maint(ctb): remove unnecessary deploy vars
parents
c129ec6a
06ef827c
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
39 additions
and
56 deletions
+39
-56
config.go
op-chain-ops/genesis/config.go
+0
-5
layer_one.go
op-chain-ops/genesis/layer_one.go
+2
-2
test-deploy-config-full.json
op-chain-ops/genesis/testdata/test-deploy-config-full.json
+0
-1
setup.go
op-e2e/e2eutils/setup.go
+2
-2
setup.go
op-e2e/setup.go
+1
-1
CrossDomainOwnable2.t.sol
...ontracts-bedrock/contracts/test/CrossDomainOwnable2.t.sol
+0
-1
devnetL1.json
packages/contracts-bedrock/deploy-config/devnetL1.json
+0
-1
goerli-forked.json
packages/contracts-bedrock/deploy-config/goerli-forked.json
+0
-1
goerli.json
packages/contracts-bedrock/deploy-config/goerli.json
+0
-2
hardhat.json
packages/contracts-bedrock/deploy-config/hardhat.json
+0
-2
017-SystemConfigImpl.ts
packages/contracts-bedrock/deploy/017-SystemConfigImpl.ts
+21
-6
019-SystemDictatorInit.ts
packages/contracts-bedrock/deploy/019-SystemDictatorInit.ts
+1
-1
deploy-config.ts
packages/contracts-bedrock/src/deploy-config.ts
+12
-31
No files found.
op-chain-ops/genesis/config.go
View file @
25be16bf
...
...
@@ -44,8 +44,6 @@ type DeployConfig struct {
L2OutputOracleProposer
common
.
Address
`json:"l2OutputOracleProposer"`
L2OutputOracleChallenger
common
.
Address
`json:"l2OutputOracleChallenger"`
SystemConfigOwner
common
.
Address
`json:"systemConfigOwner"`
L1BlockTime
uint64
`json:"l1BlockTime"`
L1GenesisBlockTimestamp
hexutil
.
Uint64
`json:"l1GenesisBlockTimestamp"`
L1GenesisBlockNonce
hexutil
.
Uint64
`json:"l1GenesisBlockNonce"`
...
...
@@ -146,9 +144,6 @@ func (d *DeployConfig) Check() error {
if
d
.
L2OutputOracleChallenger
==
(
common
.
Address
{})
{
return
fmt
.
Errorf
(
"%w: L2OutputOracleChallenger cannot be address(0)"
,
ErrInvalidDeployConfig
)
}
if
d
.
SystemConfigOwner
==
(
common
.
Address
{})
{
return
fmt
.
Errorf
(
"%w: SystemConfigOwner cannot be address(0)"
,
ErrInvalidDeployConfig
)
}
if
d
.
FinalSystemOwner
==
(
common
.
Address
{})
{
return
fmt
.
Errorf
(
"%w: FinalSystemOwner cannot be address(0)"
,
ErrInvalidDeployConfig
)
}
...
...
op-chain-ops/genesis/layer_one.go
View file @
25be16bf
...
...
@@ -77,7 +77,7 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
}
data
,
err
:=
sysCfgABI
.
Pack
(
"initialize"
,
config
.
SystemConfig
Owner
,
config
.
FinalSystem
Owner
,
uint642Big
(
config
.
GasPriceOracleOverhead
),
uint642Big
(
config
.
GasPriceOracleScalar
),
config
.
BatchSenderAddress
.
Hash
(),
...
...
@@ -263,7 +263,7 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend)
{
Name
:
"SystemConfig"
,
Args
:
[]
interface
{}{
config
.
SystemConfig
Owner
,
config
.
FinalSystem
Owner
,
uint642Big
(
config
.
GasPriceOracleOverhead
),
uint642Big
(
config
.
GasPriceOracleScalar
),
config
.
BatchSenderAddress
.
Hash
(),
// left-padded 32 bytes value, version is zero anyway
...
...
op-chain-ops/genesis/testdata/test-deploy-config-full.json
View file @
25be16bf
...
...
@@ -13,7 +13,6 @@
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleProposer"
:
"0x7770000000000000000000000000000000000001"
,
"l2OutputOracleChallenger"
:
"0x7770000000000000000000000000000000000002"
,
"systemConfigOwner"
:
"0x7770000000000000000000000000000000000003"
,
"l1BlockTime"
:
15
,
"l1GenesisBlockNonce"
:
"0x0"
,
"cliqueSignerAddress"
:
"0x0000000000000000000000000000000000000000"
,
...
...
op-e2e/e2eutils/setup.go
View file @
25be16bf
...
...
@@ -71,7 +71,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
L2OutputOracleProposer
:
addresses
.
Proposer
,
L2OutputOracleChallenger
:
common
.
Address
{},
// tbd
SystemConfig
Owner
:
addresses
.
SysCfgOwner
,
FinalSystem
Owner
:
addresses
.
SysCfgOwner
,
L1BlockTime
:
15
,
L1GenesisBlockNonce
:
0
,
...
...
@@ -257,7 +257,7 @@ func ForkedDeployConfig(t require.TestingT, mnemonicCfg *MnemonicConfig, startBl
P2PSequencerAddress
:
addrs
.
SequencerP2P
,
BatchInboxAddress
:
common
.
HexToAddress
(
"0xff00000000000000000000000000000000000000"
),
BatchSenderAddress
:
addrs
.
Batcher
,
SystemConfigOwner
:
addrs
.
SysCfgOwner
,
FinalSystemOwner
:
addrs
.
SysCfgOwner
,
L1GenesisBlockDifficulty
:
uint64ToBig
(
0
),
L1GenesisBlockBaseFeePerGas
:
uint64ToBig
(
0
),
L2OutputOracleSubmissionInterval
:
10
,
...
...
op-e2e/setup.go
View file @
25be16bf
...
...
@@ -64,7 +64,7 @@ func DefaultSystemConfig(t *testing.T) SystemConfig {
L2OutputOracleProposer
:
addresses
.
Proposer
,
L2OutputOracleChallenger
:
common
.
Address
{},
// tbd
SystemConfig
Owner
:
addresses
.
SysCfgOwner
,
FinalSystem
Owner
:
addresses
.
SysCfgOwner
,
L1BlockTime
:
2
,
L1GenesisBlockNonce
:
4660
,
...
...
packages/contracts-bedrock/contracts/test/CrossDomainOwnable2.t.sol
View file @
25be16bf
...
...
@@ -41,7 +41,6 @@ contract CrossDomainOwnable2_Test is Messenger_Initializer {
setter.set(1);
}
function test_onlyOwner_notOwner2_reverts() external {
uint240 nonce = 0;
address sender = bob;
...
...
packages/contracts-bedrock/deploy-config/devnetL1.json
View file @
25be16bf
...
...
@@ -8,7 +8,6 @@
"p2pSequencerAddress"
:
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc"
,
"batchInboxAddress"
:
"0xff00000000000000000000000000000000000000"
,
"batchSenderAddress"
:
"0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"
,
"systemConfigOwner"
:
"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"
,
"l2OutputOracleSubmissionInterval"
:
20
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleProposer"
:
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
,
...
...
packages/contracts-bedrock/deploy-config/goerli-forked.json
View file @
25be16bf
...
...
@@ -19,7 +19,6 @@
"l2OutputOracleChallenger"
:
"0x88BCa4Af3d950625752867f826E073E337076581"
,
"finalizationPeriodSeconds"
:
2
,
"systemConfigOwner"
:
"0x62790eFcB3a5f3A5D398F95B47930A9Addd83807"
,
"proxyAdminOwner"
:
"0x62790eFcB3a5f3A5D398F95B47930A9Addd83807"
,
"l2GenesisBlockGasLimit"
:
"0x17D7840"
,
...
...
packages/contracts-bedrock/deploy-config/goerli.json
View file @
25be16bf
...
...
@@ -20,8 +20,6 @@
"l2OutputOracleChallenger"
:
"DUMMY"
,
"finalizationPeriodSeconds"
:
2
,
"systemConfigOwner"
:
"DUMMY"
,
"l2GenesisBlockGasLimit"
:
"0x17D7840"
,
"l2GenesisBlockCoinbase"
:
"0x4200000000000000000000000000000000000011"
,
"l2GenesisBlockBaseFeePerGas"
:
"0x3b9aca00"
,
...
...
packages/contracts-bedrock/deploy-config/hardhat.json
View file @
25be16bf
...
...
@@ -13,8 +13,6 @@
"batchInboxAddress"
:
"0xff00000000000000000000000000000000000000"
,
"batchSenderAddress"
:
"0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"
,
"systemConfigOwner"
:
"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"
,
"l2OutputOracleSubmissionInterval"
:
6
,
"l2OutputOracleStartingTimestamp"
:
-1
,
"l2OutputOracleProposer"
:
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
,
...
...
packages/contracts-bedrock/deploy/017-SystemConfigImpl.ts
View file @
25be16bf
import
{
ethers
}
from
'
ethers
'
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
import
'
@eth-optimism/hardhat-deploy-config
'
import
{
assertContractVariable
,
deploy
}
from
'
../src/deploy-utils
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
let
finalOwner
=
hre
.
deployConfig
.
finalSystemOwner
if
(
finalOwner
===
ethers
.
constants
.
AddressZero
)
{
if
(
hre
.
network
.
config
.
live
===
false
)
{
console
.
log
(
`WARNING!!!`
)
console
.
log
(
`WARNING!!!`
)
console
.
log
(
`WARNING!!!`
)
console
.
log
(
`WARNING!!! A proxy admin owner address was not provided.`
)
console
.
log
(
`WARNING!!! Make sure you are ONLY doing this on a test network.`
)
finalOwner
=
deployer
}
else
{
throw
new
Error
(
`must specify the finalSystemOwner on live networks`
)
}
}
const
batcherHash
=
hre
.
ethers
.
utils
.
hexZeroPad
(
hre
.
deployConfig
.
batchSenderAddress
,
32
...
...
@@ -13,18 +32,14 @@ const deployFn: DeployFunction = async (hre) => {
hre
,
name
:
'
SystemConfig
'
,
args
:
[
hre
.
deployConfig
.
systemConfig
Owner
,
final
Owner
,
hre
.
deployConfig
.
gasPriceOracleOverhead
,
hre
.
deployConfig
.
gasPriceOracleScalar
,
batcherHash
,
hre
.
deployConfig
.
l2GenesisBlockGasLimit
,
],
postDeployAction
:
async
(
contract
)
=>
{
await
assertContractVariable
(
contract
,
'
owner
'
,
hre
.
deployConfig
.
systemConfigOwner
)
await
assertContractVariable
(
contract
,
'
owner
'
,
finalOwner
)
await
assertContractVariable
(
contract
,
'
overhead
'
,
...
...
packages/contracts-bedrock/deploy/019-SystemDictatorInit.ts
View file @
25be16bf
...
...
@@ -125,7 +125,7 @@ const deployFn: DeployFunction = async (hre) => {
systemConfigImpl
:
await
getDeploymentAddress
(
hre
,
'
SystemConfig
'
),
},
systemConfigConfig
:
{
owner
:
hre
.
deployConfig
.
systemConfig
Owner
,
owner
:
final
Owner
,
overhead
:
hre
.
deployConfig
.
gasPriceOracleOverhead
,
scalar
:
hre
.
deployConfig
.
gasPriceOracleDecimals
,
batcherHash
:
hre
.
ethers
.
utils
.
hexZeroPad
(
...
...
packages/contracts-bedrock/src/deploy-config.ts
View file @
25be16bf
...
...
@@ -4,6 +4,11 @@ import { ethers } from 'ethers'
* Core required deployment configuration.
*/
interface
RequiredDeployConfig
{
/**
* Number of confirmations to wait when deploying contracts.
*/
numDeployConfirmations
:
number
/**
* Address that will own the entire system on L1 when the deploy is complete.
*/
...
...
@@ -100,20 +105,15 @@ interface RequiredDeployConfig {
* Output finalization period in seconds.
*/
finalizationPeriodSeconds
:
number
/**
* Owner of the SystemConfig contract.
*/
systemConfigOwner
:
string
}
/**
* Optional deployment configuration when spinning up an L1 network as part of the deployment.
*/
interface
OptionalL1DeployConfig
{
cliqueSignerAddress
:
string
l1BlockTime
:
number
l1GenesisBlockNonce
:
string
cliqueSignerAddress
:
string
l1GenesisBlockGasLimit
:
string
l1GenesisBlockDifficulty
:
string
l1GenesisBlockMixHash
:
string
...
...
@@ -138,13 +138,9 @@ interface OptionalL2DeployConfig {
l2GenesisBlockGasUsed
:
string
l2GenesisBlockParentHash
:
string
l2GenesisBlockBaseFeePerGas
:
string
optimismBaseFeeRecipient
:
string
optimismL1FeeRecipient
:
string
l2CrossDomainMessengerOwner
:
string
gasPriceOracleOverhead
:
number
gasPriceOracleScalar
:
number
gasPriceOracleDecimals
:
number
numDeployConfirmations
:
number
}
/**
...
...
@@ -163,6 +159,10 @@ export const deployConfigSpec: {
default
?:
any
}
}
=
{
numDeployConfirmations
:
{
type
:
'
number
'
,
default
:
1
,
},
finalSystemOwner
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
...
...
@@ -221,8 +221,9 @@ export const deployConfigSpec: {
type
:
'
number
'
,
default
:
2
,
},
systemConfigOwner
:
{
cliqueSignerAddress
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
},
l1BlockTime
:
{
type
:
'
number
'
,
...
...
@@ -232,10 +233,6 @@ export const deployConfigSpec: {
type
:
'
string
'
,
// uint64
default
:
'
0x0
'
,
},
cliqueSignerAddress
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
},
l1GenesisBlockGasLimit
:
{
type
:
'
string
'
,
default
:
ethers
.
BigNumber
.
from
(
15
_000_000
).
toHexString
(),
...
...
@@ -308,18 +305,6 @@ export const deployConfigSpec: {
type
:
'
string
'
,
// uint256
default
:
ethers
.
BigNumber
.
from
(
1000
_000_000
).
toHexString
(),
// 1 gwei
},
optimismBaseFeeRecipient
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
},
optimismL1FeeRecipient
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
},
l2CrossDomainMessengerOwner
:
{
type
:
'
address
'
,
default
:
ethers
.
constants
.
AddressZero
,
},
gasPriceOracleOverhead
:
{
type
:
'
number
'
,
default
:
2100
,
...
...
@@ -332,8 +317,4 @@ export const deployConfigSpec: {
type
:
'
number
'
,
default
:
6
,
},
numDeployConfirmations
:
{
type
:
'
number
'
,
default
:
1
,
},
}
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