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
01b9108c
Unverified
Commit
01b9108c
authored
Dec 16, 2022
by
mergify[bot]
Committed by
GitHub
Dec 16, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4425 from ethereum-optimism/feat/configurable-gov-token
op-chain-ops: configurable gov token
parents
8d8219f5
c0fc64ed
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
4 deletions
+61
-4
config.go
op-chain-ops/genesis/config.go
+21
-4
test-deploy-config-full.json
op-chain-ops/genesis/testdata/test-deploy-config-full.json
+3
-0
devnetL1.json
packages/contracts-bedrock/deploy-config/devnetL1.json
+3
-0
goerli-forked.json
packages/contracts-bedrock/deploy-config/goerli-forked.json
+4
-0
goerli.json
packages/contracts-bedrock/deploy-config/goerli.json
+4
-0
deploy-config.ts
packages/contracts-bedrock/src/deploy-config.ts
+26
-0
No files found.
op-chain-ops/genesis/config.go
View file @
01b9108c
...
@@ -88,9 +88,16 @@ type DeployConfig struct {
...
@@ -88,9 +88,16 @@ type DeployConfig struct {
SystemConfigProxy
common
.
Address
`json:"systemConfigProxy"`
SystemConfigProxy
common
.
Address
`json:"systemConfigProxy"`
// OptimismPortal proxy address on L1
// OptimismPortal proxy address on L1
OptimismPortalProxy
common
.
Address
`json:"optimismPortalProxy"`
OptimismPortalProxy
common
.
Address
`json:"optimismPortalProxy"`
// The initial value of the gas overhead
GasPriceOracleOverhead
uint64
`json:"gasPriceOracleOverhead"`
GasPriceOracleOverhead
uint64
`json:"gasPriceOracleOverhead"`
GasPriceOracleScalar
uint64
`json:"gasPriceOracleScalar"`
// The initial value of the gas scalar
GasPriceOracleScalar
uint64
`json:"gasPriceOracleScalar"`
// The ERC20 symbol of the GovernanceToken
GovernanceTokenSymbol
string
`json:"governanceTokenSymbol"`
// The ERC20 name of the GovernanceToken
GovernanceTokenName
string
`json:"governanceTokenName"`
// The owner of the GovernanceToken
GovernanceTokenOwner
common
.
Address
`json:"governanceTokenOwner"`
DeploymentWaitConfirmations
int
`json:"deploymentWaitConfirmations"`
DeploymentWaitConfirmations
int
`json:"deploymentWaitConfirmations"`
...
@@ -192,6 +199,15 @@ func (d *DeployConfig) Check() error {
...
@@ -192,6 +199,15 @@ func (d *DeployConfig) Check() error {
if
d
.
L2GenesisBlockBaseFeePerGas
==
nil
{
if
d
.
L2GenesisBlockBaseFeePerGas
==
nil
{
return
fmt
.
Errorf
(
"%w: L2 genesis block base fee per gas cannot be nil"
,
ErrInvalidDeployConfig
)
return
fmt
.
Errorf
(
"%w: L2 genesis block base fee per gas cannot be nil"
,
ErrInvalidDeployConfig
)
}
}
if
d
.
GovernanceTokenName
==
""
{
return
fmt
.
Errorf
(
"%w: GovernanceToken.name cannot be empty"
,
ErrInvalidDeployConfig
)
}
if
d
.
GovernanceTokenSymbol
==
""
{
return
fmt
.
Errorf
(
"%w: GovernanceToken.symbol cannot be empty"
,
ErrInvalidDeployConfig
)
}
if
d
.
GovernanceTokenOwner
==
(
common
.
Address
{})
{
return
fmt
.
Errorf
(
"%w: GovernanceToken owner cannot be address(0)"
,
ErrInvalidDeployConfig
)
}
return
nil
return
nil
}
}
...
@@ -408,8 +424,9 @@ func NewL2StorageConfig(config *DeployConfig, block *types.Block) (state.Storage
...
@@ -408,8 +424,9 @@ func NewL2StorageConfig(config *DeployConfig, block *types.Block) (state.Storage
"decimals"
:
18
,
"decimals"
:
18
,
}
}
storage
[
"GovernanceToken"
]
=
state
.
StorageValues
{
storage
[
"GovernanceToken"
]
=
state
.
StorageValues
{
"_name"
:
"Optimism"
,
"_name"
:
config
.
GovernanceTokenName
,
"_symbol"
:
"OP"
,
"_symbol"
:
config
.
GovernanceTokenSymbol
,
"_owner"
:
config
.
GovernanceTokenOwner
,
}
}
storage
[
"ProxyAdmin"
]
=
state
.
StorageValues
{
storage
[
"ProxyAdmin"
]
=
state
.
StorageValues
{
"_owner"
:
config
.
ProxyAdminOwner
,
"_owner"
:
config
.
ProxyAdminOwner
,
...
...
op-chain-ops/genesis/testdata/test-deploy-config-full.json
View file @
01b9108c
...
@@ -48,6 +48,9 @@
...
@@ -48,6 +48,9 @@
"proxyAdminOwner"
:
"0x0000000000000000000000000000000000000222"
,
"proxyAdminOwner"
:
"0x0000000000000000000000000000000000000222"
,
"gasPriceOracleOverhead"
:
2100
,
"gasPriceOracleOverhead"
:
2100
,
"gasPriceOracleScalar"
:
1000000
,
"gasPriceOracleScalar"
:
1000000
,
"governanceTokenSymbol"
:
"OP"
,
"governanceTokenName"
:
"Optimism"
,
"governanceTokenOwner"
:
"0x0000000000000000000000000000000000000333"
,
"deploymentWaitConfirmations"
:
1
,
"deploymentWaitConfirmations"
:
1
,
"eip1559Denominator"
:
8
,
"eip1559Denominator"
:
8
,
"eip1559Elasticity"
:
2
,
"eip1559Elasticity"
:
2
,
...
...
packages/contracts-bedrock/deploy-config/devnetL1.json
View file @
01b9108c
...
@@ -28,6 +28,9 @@
...
@@ -28,6 +28,9 @@
"l2GenesisBlockBaseFeePerGas"
:
"0x3B9ACA00"
,
"l2GenesisBlockBaseFeePerGas"
:
"0x3B9ACA00"
,
"gasPriceOracleOverhead"
:
2100
,
"gasPriceOracleOverhead"
:
2100
,
"gasPriceOracleScalar"
:
1000000
,
"gasPriceOracleScalar"
:
1000000
,
"governanceTokenSymbol"
:
"OP"
,
"governanceTokenName"
:
"Optimism"
,
"governanceTokenOwner"
:
"0xBcd4042DE499D14e55001CcbB24a551F3b954096"
,
"eip1559Denominator"
:
8
,
"eip1559Denominator"
:
8
,
"eip1559Elasticity"
:
2
,
"eip1559Elasticity"
:
2
,
"l1GenesisBlockTimestamp"
:
"0x638a4554"
,
"l1GenesisBlockTimestamp"
:
"0x638a4554"
,
...
...
packages/contracts-bedrock/deploy-config/goerli-forked.json
View file @
01b9108c
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
"proxyAdminOwner"
:
"0x62790eFcB3a5f3A5D398F95B47930A9Addd83807"
,
"proxyAdminOwner"
:
"0x62790eFcB3a5f3A5D398F95B47930A9Addd83807"
,
"governanceTokenName"
:
"Optimism"
,
"governanceTokenSymbol"
:
"OP"
,
"governanceTokenOwner"
:
"0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76"
,
"l2GenesisBlockGasLimit"
:
"0x17D7840"
,
"l2GenesisBlockGasLimit"
:
"0x17D7840"
,
"l2GenesisBlockCoinbase"
:
"0x4200000000000000000000000000000000000011"
,
"l2GenesisBlockCoinbase"
:
"0x4200000000000000000000000000000000000011"
,
"l2GenesisBlockBaseFeePerGas"
:
"0x3b9aca00"
,
"l2GenesisBlockBaseFeePerGas"
:
"0x3b9aca00"
,
...
...
packages/contracts-bedrock/deploy-config/goerli.json
View file @
01b9108c
...
@@ -26,6 +26,10 @@
...
@@ -26,6 +26,10 @@
"l2CrossDomainMessengerOwner"
:
"DUMMY"
,
"l2CrossDomainMessengerOwner"
:
"DUMMY"
,
"governanceTokenName"
:
"Optimism"
,
"governanceTokenSymbol"
:
"OP"
,
"governanceTokenOwner"
:
"0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76"
,
"gasPriceOracleOverhead"
:
2100
,
"gasPriceOracleOverhead"
:
2100
,
"gasPriceOracleScalar"
:
1000000
,
"gasPriceOracleScalar"
:
1000000
,
"eip1559Denominator"
:
50
,
"eip1559Denominator"
:
50
,
...
...
packages/contracts-bedrock/src/deploy-config.ts
View file @
01b9108c
...
@@ -101,6 +101,21 @@ interface RequiredDeployConfig {
...
@@ -101,6 +101,21 @@ interface RequiredDeployConfig {
*/
*/
l2OutputOracleChallenger
:
string
l2OutputOracleChallenger
:
string
/**
* ERC20 symbol used for the L2 GovernanceToken.
*/
governanceTokenSymbol
:
string
/**
* ERC20 name used for the L2 GovernanceToken.
*/
governanceTokenName
:
string
/**
* Owner of the L2 GovernanceToken. Has mint/burn capability.
*/
governanceTokenOwner
:
string
/**
/**
* Output finalization period in seconds.
* Output finalization period in seconds.
*/
*/
...
@@ -315,4 +330,15 @@ export const deployConfigSpec: {
...
@@ -315,4 +330,15 @@ export const deployConfigSpec: {
type
:
'
number
'
,
type
:
'
number
'
,
default
:
6
,
default
:
6
,
},
},
governanceTokenSymbol
:
{
type
:
'
string
'
,
default
:
'
OP
'
,
},
governanceTokenName
:
{
type
:
'
string
'
,
default
:
'
Optimism
'
,
},
governanceTokenOwner
:
{
type
:
'
string
'
,
},
}
}
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