Commit 927b4321 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

bedrock: make fee recipient be SequencerFeeVault (#3781)

* bedrock: make fee recipient be SequencerFeeVault

The fee recipient or `block.coinbase` is now set to a hardcoded
value of the predeploy `SequencerFeeVault`. This reduces configuration
that is consensus criticial.

* op-chain-ops: correct config

Fixes a bug in the fee tests

* core-utils: remove dead config field from op-node config

* contracts-bedrock: deployment files

Existing tooling expects the name of the contract to equal
the name of the deployment. The latest work that updated
the deploy files added the `Impl` suffix to contract names.

* sdk: improve erc20 deposit logs
parent 919d19b9
...@@ -30,7 +30,6 @@ type DeployConfig struct { ...@@ -30,7 +30,6 @@ type DeployConfig struct {
SequencerWindowSize uint64 `json:"sequencerWindowSize"` SequencerWindowSize uint64 `json:"sequencerWindowSize"`
ChannelTimeout uint64 `json:"channelTimeout"` ChannelTimeout uint64 `json:"channelTimeout"`
P2PSequencerAddress common.Address `json:"p2pSequencerAddress"` P2PSequencerAddress common.Address `json:"p2pSequencerAddress"`
OptimismL2FeeRecipient common.Address `json:"optimismL2FeeRecipient"`
BatchInboxAddress common.Address `json:"batchInboxAddress"` BatchInboxAddress common.Address `json:"batchInboxAddress"`
BatchSenderAddress common.Address `json:"batchSenderAddress"` BatchSenderAddress common.Address `json:"batchSenderAddress"`
......
...@@ -52,8 +52,8 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro ...@@ -52,8 +52,8 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
TerminalTotalDifficulty: big.NewInt(0), TerminalTotalDifficulty: big.NewInt(0),
TerminalTotalDifficultyPassed: true, TerminalTotalDifficultyPassed: true,
Optimism: &params.OptimismConfig{ Optimism: &params.OptimismConfig{
L1FeeRecipient: config.OptimismL1FeeRecipient,
BaseFeeRecipient: config.OptimismBaseFeeRecipient, BaseFeeRecipient: config.OptimismBaseFeeRecipient,
L1FeeRecipient: config.OptimismL2FeeRecipient,
EIP1559Denominator: eip1559Denom, EIP1559Denominator: eip1559Denom,
EIP1559Elasticity: eip1559Elasticity, EIP1559Elasticity: eip1559Elasticity,
}, },
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"sequencerWindowSize": 4, "sequencerWindowSize": 4,
"channelTimeout": 40, "channelTimeout": 40,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", "p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"optimismL2FeeRecipient": "0xd9c09e21b57c98e58a80552c170989b426766aa7",
"batchInboxAddress": "0xff00000000000000000000000000000000000000", "batchInboxAddress": "0xff00000000000000000000000000000000000000",
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", "batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"sequencerWindowSize": 100, "sequencerWindowSize": 100,
"channelTimeout": 30, "channelTimeout": 30,
"p2pSequencerAddress": "0x0000000000000000000000000000000000000000", "p2pSequencerAddress": "0x0000000000000000000000000000000000000000",
"optimismL2FeeRecipient": "0x42000000000000000000000000000000000000f0",
"batchInboxAddress": "0x42000000000000000000000000000000000000ff", "batchInboxAddress": "0x42000000000000000000000000000000000000ff",
"batchSenderAddress": "0x0000000000000000000000000000000000000000", "batchSenderAddress": "0x0000000000000000000000000000000000000000",
"l2OutputOracleSubmissionInterval": 6, "l2OutputOracleSubmissionInterval": 6,
......
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-chain-ops/crossdomain" "github.com/ethereum-optimism/optimism/op-chain-ops/crossdomain"
) )
...@@ -41,7 +42,7 @@ func CollectAddresses(sd *SetupData, dp *DeployParams) (out []common.Address) { ...@@ -41,7 +42,7 @@ func CollectAddresses(sd *SetupData, dp *DeployParams) (out []common.Address) {
sd.L1Cfg.Coinbase, sd.L1Cfg.Coinbase,
sd.L2Cfg.Coinbase, sd.L2Cfg.Coinbase,
sd.RollupCfg.P2PSequencerAddress, sd.RollupCfg.P2PSequencerAddress,
sd.RollupCfg.FeeRecipientAddress, predeploys.SequencerFeeVaultAddr,
sd.RollupCfg.BatchInboxAddress, sd.RollupCfg.BatchInboxAddress,
sd.RollupCfg.BatchSenderAddress, sd.RollupCfg.BatchSenderAddress,
sd.RollupCfg.DepositContractAddress, sd.RollupCfg.DepositContractAddress,
......
...@@ -58,13 +58,12 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams { ...@@ -58,13 +58,12 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
L2ChainID: 902, L2ChainID: 902,
L2BlockTime: 2, L2BlockTime: 2,
MaxSequencerDrift: tp.MaxSequencerDrift, MaxSequencerDrift: tp.MaxSequencerDrift,
SequencerWindowSize: tp.SequencerWindowSize, SequencerWindowSize: tp.SequencerWindowSize,
ChannelTimeout: tp.ChannelTimeout, ChannelTimeout: tp.ChannelTimeout,
P2PSequencerAddress: addresses.SequencerP2P, P2PSequencerAddress: addresses.SequencerP2P,
OptimismL2FeeRecipient: common.Address{0: 0x42, 19: 0xf0}, // tbd BatchInboxAddress: common.Address{0: 0x42, 19: 0xff}, // tbd
BatchInboxAddress: common.Address{0: 0x42, 19: 0xff}, // tbd BatchSenderAddress: addresses.Batcher,
BatchSenderAddress: addresses.Batcher,
L2OutputOracleSubmissionInterval: 6, L2OutputOracleSubmissionInterval: 6,
L2OutputOracleStartingTimestamp: -1, L2OutputOracleStartingTimestamp: -1,
...@@ -89,7 +88,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams { ...@@ -89,7 +88,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
L2GenesisBlockGasLimit: 15_000_000, L2GenesisBlockGasLimit: 15_000_000,
L2GenesisBlockDifficulty: uint64ToBig(0), L2GenesisBlockDifficulty: uint64ToBig(0),
L2GenesisBlockMixHash: common.Hash{}, L2GenesisBlockMixHash: common.Hash{},
L2GenesisBlockCoinbase: common.Address{0: 0x42, 19: 0xf0}, // matching OptimismL2FeeRecipient L2GenesisBlockCoinbase: predeploys.SequencerFeeVaultAddr,
L2GenesisBlockNumber: 0, L2GenesisBlockNumber: 0,
L2GenesisBlockGasUsed: 0, L2GenesisBlockGasUsed: 0,
L2GenesisBlockParentHash: common.Hash{}, L2GenesisBlockParentHash: common.Hash{},
...@@ -201,7 +200,6 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) * ...@@ -201,7 +200,6 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
L1ChainID: new(big.Int).SetUint64(deployConf.L1ChainID), L1ChainID: new(big.Int).SetUint64(deployConf.L1ChainID),
L2ChainID: new(big.Int).SetUint64(deployConf.L2ChainID), L2ChainID: new(big.Int).SetUint64(deployConf.L2ChainID),
P2PSequencerAddress: deployConf.P2PSequencerAddress, P2PSequencerAddress: deployConf.P2PSequencerAddress,
FeeRecipientAddress: deployConf.OptimismL2FeeRecipient,
BatchInboxAddress: deployConf.BatchInboxAddress, BatchInboxAddress: deployConf.BatchInboxAddress,
BatchSenderAddress: deployConf.BatchSenderAddress, BatchSenderAddress: deployConf.BatchSenderAddress,
DepositContractAddress: predeploys.DevOptimismPortalAddr, DepositContractAddress: predeploys.DevOptimismPortalAddr,
......
...@@ -94,7 +94,6 @@ func DefaultSystemConfig(t *testing.T) SystemConfig { ...@@ -94,7 +94,6 @@ func DefaultSystemConfig(t *testing.T) SystemConfig {
OptimismBaseFeeRecipient: common.Address{0: 0x52, 19: 0xf0}, // tbd OptimismBaseFeeRecipient: common.Address{0: 0x52, 19: 0xf0}, // tbd
OptimismL1FeeRecipient: common.Address{0: 0x52, 19: 0xf1}, OptimismL1FeeRecipient: common.Address{0: 0x52, 19: 0xf1},
OptimismL2FeeRecipient: common.Address{0: 0x52, 19: 0xf2}, // tbd
L2CrossDomainMessengerOwner: common.Address{0: 0x52, 19: 0xf3}, // tbd L2CrossDomainMessengerOwner: common.Address{0: 0x52, 19: 0xf3}, // tbd
GasPriceOracleOwner: addresses.Alice, // tbd GasPriceOracleOwner: addresses.Alice, // tbd
GasPriceOracleOverhead: 0, GasPriceOracleOverhead: 0,
...@@ -283,7 +282,6 @@ func (cfg SystemConfig) Start() (*System, error) { ...@@ -283,7 +282,6 @@ func (cfg SystemConfig) Start() (*System, error) {
L1ChainID: cfg.L1ChainIDBig(), L1ChainID: cfg.L1ChainIDBig(),
L2ChainID: cfg.L2ChainIDBig(), L2ChainID: cfg.L2ChainIDBig(),
P2PSequencerAddress: cfg.DeployConfig.P2PSequencerAddress, P2PSequencerAddress: cfg.DeployConfig.P2PSequencerAddress,
FeeRecipientAddress: l2Genesis.Coinbase,
BatchInboxAddress: cfg.DeployConfig.BatchInboxAddress, BatchInboxAddress: cfg.DeployConfig.BatchInboxAddress,
BatchSenderAddress: cfg.DeployConfig.BatchSenderAddress, BatchSenderAddress: cfg.DeployConfig.BatchSenderAddress,
DepositContractAddress: predeploys.DevOptimismPortalAddr, DepositContractAddress: predeploys.DevOptimismPortalAddr,
......
...@@ -915,7 +915,7 @@ func TestFees(t *testing.T) { ...@@ -915,7 +915,7 @@ func TestFees(t *testing.T) {
// L1Fee Recipient // L1Fee Recipient
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
defer cancel() defer cancel()
l1FeeRecipientStartBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL2FeeRecipient, nil) l1FeeRecipientStartBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL1FeeRecipient, nil)
require.Nil(t, err) require.Nil(t, err)
// Simple transfer from signer to random account // Simple transfer from signer to random account
...@@ -976,7 +976,7 @@ func TestFees(t *testing.T) { ...@@ -976,7 +976,7 @@ func TestFees(t *testing.T) {
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
defer cancel() defer cancel()
l1FeeRecipientEndBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL2FeeRecipient, nil) l1FeeRecipientEndBalance, err := l2Seq.BalanceAt(ctx, cfg.DeployConfig.OptimismL1FeeRecipient, header.Number)
require.Nil(t, err) require.Nil(t, err)
// Diff fee recipient + coinbase balances // Diff fee recipient + coinbase balances
......
...@@ -193,7 +193,6 @@ func makeRollupConfig( ...@@ -193,7 +193,6 @@ func makeRollupConfig(
L1ChainID: new(big.Int).SetUint64(config.L1ChainID), L1ChainID: new(big.Int).SetUint64(config.L1ChainID),
L2ChainID: new(big.Int).SetUint64(config.L2ChainID), L2ChainID: new(big.Int).SetUint64(config.L2ChainID),
P2PSequencerAddress: config.P2PSequencerAddress, P2PSequencerAddress: config.P2PSequencerAddress,
FeeRecipientAddress: config.OptimismL2FeeRecipient,
BatchInboxAddress: config.BatchInboxAddress, BatchInboxAddress: config.BatchInboxAddress,
BatchSenderAddress: config.BatchSenderAddress, BatchSenderAddress: config.BatchSenderAddress,
DepositContractAddress: portalAddr, DepositContractAddress: portalAddr,
......
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
...@@ -74,7 +75,7 @@ func PreparePayloadAttributes(ctx context.Context, cfg *rollup.Config, dl L1Rece ...@@ -74,7 +75,7 @@ func PreparePayloadAttributes(ctx context.Context, cfg *rollup.Config, dl L1Rece
return &eth.PayloadAttributes{ return &eth.PayloadAttributes{
Timestamp: hexutil.Uint64(timestamp), Timestamp: hexutil.Uint64(timestamp),
PrevRandao: eth.Bytes32(l1Info.MixDigest()), PrevRandao: eth.Bytes32(l1Info.MixDigest()),
SuggestedFeeRecipient: cfg.FeeRecipientAddress, SuggestedFeeRecipient: predeploys.SequencerFeeVaultAddr,
Transactions: txs, Transactions: txs,
NoTxPool: true, NoTxPool: true,
}, nil }, nil
......
...@@ -8,6 +8,7 @@ import ( ...@@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/testlog" "github.com/ethereum-optimism/optimism/op-node/testlog"
...@@ -25,7 +26,6 @@ func TestAttributesQueue(t *testing.T) { ...@@ -25,7 +26,6 @@ func TestAttributesQueue(t *testing.T) {
BlockTime: 2, BlockTime: 2,
L1ChainID: big.NewInt(101), L1ChainID: big.NewInt(101),
L2ChainID: big.NewInt(102), L2ChainID: big.NewInt(102),
FeeRecipientAddress: common.Address{0xaa},
DepositContractAddress: common.Address{0xbb}, DepositContractAddress: common.Address{0xbb},
} }
rng := rand.New(rand.NewSource(1234)) rng := rand.New(rand.NewSource(1234))
...@@ -52,7 +52,7 @@ func TestAttributesQueue(t *testing.T) { ...@@ -52,7 +52,7 @@ func TestAttributesQueue(t *testing.T) {
attrs := eth.PayloadAttributes{ attrs := eth.PayloadAttributes{
Timestamp: eth.Uint64Quantity(safeHead.Time + cfg.BlockTime), Timestamp: eth.Uint64Quantity(safeHead.Time + cfg.BlockTime),
PrevRandao: eth.Bytes32(l1Info.InfoMixDigest), PrevRandao: eth.Bytes32(l1Info.InfoMixDigest),
SuggestedFeeRecipient: cfg.FeeRecipientAddress, SuggestedFeeRecipient: predeploys.SequencerFeeVaultAddr,
Transactions: []eth.Data{l1InfoTx, eth.Data("foobar"), eth.Data("example")}, Transactions: []eth.Data{l1InfoTx, eth.Data("foobar"), eth.Data("example")},
NoTxPool: true, NoTxPool: true,
} }
......
...@@ -10,6 +10,7 @@ import ( ...@@ -10,6 +10,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-node/eth" "github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/testutils" "github.com/ethereum-optimism/optimism/op-node/testutils"
...@@ -23,7 +24,6 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -23,7 +24,6 @@ func TestPreparePayloadAttributes(t *testing.T) {
BlockTime: 2, BlockTime: 2,
L1ChainID: big.NewInt(101), L1ChainID: big.NewInt(101),
L2ChainID: big.NewInt(102), L2ChainID: big.NewInt(102),
FeeRecipientAddress: common.Address{0xaa},
DepositContractAddress: common.Address{0xbb}, DepositContractAddress: common.Address{0xbb},
} }
...@@ -99,7 +99,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -99,7 +99,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
require.NotNil(t, attrs) require.NotNil(t, attrs)
require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp)) require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp))
require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao) require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao)
require.Equal(t, cfg.FeeRecipientAddress, attrs.SuggestedFeeRecipient) require.Equal(t, predeploys.SequencerFeeVaultAddr, attrs.SuggestedFeeRecipient)
require.Equal(t, 1, len(attrs.Transactions)) require.Equal(t, 1, len(attrs.Transactions))
require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0])) require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0]))
require.True(t, attrs.NoTxPool) require.True(t, attrs.NoTxPool)
...@@ -136,7 +136,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -136,7 +136,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
require.NotNil(t, attrs) require.NotNil(t, attrs)
require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp)) require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp))
require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao) require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao)
require.Equal(t, cfg.FeeRecipientAddress, attrs.SuggestedFeeRecipient) require.Equal(t, predeploys.SequencerFeeVaultAddr, attrs.SuggestedFeeRecipient)
require.Equal(t, len(l2Txs), len(attrs.Transactions), "Expected txs to equal l1 info tx + user deposit txs") require.Equal(t, len(l2Txs), len(attrs.Transactions), "Expected txs to equal l1 info tx + user deposit txs")
require.Equal(t, l2Txs, attrs.Transactions) require.Equal(t, l2Txs, attrs.Transactions)
require.True(t, attrs.NoTxPool) require.True(t, attrs.NoTxPool)
...@@ -161,7 +161,7 @@ func TestPreparePayloadAttributes(t *testing.T) { ...@@ -161,7 +161,7 @@ func TestPreparePayloadAttributes(t *testing.T) {
require.NotNil(t, attrs) require.NotNil(t, attrs)
require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp)) require.Equal(t, l2Parent.Time+cfg.BlockTime, uint64(attrs.Timestamp))
require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao) require.Equal(t, eth.Bytes32(l1Info.InfoMixDigest), attrs.PrevRandao)
require.Equal(t, cfg.FeeRecipientAddress, attrs.SuggestedFeeRecipient) require.Equal(t, predeploys.SequencerFeeVaultAddr, attrs.SuggestedFeeRecipient)
require.Equal(t, 1, len(attrs.Transactions)) require.Equal(t, 1, len(attrs.Transactions))
require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0])) require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0]))
require.True(t, attrs.NoTxPool) require.True(t, attrs.NoTxPool)
......
...@@ -45,8 +45,6 @@ type Config struct { ...@@ -45,8 +45,6 @@ type Config struct {
// Note: below addresses are part of the block-derivation process, // Note: below addresses are part of the block-derivation process,
// and required to be the same network-wide to stay in consensus. // and required to be the same network-wide to stay in consensus.
// L2 address used to send all priority fees to, also known as the coinbase address in the block.
FeeRecipientAddress common.Address `json:"fee_recipient_address"`
// L1 address that batches are sent to. // L1 address that batches are sent to.
BatchInboxAddress common.Address `json:"batch_inbox_address"` BatchInboxAddress common.Address `json:"batch_inbox_address"`
// Acceptable batch-sender address // Acceptable batch-sender address
...@@ -81,9 +79,6 @@ func (cfg *Config) Check() error { ...@@ -81,9 +79,6 @@ func (cfg *Config) Check() error {
if cfg.P2PSequencerAddress == (common.Address{}) { if cfg.P2PSequencerAddress == (common.Address{}) {
return errors.New("missing p2p sequencer address") return errors.New("missing p2p sequencer address")
} }
if cfg.FeeRecipientAddress == (common.Address{}) {
return errors.New("missing fee recipient address")
}
if cfg.BatchInboxAddress == (common.Address{}) { if cfg.BatchInboxAddress == (common.Address{}) {
return errors.New("missing batch inbox address") return errors.New("missing batch inbox address")
} }
......
...@@ -28,13 +28,12 @@ func randConfig() *Config { ...@@ -28,13 +28,12 @@ func randConfig() *Config {
L2: eth.BlockID{Hash: randHash(), Number: 1337}, L2: eth.BlockID{Hash: randHash(), Number: 1337},
L2Time: uint64(time.Now().Unix()), L2Time: uint64(time.Now().Unix()),
}, },
BlockTime: 2, BlockTime: 2,
MaxSequencerDrift: 100, MaxSequencerDrift: 100,
SeqWindowSize: 2, SeqWindowSize: 2,
L1ChainID: big.NewInt(900), L1ChainID: big.NewInt(900),
FeeRecipientAddress: randAddr(), BatchInboxAddress: randAddr(),
BatchInboxAddress: randAddr(), BatchSenderAddress: randAddr(),
BatchSenderAddress: randAddr(),
} }
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"sequencerWindowSize": 4, "sequencerWindowSize": 4,
"channelTimeout": 40, "channelTimeout": 40,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", "p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"optimismL2FeeRecipient": "0xd9c09e21b57c98e58a80552c170989b426766aa7",
"batchInboxAddress": "0xff00000000000000000000000000000000000000", "batchInboxAddress": "0xff00000000000000000000000000000000000000",
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", "batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"sequencerWindowSize": 120, "sequencerWindowSize": 120,
"channelTimeout": 120, "channelTimeout": 120,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", "p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"optimismL2FeeRecipient": "0x26862c200bd48c19f39d9e1cd88a3b439611d911",
"batchInboxAddress": "0xff00000000000000000000000000000000000002", "batchInboxAddress": "0xff00000000000000000000000000000000000002",
"batchSenderAddress": "0xa11d2b908470e17923fff184d48269bebbd9b2a5", "batchSenderAddress": "0xa11d2b908470e17923fff184d48269bebbd9b2a5",
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
"sequencerWindowSize": 4, "sequencerWindowSize": 4,
"channelTimeout": 40, "channelTimeout": 40,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", "p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"optimismL2FeeRecipient": "0xd9c09e21b57c98e58a80552c170989b426766aa7",
"batchInboxAddress": "0xff00000000000000000000000000000000000000", "batchInboxAddress": "0xff00000000000000000000000000000000000000",
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", "batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
......
...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'L1CrossDomainMessengerImpl', name: 'L1CrossDomainMessenger',
contract: 'L1CrossDomainMessenger',
args: [OptimismPortalProxy.address], args: [OptimismPortalProxy.address],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
...@@ -14,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -14,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'L1StandardBridgeImpl', name: 'L1StandardBridge',
contract: 'L1StandardBridge',
args: [L1CrossDomainMessengerProxy.address], args: [L1CrossDomainMessengerProxy.address],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
...@@ -2,6 +2,8 @@ import assert from 'assert' ...@@ -2,6 +2,8 @@ import assert from 'assert'
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import '@nomiclabs/hardhat-ethers'
import { import {
assertContractVariable, assertContractVariable,
...@@ -26,8 +28,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -26,8 +28,7 @@ const deployFn: DeployFunction = async (hre) => {
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'L2OutputOracleImpl', name: 'L2OutputOracle',
contract: 'L2OutputOracle',
args: [ args: [
hre.deployConfig.l2OutputOracleSubmissionInterval, hre.deployConfig.l2OutputOracleSubmissionInterval,
hre.deployConfig.l2OutputOracleGenesisL2Output, hre.deployConfig.l2OutputOracleGenesisL2Output,
......
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import { import {
assertContractVariable, assertContractVariable,
...@@ -13,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -13,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'OptimismPortalImpl', name: 'OptimismPortal',
contract: 'OptimismPortal',
args: [ args: [
L2OutputOracleProxy.address, L2OutputOracleProxy.address,
hre.deployConfig.finalizationPeriodSeconds, hre.deployConfig.finalizationPeriodSeconds,
......
...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'OptimismMintableERC20FactoryImpl', name: 'OptimismMintableERC20Factory',
contract: 'OptimismMintableERC20Factory',
args: [L1StandardBridgeProxy.address], args: [L1StandardBridgeProxy.address],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
...@@ -14,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -14,8 +14,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'L1ERC721BridgeImpl', name: 'L1ERC721Bridge',
contract: 'L1ERC721Bridge',
args: [L1CrossDomainMessengerProxy.address, predeploys.L2ERC721Bridge], args: [L1CrossDomainMessengerProxy.address, predeploys.L2ERC721Bridge],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -13,8 +13,7 @@ const deployFn: DeployFunction = async (hre) => {
) )
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
name: 'PortalSenderImpl', name: 'PortalSender',
contract: 'PortalSender',
args: [OptimismPortalProxy.address], args: [OptimismPortalProxy.address],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import 'hardhat-deploy'
import { import {
getDeploymentAddress, getDeploymentAddress,
...@@ -46,31 +48,22 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -46,31 +48,22 @@ const deployFn: DeployFunction = async (hre) => {
), ),
}, },
implementationAddressConfig: { implementationAddressConfig: {
l2OutputOracleImpl: await getDeploymentAddress( l2OutputOracleImpl: await getDeploymentAddress(hre, 'L2OutputOracle'),
hre, optimismPortalImpl: await getDeploymentAddress(hre, 'OptimismPortal'),
'L2OutputOracleImpl'
),
optimismPortalImpl: await getDeploymentAddress(
hre,
'OptimismPortalImpl'
),
l1CrossDomainMessengerImpl: await getDeploymentAddress( l1CrossDomainMessengerImpl: await getDeploymentAddress(
hre, hre,
'L1CrossDomainMessengerImpl' 'L1CrossDomainMessenger'
), ),
l1StandardBridgeImpl: await getDeploymentAddress( l1StandardBridgeImpl: await getDeploymentAddress(
hre, hre,
'L1StandardBridgeImpl' 'L1StandardBridge'
), ),
optimismMintableERC20FactoryImpl: await getDeploymentAddress( optimismMintableERC20FactoryImpl: await getDeploymentAddress(
hre, hre,
'OptimismMintableERC20FactoryImpl' 'OptimismMintableERC20Factory'
),
l1ERC721BridgeImpl: await getDeploymentAddress(
hre,
'L1ERC721BridgeImpl'
), ),
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSenderImpl'), l1ERC721BridgeImpl: await getDeploymentAddress(hre, 'L1ERC721Bridge'),
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSender'),
}, },
l2OutputOracleConfig: { l2OutputOracleConfig: {
l2OutputOracleGenesisL2Output: l2OutputOracleGenesisL2Output:
......
import { awaitCondition } from '@eth-optimism/core-utils' import { awaitCondition } from '@eth-optimism/core-utils'
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config'
import 'hardhat-deploy'
import { import {
getDeploymentAddress, getDeploymentAddress,
...@@ -69,31 +71,22 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -69,31 +71,22 @@ const deployFn: DeployFunction = async (hre) => {
), ),
}, },
implementationAddressConfig: { implementationAddressConfig: {
l2OutputOracleImpl: await getDeploymentAddress( l2OutputOracleImpl: await getDeploymentAddress(hre, 'L2OutputOracle'),
hre, optimismPortalImpl: await getDeploymentAddress(hre, 'OptimismPortal'),
'L2OutputOracleImpl'
),
optimismPortalImpl: await getDeploymentAddress(
hre,
'OptimismPortalImpl'
),
l1CrossDomainMessengerImpl: await getDeploymentAddress( l1CrossDomainMessengerImpl: await getDeploymentAddress(
hre, hre,
'L1CrossDomainMessengerImpl' 'L1CrossDomainMessenger'
), ),
l1StandardBridgeImpl: await getDeploymentAddress( l1StandardBridgeImpl: await getDeploymentAddress(
hre, hre,
'L1StandardBridgeImpl' 'L1StandardBridge'
), ),
optimismMintableERC20FactoryImpl: await getDeploymentAddress( optimismMintableERC20FactoryImpl: await getDeploymentAddress(
hre, hre,
'OptimismMintableERC20FactoryImpl' 'OptimismMintableERC20Factory'
),
l1ERC721BridgeImpl: await getDeploymentAddress(
hre,
'L1ERC721BridgeImpl'
), ),
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSenderImpl'), l1ERC721BridgeImpl: await getDeploymentAddress(hre, 'L1ERC721Bridge'),
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSender'),
}, },
l2OutputOracleConfig: { l2OutputOracleConfig: {
l2OutputOracleGenesisL2Output: l2OutputOracleGenesisL2Output:
......
...@@ -133,11 +133,6 @@ const config: HardhatUserConfig = { ...@@ -133,11 +133,6 @@ const config: HardhatUserConfig = {
p2pSequencerAddress: { p2pSequencerAddress: {
type: 'address', type: 'address',
}, },
// L2 address used to send all priority fees to, also known as the coinbase address in the block.
// "fee_recipient_address" in rollup config.
optimismL2FeeRecipient: {
type: 'address',
},
// L1 address that batches are sent to. // L1 address that batches are sent to.
// "batch_inbox_address" in rollup config. // "batch_inbox_address" in rollup config.
batchInboxAddress: { batchInboxAddress: {
......
...@@ -11,7 +11,6 @@ task('rekey', 'Generates a new set of keys for a test network').setAction( ...@@ -11,7 +11,6 @@ task('rekey', 'Generates a new set of keys for a test network').setAction(
'proxyAdminOwner', 'proxyAdminOwner',
'optimismBaseFeeRecipient', 'optimismBaseFeeRecipient',
'optimismL1FeeRecipient', 'optimismL1FeeRecipient',
'optimismL2FeeRecipient',
'p2pSequencerAddress', 'p2pSequencerAddress',
'l2OutputOracleOwner', 'l2OutputOracleOwner',
'batchSenderAddress', 'batchSenderAddress',
......
...@@ -65,7 +65,6 @@ task('rollup-config', 'create a genesis config') ...@@ -65,7 +65,6 @@ task('rollup-config', 'create a genesis config')
l2_chain_id: deployConfig.l2ChainID, l2_chain_id: deployConfig.l2ChainID,
p2p_sequencer_address: deployConfig.p2pSequencerAddress, p2p_sequencer_address: deployConfig.p2pSequencerAddress,
fee_recipient_address: deployConfig.optimismL2FeeRecipient,
batch_inbox_address: deployConfig.batchInboxAddress, batch_inbox_address: deployConfig.batchInboxAddress,
batch_sender_address: deployConfig.batchSenderAddress, batch_sender_address: deployConfig.batchSenderAddress,
deposit_contract_address: portal.address, deposit_contract_address: portal.address,
......
...@@ -17,7 +17,6 @@ export interface OpNodeConfig { ...@@ -17,7 +17,6 @@ export interface OpNodeConfig {
l1_chain_id: number l1_chain_id: number
l2_chain_id: number l2_chain_id: number
p2p_sequencer_address: string p2p_sequencer_address: string
fee_recipient_address: string
batch_inbox_address: string batch_inbox_address: string
batch_sender_address: string batch_sender_address: string
deposit_contract_address: string deposit_contract_address: string
......
...@@ -32,8 +32,10 @@ const deployWETH9 = async ( ...@@ -32,8 +32,10 @@ const deployWETH9 = async (
signer signer
) )
console.log('Sending deployment transaction')
const WETH9 = await Factory__WETH9.deploy() const WETH9 = await Factory__WETH9.deploy()
await WETH9.deployTransaction.wait() const receipt = await WETH9.deployTransaction.wait()
console.log(`WETH9 deployed: ${receipt.transactionHash}`)
if (wrap) { if (wrap) {
const deposit = await signer.sendTransaction({ const deposit = await signer.sendTransaction({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment