Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions devnet-sdk/contracts/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ var (
ProxyAdmin types.Address = common.HexToAddress("0x4200000000000000000000000000000000000018")
BaseFeeVault types.Address = common.HexToAddress("0x4200000000000000000000000000000000000019")
L1FeeVault types.Address = common.HexToAddress("0x420000000000000000000000000000000000001a")
OperatorFeeVault types.Address = common.HexToAddress("0x420000000000000000000000000000000000001B")
SchemaRegistry types.Address = common.HexToAddress("0x4200000000000000000000000000000000000020")
EAS types.Address = common.HexToAddress("0x4200000000000000000000000000000000000021")
CrossL2Inbox types.Address = common.HexToAddress("0x4200000000000000000000000000000000000022")
L2ToL2CrossDomainMessenger types.Address = common.HexToAddress("0x4200000000000000000000000000000000000023")
SuperchainETHBridge types.Address = common.HexToAddress("0x4200000000000000000000000000000000000024")
ETHLiquidity types.Address = common.HexToAddress("0x4200000000000000000000000000000000000025")
SuperchainTokenBridge types.Address = common.HexToAddress("0x4200000000000000000000000000000000000028")
FeeSplitter types.Address = common.HexToAddress("0x420000000000000000000000000000000000002B")
GovernanceToken types.Address = common.HexToAddress("0x4200000000000000000000000000000000000042")
Create2Deployer types.Address = common.HexToAddress("0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2")
MultiCall3 types.Address = common.HexToAddress("0xcA11bde05977b3631167028862bE2a173976CA11")
Expand Down
4 changes: 4 additions & 0 deletions op-chain-ops/devkeys/devkeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ const (
SystemConfigOwner ChainOperatorRole = 10
// OperatorFeeVaultRecipientRole is the key that receives from the OperatorFeeVault predeploy
OperatorFeeVaultRecipientRole ChainOperatorRole = 11
// ChainFeesRecipientRole is the key that receives the chain's share from the FeeSplitter
ChainFeesRecipientRole ChainOperatorRole = 12
)

func (role ChainOperatorRole) String() string {
Expand Down Expand Up @@ -188,6 +190,8 @@ func (role ChainOperatorRole) String() string {
return "operator-fee-vault-recipient"
case SystemConfigOwner:
return "system-config-owner"
case ChainFeesRecipientRole:
return "chain-fees-recipient"
default:
return fmt.Sprintf("unknown-operator-%d", uint64(role))
}
Expand Down
9 changes: 7 additions & 2 deletions op-chain-ops/genesis/withdrawal_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,21 @@ func TestWithdrawalNetworkInlineJSON(t *testing.T) {
BaseFeeVaultWithdrawalNetwork WithdrawalNetwork `json:"baseFeeVaultWithdrawalNetwork"`
L1FeeVaultWithdrawalNetwork WithdrawalNetwork `json:"l1FeeVaultWithdrawalNetwork"`
SequencerFeeVaultWithdrawalNetwork WithdrawalNetwork `json:"sequencerFeeVaultWithdrawalNetwork"`
OperatorFeeVaultWithdrawalNetwork WithdrawalNetwork `json:"operatorFeeVaultWithdrawalNetwork"`
}

jsonString := `{
"baseFeeVaultWithdrawalNetwork": "remote",
"l1FeeVaultWithdrawalNetwork": "local",
"sequencerFeeVaultWithdrawalNetwork": "local"
"sequencerFeeVaultWithdrawalNetwork": "local",
"operatorFeeVaultWithdrawalNetwork": "local"
}`

intJsonString := `{
"baseFeeVaultWithdrawalNetwork": 0,
"l1FeeVaultWithdrawalNetwork": 1,
"sequencerFeeVaultWithdrawalNetwork": 1
"sequencerFeeVaultWithdrawalNetwork": 1,
"operatorFeeVaultWithdrawalNetwork": 1
}`

t.Run("StringMarshaling", func(t *testing.T) {
Expand All @@ -104,6 +107,7 @@ func TestWithdrawalNetworkInlineJSON(t *testing.T) {
require.Equal(t, WithdrawalNetwork("remote"), decoded.BaseFeeVaultWithdrawalNetwork)
require.Equal(t, WithdrawalNetwork("local"), decoded.L1FeeVaultWithdrawalNetwork)
require.Equal(t, WithdrawalNetwork("local"), decoded.SequencerFeeVaultWithdrawalNetwork)
require.Equal(t, WithdrawalNetwork("local"), decoded.OperatorFeeVaultWithdrawalNetwork)

encoded, err := json.Marshal(decoded)
require.NoError(t, err)
Expand All @@ -118,6 +122,7 @@ func TestWithdrawalNetworkInlineJSON(t *testing.T) {
require.Equal(t, WithdrawalNetwork("remote"), decoded.BaseFeeVaultWithdrawalNetwork)
require.Equal(t, WithdrawalNetwork("local"), decoded.L1FeeVaultWithdrawalNetwork)
require.Equal(t, WithdrawalNetwork("local"), decoded.SequencerFeeVaultWithdrawalNetwork)
require.Equal(t, WithdrawalNetwork("local"), decoded.OperatorFeeVaultWithdrawalNetwork)

encoded, err := json.Marshal(decoded)
require.NoError(t, err)
Expand Down
2 changes: 2 additions & 0 deletions op-deployer/book/src/user-guide/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ l2ContractsLocator = "tag://op-contracts/v1.7.0-beta.1+l2-contracts"
baseFeeVaultRecipient = "0x0000000000000000000000000000000000000000"
l1FeeVaultRecipient = "0x0000000000000000000000000000000000000000"
sequencerFeeVaultRecipient = "0x0000000000000000000000000000000000000000"
operatorFeeVaultRecipient = "0x0000000000000000000000000000000000000000"
eip1559DenominatorCanyon = 250
eip1559Denominator = 50
eip1559Elasticity = 6
Expand All @@ -65,6 +66,7 @@ In production environments, you should use a more secure setup with cold-wallet
* `baseFeeVaultRecipient`
* `l1FeeVaultRecipient`
* `sequencerFeeVaultRecipient`
* `operatorFeeVaultRecipient`
* `l1ProxyAdminOwner`
* `l2ProxyAdminOwner`
* `systemConfigOwner`
Expand Down
4 changes: 4 additions & 0 deletions op-deployer/pkg/deployer/inspect/semvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ type L2PredeploySemvers struct {
OptimismMintableERC721Factory string
BaseFeeVault string
L1FeeVault string
OperatorFeeVault string
SchemaRegistry string
EAS string
FeeSplitter string
CrossL2Inbox string
L2toL2CrossDomainMessenger string
SuperchainETHBridge string
Expand Down Expand Up @@ -153,8 +155,10 @@ func L2Semvers(cfg L2SemversConfig) (*L2PredeploySemvers, error) {
{predeploys.OptimismMintableERC721FactoryAddr, &ps.OptimismMintableERC721Factory, "OptimismMintableERC721Factory"},
{predeploys.BaseFeeVaultAddr, &ps.BaseFeeVault, "BaseFeeVault"},
{predeploys.L1FeeVaultAddr, &ps.L1FeeVault, "L1FeeVault"},
{predeploys.OperatorFeeVaultAddr, &ps.OperatorFeeVault, "OperatorFeeVault"},
{predeploys.SchemaRegistryAddr, &ps.SchemaRegistry, "SchemaRegistry"},
{predeploys.EASAddr, &ps.EAS, "EAS"},
{predeploys.FeeSplitterAddr, &ps.FeeSplitter, "FeeSplitter"},
}
for _, contract := range contracts {
semver, err := ReadSemver(host, contract.Address)
Expand Down
6 changes: 6 additions & 0 deletions op-deployer/pkg/deployer/integration_test/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,12 @@ func TestInvalidL2Genesis(t *testing.T) {
"sequencerFeeVaultRecipient": nil,
},
},
{
name: "operator fee vault recipient not set",
overrides: map[string]any{
"operatorFeeVaultRecipient": nil,
},
},
{
name: "l1 chain ID not set",
overrides: map[string]any{
Expand Down
2 changes: 0 additions & 2 deletions op-deployer/pkg/deployer/pipeline/l2genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type l2GenesisOverrides struct {
OperatorFeeVaultWithdrawalNetwork genesis.WithdrawalNetwork `json:"operatorFeeVaultWithdrawalNetwork"`
EnableGovernance bool `json:"enableGovernance"`
GovernanceTokenOwner common.Address `json:"governanceTokenOwner"`
UseRevenueShare bool `json:"useRevenueShare"`
}

func GenerateL2Genesis(pEnv *Env, intent *state.Intent, bundle ArtifactsBundle, st *state.State, chainID common.Hash) error {
Expand Down Expand Up @@ -176,6 +175,5 @@ func defaultOverrides() l2GenesisOverrides {
OperatorFeeVaultWithdrawalNetwork: "local",
EnableGovernance: false,
GovernanceTokenOwner: standard.GovernanceTokenOwner,
UseRevenueShare: true,
}
}
5 changes: 0 additions & 5 deletions op-deployer/pkg/deployer/pipeline/l2genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func TestCalculateL2GenesisOverrides(t *testing.T) {
OperatorFeeVaultWithdrawalNetwork: "local",
EnableGovernance: false,
GovernanceTokenOwner: standard.GovernanceTokenOwner,
UseRevenueShare: true,
},
expectedSchedule: func() *genesis.UpgradeScheduleDeployConfig {
return standard.DefaultHardforkScheduleForTag("")
Expand All @@ -78,7 +77,6 @@ func TestCalculateL2GenesisOverrides(t *testing.T) {
"enableGovernance": true,
"governanceTokenOwner": "0x1111111111111111111111111111111111111111",
"l2GenesisInteropTimeOffset": "0x1234",
"useRevenueShare": false,
"chainFeesRecipient": "0x0000000000000000000000000000000000005678",
},
},
Expand All @@ -96,7 +94,6 @@ func TestCalculateL2GenesisOverrides(t *testing.T) {
OperatorFeeVaultWithdrawalNetwork: "remote",
EnableGovernance: true,
GovernanceTokenOwner: common.HexToAddress("0x1111111111111111111111111111111111111111"),
UseRevenueShare: false,
},
expectedSchedule: func() *genesis.UpgradeScheduleDeployConfig {
sched := standard.DefaultHardforkScheduleForTag("")
Expand Down Expand Up @@ -125,7 +122,6 @@ func TestCalculateL2GenesisOverrides(t *testing.T) {
"enableGovernance": true,
"governanceTokenOwner": "0x1111111111111111111111111111111111111111",
"l2GenesisInteropTimeOffset": "0x1234",
"useRevenueShare": true,
},
},
expectError: false,
Expand All @@ -141,7 +137,6 @@ func TestCalculateL2GenesisOverrides(t *testing.T) {
OperatorFeeVaultWithdrawalNetwork: "remote",
EnableGovernance: true,
GovernanceTokenOwner: common.HexToAddress("0x1111111111111111111111111111111111111111"),
UseRevenueShare: true,
},
expectedSchedule: func() *genesis.UpgradeScheduleDeployConfig {
sched := standard.DefaultHardforkScheduleForTag("")
Expand Down
Loading