From 31b2b04a86ca6cf2d9e0621784bd5d114c588ddd Mon Sep 17 00:00:00 2001 From: Pangsu Date: Thu, 28 Nov 2024 15:27:19 +0900 Subject: [PATCH 01/14] wip: change predeployed contract addresses --- op-node/rollup/derive/attributes.go | 43 +++-- .../derive/kromampt_upgrade_transactions.go | 171 ++++++++++++++++++ op-node/rollup/derive/l1_block_info.go | 117 +++++++++++- op-node/rollup/types.go | 19 ++ 4 files changed, 335 insertions(+), 15 deletions(-) create mode 100644 op-node/rollup/derive/kromampt_upgrade_transactions.go diff --git a/op-node/rollup/derive/attributes.go b/op-node/rollup/derive/attributes.go index 0150ab056..c31f5b008 100644 --- a/op-node/rollup/derive/attributes.go +++ b/op-node/rollup/derive/attributes.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" - "github.com/kroma-network/kroma/kroma-bindings/predeploys" + "github.com/ethereum-optimism/optimism/op-bindings/predeploys" ) // L1ReceiptsFetcher fetches L1 header info and receipts for the payload attributes derivation (the info tx and deposits) @@ -108,6 +108,16 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex } } + // [Kroma: START] + // Include KromaMPT network upgrade transactions in the block before(parent block) of the KromaMPT target block. + if ba.rollupCfg.IsKromaMPTParentBlock(nextL2Time) { + upgradeTxs, err = KromaMPTNetworkUpgradeTransactions() + if err != nil { + return nil, NewCriticalError(fmt.Errorf("failed to build kroma mpt network upgrade txs: %w", err)) + } + } + // [Kroma: END] + l1InfoTx, err := L1InfoDepositBytes(ba.rollupCfg, sysConfig, seqNumber, l1Info, nextL2Time) if err != nil { return nil, NewCriticalError(fmt.Errorf("failed to create l1InfoTx: %w", err)) @@ -119,19 +129,24 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex txs = append(txs, upgradeTxs...) // [Kroma: START] - // In Kroma, the IsSystemTransaction field was deleted from DepositTx. - // After transitioning to MPT, we bring back the IsSystemTransaction field for compatibility with OP. - // Therefore, before MPT time, use KromaDepositTx struct to create deposit transactions without that field. - if !ba.rollupCfg.IsKromaMPT(nextL2Time) { - for i, otx := range txs { - if otx[0] != types.DepositTxType { - continue - } - tx, err := ToKromaDepositBytes(otx) - if err != nil { - return nil, NewCriticalError(fmt.Errorf("failed to convert deposit tx to KromaDepositTx: %w", err)) + suggestedFeeRecipient := common.Address{} + if ba.rollupCfg.IsKromaMPT(nextL2Time) { + suggestedFeeRecipient = predeploys.SequencerFeeVaultAddr + } else { + // In Kroma, the IsSystemTransaction field was deleted from DepositTx. + // After transitioning to MPT, we bring back the IsSystemTransaction field for compatibility with OP. + // Therefore, before MPT time, use KromaDepositTx struct to create deposit transactions without that field. + if !ba.rollupCfg.IsKromaMPT(nextL2Time) { + for i, otx := range txs { + if otx[0] != types.DepositTxType { + continue + } + tx, err := ToKromaDepositBytes(otx) + if err != nil { + return nil, NewCriticalError(err) + } + txs[i] = tx } - txs[i] = tx } } // [Kroma: END] @@ -150,7 +165,7 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex } // [Kroma: START] - suggestedFeeRecipient := common.Address{} + suggestedFeeRecipient = common.Address{} if ba.rollupCfg.IsKromaMPT(nextL2Time) { suggestedFeeRecipient = predeploys.ProtocolVaultAddr } diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions.go b/op-node/rollup/derive/kromampt_upgrade_transactions.go new file mode 100644 index 000000000..3cf9b88e2 --- /dev/null +++ b/op-node/rollup/derive/kromampt_upgrade_transactions.go @@ -0,0 +1,171 @@ +package derive + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + + "github.com/ethereum-optimism/optimism/op-bindings/predeploys" +) + +var ( + KromaMPTDeployerAddress = common.HexToAddress("0x2551000000000000000000000000000000000000") + + newL1BlockMPTAddress = crypto.CreateAddress(KromaMPTDeployerAddress, 0) + newBaseFeeVaultAddress = crypto.CreateAddress(KromaMPTDeployerAddress, 1) + newL1FeeVaultAddress = crypto.CreateAddress(KromaMPTDeployerAddress, 2) + newSequencerFeeVaultAddress = crypto.CreateAddress(KromaMPTDeployerAddress, 3) + + deployBaseFeeVaultSource = UpgradeDepositSource{Intent: "KromaMPT: BaseFee Vault Deployment"} + updateBaseFeeVaultProxySource = UpgradeDepositSource{Intent: "KromaMPT: BaseFee Vault Proxy Update"} + deployL1FeeVaultSource = UpgradeDepositSource{Intent: "KromaMPT: L1 Fee Vault Deployment"} + updateL1FeeVaultProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Fee Vault Proxy Update"} + deploySequencerFeeVaultSource = UpgradeDepositSource{Intent: "KromaMPT: Sequencer Fee Vault Deployment"} + updateSequencerFeeVaultProxySource = UpgradeDepositSource{Intent: "KromaMPT: Sequencer Fee Vault Proxy Update"} + + deployL1BlockMPTSource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Deployment"} + updateL1BlockMPTProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Proxy Update"} + l1BlockMPTDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b5061053e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638381f58a11610097578063c598591811610066578063c598591814610229578063e591b28214610249578063e81b2c6d14610289578063f82061401461029257600080fd5b80638381f58a146101e35780638b239f73146101f75780639e8c496614610200578063b80777ea1461020957600080fd5b806354fd4d50116100d357806354fd4d50146101335780635cf249691461017c57806364ca23ef1461018557806368d5dca6146101b257600080fd5b8063015d8eb9146100fa57806309bd5a601461010f578063440a5e201461012b575b600080fd5b61010d61010836600461044c565b61029b565b005b61011860025481565b6040519081526020015b60405180910390f35b61010d6103da565b61016f6040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161012291906104be565b61011860015481565b6003546101999067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610122565b6003546101ce9068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610122565b6000546101999067ffffffffffffffff1681565b61011860055481565b61011860065481565b6000546101999068010000000000000000900467ffffffffffffffff1681565b6003546101ce906c01000000000000000000000000900463ffffffff1681565b61026473deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610122565b61011860045481565b61011860075481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead000114610342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c7565730000000000606482015260840160405180910390fd5b6000805467ffffffffffffffff98891668010000000000000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116998916999099179890981790975560019490945560029290925560038054919094167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009190911617909255600491909155600555600655565b3373deaddeaddeaddeaddeaddeaddeaddeaddead00011461040357633cc50b456000526004601cfd5b60043560801c60035560143560801c600055602435600155604435600755606435600255608435600455565b803567ffffffffffffffff8116811461044757600080fd5b919050565b600080600080600080600080610100898b03121561046957600080fd5b6104728961042f565b975061048060208a0161042f565b9650604089013595506060890135945061049c60808a0161042f565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600060208083528351808285015260005b818110156104eb578581018301518582016040015282016104cf565b818111156104fd576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea164736f6c634300080f000a") + feeVaultDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b5061053e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638381f58a11610097578063c598591811610066578063c598591814610229578063e591b28214610249578063e81b2c6d14610289578063f82061401461029257600080fd5b80638381f58a146101e35780638b239f73146101f75780639e8c496614610200578063b80777ea1461020957600080fd5b806354fd4d50116100d357806354fd4d50146101335780635cf249691461017c57806364ca23ef1461018557806368d5dca6146101b257600080fd5b8063015d8eb9146100fa57806309bd5a601461010f578063440a5e201461012b575b600080fd5b61010d61010836600461044c565b61029b565b005b61011860025481565b6040519081526020015b60405180910390f35b61010d6103da565b61016f6040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161012291906104be565b61011860015481565b6003546101999067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610122565b6003546101ce9068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610122565b6000546101999067ffffffffffffffff1681565b61011860055481565b61011860065481565b6000546101999068010000000000000000900467ffffffffffffffff1681565b6003546101ce906c01000000000000000000000000900463ffffffff1681565b61026473deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610122565b61011860045481565b61011860075481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead000114610342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c7565730000000000606482015260840160405180910390fd5b6000805467ffffffffffffffff98891668010000000000000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116998916999099179890981790975560019490945560029290925560038054919094167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009190911617909255600491909155600555600655565b3373deaddeaddeaddeaddeaddeaddeaddeaddead00011461040357633cc50b456000526004601cfd5b60043560801c60035560143560801c600055602435600155604435600755606435600255608435600455565b803567ffffffffffffffff8116811461044757600080fd5b919050565b600080600080600080600080610100898b03121561046957600080fd5b6104728961042f565b975061048060208a0161042f565b9650604089013595506060890135945061049c60808a0161042f565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600060208083528351808285015260005b818110156104eb578581018301518582016040015282016104cf565b818111156104fd576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea164736f6c634300080f000a") +) + +// init overrides variables defined in the Ecotone upgrade. +func init() { +} + +func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { + upgradeTxns := make([]hexutil.Bytes, 0, 8) + + deployL1BlockTransaction, err := types.NewTx(&types.DepositTx{ + SourceHash: deployL1BlockMPTSource.SourceHash(), + From: L1BlockDeployerAddress, + To: nil, + Mint: big.NewInt(0), + Value: big.NewInt(0), + Gas: 375_000, + IsSystemTransaction: false, + Data: l1BlockMPTDeploymentBytecode, + }).MarshalBinary() + + if err != nil { + return nil, err + } + + upgradeTxns = append(upgradeTxns, deployL1BlockTransaction) + + deployBaseFeeVault, err := types.NewTx(&types.DepositTx{ + SourceHash: deployBaseFeeVaultSource.SourceHash(), + From: KromaMPTDeployerAddress, + To: nil, + Mint: big.NewInt(0), + Value: big.NewInt(0), + Gas: 1_000_000, + IsSystemTransaction: false, + Data: feeVaultDeploymentBytecode, + }).MarshalBinary() + + upgradeTxns = append(upgradeTxns, deployBaseFeeVault) + + deployL1FeeVault, err := types.NewTx(&types.DepositTx{ + SourceHash: deployL1FeeVaultSource.SourceHash(), + From: KromaMPTDeployerAddress, + To: nil, + Mint: big.NewInt(0), + Value: big.NewInt(0), + Gas: 1_000_000, + IsSystemTransaction: false, + Data: feeVaultDeploymentBytecode, + }).MarshalBinary() + + upgradeTxns = append(upgradeTxns, deployL1FeeVault) + + deploySequencerFeeVault, err := types.NewTx(&types.DepositTx{ + SourceHash: deploySequencerFeeVaultSource.SourceHash(), + From: KromaMPTDeployerAddress, + To: nil, + Mint: big.NewInt(0), + Value: big.NewInt(0), + Gas: 1_000_000, + IsSystemTransaction: false, + Data: feeVaultDeploymentBytecode, + }).MarshalBinary() + + if err != nil { + return nil, err + } + + upgradeTxns = append(upgradeTxns, deploySequencerFeeVault) + + updateL1BlockProxy, err := types.NewTx(&types.DepositTx{ + SourceHash: updateL1BlockMPTProxySource.SourceHash(), + From: common.Address{}, + To: &predeploys.L1BlockAddr, + Mint: big.NewInt(0), + Value: big.NewInt(0), + Gas: 50_000, + IsSystemTransaction: false, + Data: upgradeToCalldata(newL1BlockMPTAddress), + }).MarshalBinary() + + if err != nil { + return nil, err + } + + upgradeTxns = append(upgradeTxns, updateL1BlockProxy) + + updateBaseFeeVaultProxy, err := types.NewTx(&types.DepositTx{ + SourceHash: updateBaseFeeVaultProxySource.SourceHash(), + From: common.Address{}, + To: &predeploys.BaseFeeVaultAddr, + Mint: big.NewInt(0), + Value: big.NewInt(0), + Gas: 50_000, + IsSystemTransaction: false, + Data: upgradeToCalldata(newBaseFeeVaultAddress), + }).MarshalBinary() + + if err != nil { + return nil, err + } + + upgradeTxns = append(upgradeTxns, updateBaseFeeVaultProxy) + + updateL1FeeVaultProxy, err := types.NewTx(&types.DepositTx{ + SourceHash: updateL1FeeVaultProxySource.SourceHash(), + From: common.Address{}, + To: &predeploys.L1FeeVaultAddr, + Mint: big.NewInt(0), + Value: big.NewInt(0), + Gas: 50_000, + IsSystemTransaction: false, + Data: upgradeToCalldata(newL1FeeVaultAddress), + }).MarshalBinary() + + if err != nil { + return nil, err + } + + upgradeTxns = append(upgradeTxns, updateL1FeeVaultProxy) + + updateSequencerFeeVaultProxy, err := types.NewTx(&types.DepositTx{ + SourceHash: updateSequencerFeeVaultProxySource.SourceHash(), + From: common.Address{}, + To: &predeploys.SequencerFeeVaultAddr, + Mint: big.NewInt(0), + Value: big.NewInt(0), + Gas: 50_000, + IsSystemTransaction: false, + Data: upgradeToCalldata(newSequencerFeeVaultAddress), + }).MarshalBinary() + + if err != nil { + return nil, err + } + + upgradeTxns = append(upgradeTxns, updateSequencerFeeVaultProxy) + + return upgradeTxns, nil +} diff --git a/op-node/rollup/derive/l1_block_info.go b/op-node/rollup/derive/l1_block_info.go index 3f098e930..8edb5846b 100644 --- a/op-node/rollup/derive/l1_block_info.go +++ b/op-node/rollup/derive/l1_block_info.go @@ -11,10 +11,11 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum-optimism/optimism/kroma-bindings/predeploys" + oppredeploys "github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" "github.com/ethereum-optimism/optimism/op-service/solabi" - "github.com/kroma-network/kroma/kroma-bindings/predeploys" ) const ( @@ -23,6 +24,7 @@ const ( L1InfoArguments = 9 L1InfoBedrockLen = 4 + 32*L1InfoArguments L1InfoEcotoneLen = 4 + 32*6 // after Ecotone upgrade, args are packed into 6 32-byte slots + L1InfoKromaMPTLen = 4 + 32*5 // after KromaMPT upgrade, args are packed into 6 32-byte slots ) var ( @@ -261,6 +263,106 @@ func (info *L1BlockInfo) unmarshalBinaryEcotone(data []byte) error { return nil } +// KromaMPT Binary Format +// +---------+--------------------------+ +// | Bytes | Field | +// +---------+--------------------------+ +// | 4 | Function signature | +// | 4 | BaseFeeScalar | +// | 4 | BlobBaseFeeScalar | +// | 8 | SequenceNumber | +// | 8 | Timestamp | +// | 8 | L1BlockNumber | +// | 32 | BaseFee | +// | 32 | BlobBaseFee | +// | 32 | BlockHash | +// | 32 | BatcherHash | +// +---------+--------------------------+ + +func (info *L1BlockInfo) marshalBinaryKromaMPT() ([]byte, error) { + w := bytes.NewBuffer(make([]byte, 0, L1InfoKromaMPTLen)) + if err := solabi.WriteSignature(w, L1InfoFuncEcotoneBytes4); err != nil { + return nil, err + } + if err := binary.Write(w, binary.BigEndian, info.BaseFeeScalar); err != nil { + return nil, err + } + if err := binary.Write(w, binary.BigEndian, info.BlobBaseFeeScalar); err != nil { + return nil, err + } + if err := binary.Write(w, binary.BigEndian, info.SequenceNumber); err != nil { + return nil, err + } + if err := binary.Write(w, binary.BigEndian, info.Time); err != nil { + return nil, err + } + if err := binary.Write(w, binary.BigEndian, info.Number); err != nil { + return nil, err + } + if err := solabi.WriteUint256(w, info.BaseFee); err != nil { + return nil, err + } + blobBasefee := info.BlobBaseFee + if blobBasefee == nil { + blobBasefee = big.NewInt(1) // set to 1, to match the min blob basefee as defined in EIP-4844 + } + if err := solabi.WriteUint256(w, blobBasefee); err != nil { + return nil, err + } + if err := solabi.WriteHash(w, info.BlockHash); err != nil { + return nil, err + } + // ABI encoding will perform the left-padding with zeroes to 32 bytes, matching the "batcherHash" SystemConfig format and version 0 byte. + if err := solabi.WriteAddress(w, info.BatcherAddr); err != nil { + return nil, err + } + return w.Bytes(), nil +} + +func (info *L1BlockInfo) unmarshalBinaryKromaMPT(data []byte) error { + if len(data) != L1InfoKromaMPTLen { + return fmt.Errorf("data is unexpected length: %d", len(data)) + } + r := bytes.NewReader(data) + + var err error + if _, err := solabi.ReadAndValidateSignature(r, L1InfoFuncEcotoneBytes4); err != nil { + return err + } + if err := binary.Read(r, binary.BigEndian, &info.BaseFeeScalar); err != nil { + return fmt.Errorf("invalid ecotone l1 block info format") + } + if err := binary.Read(r, binary.BigEndian, &info.BlobBaseFeeScalar); err != nil { + return fmt.Errorf("invalid ecotone l1 block info format") + } + if err := binary.Read(r, binary.BigEndian, &info.SequenceNumber); err != nil { + return fmt.Errorf("invalid ecotone l1 block info format") + } + if err := binary.Read(r, binary.BigEndian, &info.Time); err != nil { + return fmt.Errorf("invalid ecotone l1 block info format") + } + if err := binary.Read(r, binary.BigEndian, &info.Number); err != nil { + return fmt.Errorf("invalid ecotone l1 block info format") + } + if info.BaseFee, err = solabi.ReadUint256(r); err != nil { + return err + } + if info.BlobBaseFee, err = solabi.ReadUint256(r); err != nil { + return err + } + if info.BlockHash, err = solabi.ReadHash(r); err != nil { + return err + } + // The "batcherHash" will be correctly parsed as address, since the version 0 and left-padding matches the ABI encoding format. + if info.BatcherAddr, err = solabi.ReadAddress(r); err != nil { + return err + } + if !solabi.EmptyReader(r) { + return errors.New("too many bytes") + } + return nil +} + // isEcotoneButNotFirstBlock returns whether the specified block is subject to the Ecotone upgrade, // but is not the actiation block itself. func isEcotoneButNotFirstBlock(rollupCfg *rollup.Config, l2BlockTime uint64) bool { @@ -270,6 +372,9 @@ func isEcotoneButNotFirstBlock(rollupCfg *rollup.Config, l2BlockTime uint64) boo // L1BlockInfoFromBytes is the inverse of L1InfoDeposit, to see where the L2 chain is derived from func L1BlockInfoFromBytes(rollupCfg *rollup.Config, l2BlockTime uint64, data []byte) (*L1BlockInfo, error) { var info L1BlockInfo + if rollupCfg.IsKromaMPT(l2BlockTime) { + return &info, info.unmarshalBinaryKromaMPT(data) + } if isEcotoneButNotFirstBlock(rollupCfg, l2BlockTime) { return &info, info.unmarshalBinaryEcotone(data) } @@ -302,6 +407,9 @@ func L1InfoDeposit(rollupCfg *rollup.Config, sysCfg eth.SystemConfig, seqNumber l1BlockInfo.BaseFeeScalar = baseFeeScalar l1BlockInfo.ValidatorRewardScalar = sysCfg.ValidatorRewardScalar out, err := l1BlockInfo.marshalBinaryEcotone() + if rollupCfg.IsKromaMPT(l2BlockTime) { + out, err = l1BlockInfo.marshalBinaryKromaMPT() + } if err != nil { return nil, fmt.Errorf("failed to marshal Ecotone l1 block info: %w", err) } @@ -321,6 +429,13 @@ func L1InfoDeposit(rollupCfg *rollup.Config, sysCfg eth.SystemConfig, seqNumber L1BlockHash: block.Hash(), SeqNumber: seqNumber, } + + // [Kroma: START] + if rollupCfg.IsKromaMPT(l2BlockTime) { + L1BlockAddress = oppredeploys.L1BlockAddr + } + // [Kroma: END] + // Set a very large gas limit with `IsSystemTransaction` to ensure // that the L1 Attributes Transaction does not run out of gas. out := &types.DepositTx{ diff --git a/op-node/rollup/types.go b/op-node/rollup/types.go index 5ef287140..b3c93bed8 100644 --- a/op-node/rollup/types.go +++ b/op-node/rollup/types.go @@ -381,6 +381,25 @@ func (c *Config) IsInterop(timestamp uint64) bool { return c.InteropTime != nil && timestamp >= *c.InteropTime } +// IsEcotoneActivationBlock returns whether the specified block is the first block subject to the +// KromaMPT upgrade. KromaMPT activation at genesis does not count. +func (c *Config) IsKromaMPTActivationBlock(l2BlockTime uint64) bool { + return c.IsKromaMPT(l2BlockTime) && + l2BlockTime >= c.BlockTime && + !c.IsKromaMPT(l2BlockTime-c.BlockTime) +} + +// IsKromaMPTParentBlock returns whether the specified block is the parent block subject to the +// KromaMPT upgrade. +func (c *Config) IsKromaMPTParentBlock(l2BlockTime uint64) bool { + if c.KromaMPTTime == nil { + return false + } + return l2BlockTime == *c.KromaMPTTime-c.BlockTime +} + +// [Kroma: END] + // ForkchoiceUpdatedVersion returns the EngineAPIMethod suitable for the chain hard fork version. func (c *Config) ForkchoiceUpdatedVersion(attr *eth.PayloadAttributes) eth.EngineAPIMethod { if attr == nil { From 16b9f2a093e67c10fcf08f4bdc0861d587e8a8a0 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Wed, 4 Dec 2024 06:56:58 +0900 Subject: [PATCH 02/14] chore: adjust changes --- op-batcher/batcher/channel_manager_test.go | 2 +- op-node/rollup/derive/attributes.go | 9 +------ .../derive/kromampt_upgrade_transactions.go | 2 +- op-node/rollup/derive/test/random.go | 27 +++++++++++++++++++ 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/op-batcher/batcher/channel_manager_test.go b/op-batcher/batcher/channel_manager_test.go index a3a638090..75ee82ca6 100644 --- a/op-batcher/batcher/channel_manager_test.go +++ b/op-batcher/batcher/channel_manager_test.go @@ -504,7 +504,7 @@ func TestChannelManager_Close_BeforeMPTBlock(t *testing.T) { numTx := 1 zktBlock1 := derivetest.RandomL2BlockWithChainId(rng, numTx, defaultTestRollupConfig.L2ChainID) zktBlock2 := derivetest.RandomL2BlockWithChainId(rng, numTx, defaultTestRollupConfig.L2ChainID) - mptBlock := derivetest.RandomL2BlockWithChainId(rng, numTx, defaultTestRollupConfig.L2ChainID) + mptBlock := derivetest.RandomL2MPTBlockWithChainId(rng, numTx, defaultTestRollupConfig.L2ChainID) h := zktBlock1.Header() h.Time = kromaMPTTime - rollupConfig.BlockTime*2 diff --git a/op-node/rollup/derive/attributes.go b/op-node/rollup/derive/attributes.go index c31f5b008..9642a6c5b 100644 --- a/op-node/rollup/derive/attributes.go +++ b/op-node/rollup/derive/attributes.go @@ -8,9 +8,9 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" - "github.com/ethereum-optimism/optimism/op-bindings/predeploys" ) // L1ReceiptsFetcher fetches L1 header info and receipts for the payload attributes derivation (the info tx and deposits) @@ -164,13 +164,6 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex } } - // [Kroma: START] - suggestedFeeRecipient = common.Address{} - if ba.rollupCfg.IsKromaMPT(nextL2Time) { - suggestedFeeRecipient = predeploys.ProtocolVaultAddr - } - // [Kroma: END] - return ð.PayloadAttributes{ Timestamp: hexutil.Uint64(nextL2Time), PrevRandao: eth.Bytes32(l1Info.MixDigest()), diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions.go b/op-node/rollup/derive/kromampt_upgrade_transactions.go index 3cf9b88e2..c18091df5 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions.go @@ -32,7 +32,7 @@ var ( feeVaultDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b5061053e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638381f58a11610097578063c598591811610066578063c598591814610229578063e591b28214610249578063e81b2c6d14610289578063f82061401461029257600080fd5b80638381f58a146101e35780638b239f73146101f75780639e8c496614610200578063b80777ea1461020957600080fd5b806354fd4d50116100d357806354fd4d50146101335780635cf249691461017c57806364ca23ef1461018557806368d5dca6146101b257600080fd5b8063015d8eb9146100fa57806309bd5a601461010f578063440a5e201461012b575b600080fd5b61010d61010836600461044c565b61029b565b005b61011860025481565b6040519081526020015b60405180910390f35b61010d6103da565b61016f6040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161012291906104be565b61011860015481565b6003546101999067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610122565b6003546101ce9068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610122565b6000546101999067ffffffffffffffff1681565b61011860055481565b61011860065481565b6000546101999068010000000000000000900467ffffffffffffffff1681565b6003546101ce906c01000000000000000000000000900463ffffffff1681565b61026473deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610122565b61011860045481565b61011860075481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead000114610342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c7565730000000000606482015260840160405180910390fd5b6000805467ffffffffffffffff98891668010000000000000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116998916999099179890981790975560019490945560029290925560038054919094167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009190911617909255600491909155600555600655565b3373deaddeaddeaddeaddeaddeaddeaddeaddead00011461040357633cc50b456000526004601cfd5b60043560801c60035560143560801c600055602435600155604435600755606435600255608435600455565b803567ffffffffffffffff8116811461044757600080fd5b919050565b600080600080600080600080610100898b03121561046957600080fd5b6104728961042f565b975061048060208a0161042f565b9650604089013595506060890135945061049c60808a0161042f565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600060208083528351808285015260005b818110156104eb578581018301518582016040015282016104cf565b818111156104fd576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea164736f6c634300080f000a") ) -// init overrides variables defined in the Ecotone upgrade. +// init overrides variables defined in the Kroma MPT upgrade. func init() { } diff --git a/op-node/rollup/derive/test/random.go b/op-node/rollup/derive/test/random.go index c0f512b49..46962078e 100644 --- a/op-node/rollup/derive/test/random.go +++ b/op-node/rollup/derive/test/random.go @@ -29,6 +29,23 @@ func RandomL2Block(rng *rand.Rand, txCount int) (*types.Block, []*types.Receipt) return testutils.RandomBlockPrependTxs(rng, txCount, types.NewTx(l1InfoTx)) } +// RandomMPTL2Block returns a random block whose first transaction is a random post-MPT upgrade +// L1 Info Deposit transaction. +func RandomMPTL2Block(rng *rand.Rand, txCount int) (*types.Block, []*types.Receipt) { + l1Block := types.NewBlock(testutils.RandomHeader(rng), + nil, nil, nil, trie.NewStackTrie(nil)) + rollupCfg := rollup.Config{} + t := uint64(0) + rollupCfg.EcotoneTime = &t + rollupCfg.KromaMPTTime = &t + + l1InfoTx, err := derive.L1InfoDeposit(&rollupCfg, eth.SystemConfig{}, 0, eth.BlockToInfo(l1Block), 0) + if err != nil { + panic("L1InfoDeposit: " + err.Error()) + } + return testutils.RandomBlockPrependTxs(rng, txCount, types.NewTx(l1InfoTx)) +} + func RandomL2BlockWithChainId(rng *rand.Rand, txCount int, chainId *big.Int) *types.Block { signer := types.NewLondonSigner(chainId) block, _ := RandomL2Block(rng, 0) @@ -38,3 +55,13 @@ func RandomL2BlockWithChainId(rng *rand.Rand, txCount int, chainId *big.Int) *ty } return block.WithBody(txs, nil) } + +func RandomL2MPTBlockWithChainId(rng *rand.Rand, txCount int, chainId *big.Int) *types.Block { + signer := types.NewLondonSigner(chainId) + block, _ := RandomMPTL2Block(rng, 0) + txs := []*types.Transaction{block.Transactions()[0]} // L1 info deposit TX + for i := 0; i < txCount; i++ { + txs = append(txs, testutils.RandomTx(rng, big.NewInt(int64(rng.Uint32())), signer)) + } + return block.WithBody(txs, nil) +} From 36a95442c68e2558c3ca81f0dda4a40213e1a763 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Wed, 4 Dec 2024 06:57:46 +0900 Subject: [PATCH 03/14] feat: add test for kromaMPT upgrade --- kroma-bindings/predeploys/addresses_test.go | 3 +- op-node/rollup/derive/attributes.go | 3 +- .../rollup/derive/attributes_queue_test.go | 33 ++++- .../kromampt_upgrade_transactions_test.go | 119 ++++++++++++++++++ op-node/rollup/derive/span_channel_out.go | 1 + 5 files changed, 152 insertions(+), 7 deletions(-) create mode 100644 op-node/rollup/derive/kromampt_upgrade_transactions_test.go diff --git a/kroma-bindings/predeploys/addresses_test.go b/kroma-bindings/predeploys/addresses_test.go index 6ea6ce887..f97f1ec26 100644 --- a/kroma-bindings/predeploys/addresses_test.go +++ b/kroma-bindings/predeploys/addresses_test.go @@ -9,12 +9,13 @@ import ( "github.com/stretchr/testify/require" "github.com/kroma-network/kroma/kroma-bindings/bindings" + "github.com/kroma-network/kroma/op-bindings/predeploys" ) func TestGethAddresses(t *testing.T) { // We test if the addresses in geth match those in op-bindings, to avoid an import-cycle: // we import geth in the monorepo, and do not want to import kroma-bindings into geth. - require.Equal(t, L1BlockAddr, types.L1BlockAddr) + require.Equal(t, predeploys.L1BlockAddr, types.L1BlockAddr) } func uintToHash(v uint) common.Hash { diff --git a/op-node/rollup/derive/attributes.go b/op-node/rollup/derive/attributes.go index 9642a6c5b..806378979 100644 --- a/op-node/rollup/derive/attributes.go +++ b/op-node/rollup/derive/attributes.go @@ -111,10 +111,11 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex // [Kroma: START] // Include KromaMPT network upgrade transactions in the block before(parent block) of the KromaMPT target block. if ba.rollupCfg.IsKromaMPTParentBlock(nextL2Time) { - upgradeTxs, err = KromaMPTNetworkUpgradeTransactions() + kromaMPT, err := KromaMPTNetworkUpgradeTransactions() if err != nil { return nil, NewCriticalError(fmt.Errorf("failed to build kroma mpt network upgrade txs: %w", err)) } + upgradeTxs = append(upgradeTxs, kromaMPT...) } // [Kroma: END] diff --git a/op-node/rollup/derive/attributes_queue_test.go b/op-node/rollup/derive/attributes_queue_test.go index c742d9835..487f788ae 100644 --- a/op-node/rollup/derive/attributes_queue_test.go +++ b/op-node/rollup/derive/attributes_queue_test.go @@ -11,11 +11,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" "github.com/ethereum-optimism/optimism/op-service/testlog" "github.com/ethereum-optimism/optimism/op-service/testutils" - "github.com/kroma-network/kroma/kroma-bindings/predeploys" ) // TestAttributesQueue checks that it properly uses the PreparePayloadAttributes function @@ -59,6 +59,12 @@ func TestAttributesQueue(t *testing.T) { GasLimit: 1234, ValidatorRewardScalar: [32]byte{}, } + expectedMPTL1Cfg := eth.SystemConfig{ + BatcherAddr: common.Address{42}, + Overhead: [32]byte{}, + Scalar: [32]byte{}, + GasLimit: 1234, + } testAttributes := func(l1InfoTx []byte, suggestedFeeRecipient common.Address) { l1Fetcher := &testutils.MockL1Source{} @@ -67,10 +73,17 @@ func TestAttributesQueue(t *testing.T) { l2Fetcher := &testutils.MockL2Client{} l2Fetcher.ExpectSystemConfigByL2Hash(safeHead.Hash, parentL1Cfg, nil) + parentBeaconRoot := l1Info.ParentBeaconRoot() + if cfg.IsEcotone(0) { + if parentBeaconRoot == nil { // default to zero hash if there is no beacon-block-root available + parentBeaconRoot = new(common.Hash) + } + } attrs := eth.PayloadAttributes{ Timestamp: eth.Uint64Quantity(safeHead.Time + cfg.BlockTime), PrevRandao: eth.Bytes32(l1Info.InfoMixDigest), SuggestedFeeRecipient: suggestedFeeRecipient, + ParentBeaconBlockRoot: parentBeaconRoot, Transactions: []eth.Data{l1InfoTx, eth.Data("foobar"), eth.Data("example")}, NoTxPool: true, GasLimit: (*eth.Uint64Quantity)(&expectedL1Cfg.GasLimit), @@ -82,11 +95,17 @@ func TestAttributesQueue(t *testing.T) { actual, err := aq.createNextAttributes(context.Background(), &batch, safeHead) require.NoError(t, err) - require.Equal(t, attrs, *actual) + require.Equal(t, attrs, *actual, "Expected %v but got %v", attrs, actual) } t.Run("before kroma mpt time", func(st *testing.T) { - rollupCfg := rollup.Config{} + zero := uint64(0) + cfg.RegolithTime = &zero + cfg.EcotoneTime = &zero + rollupCfg := rollup.Config{ + RegolithTime: &zero, + EcotoneTime: &zero, + } l1InfoTx, err := L1InfoDepositBytes(&rollupCfg, expectedL1Cfg, safeHead.SequenceNumber+1, l1Info, 0) require.NoError(st, err) @@ -98,11 +117,15 @@ func TestAttributesQueue(t *testing.T) { t.Run("after kroma mpt time", func(st *testing.T) { zero := uint64(0) cfg.KromaMPTTime = &zero + cfg.RegolithTime = &zero + cfg.EcotoneTime = &zero rollupCfg := rollup.Config{ + RegolithTime: &zero, + EcotoneTime: &zero, KromaMPTTime: &zero, } - l1InfoTx, err := L1InfoDepositBytes(&rollupCfg, expectedL1Cfg, safeHead.SequenceNumber+1, l1Info, 0) + l1InfoTx, err := L1InfoDepositBytes(&rollupCfg, expectedMPTL1Cfg, safeHead.SequenceNumber+1, l1Info, 0) require.NoError(st, err) - testAttributes(l1InfoTx, predeploys.ProtocolVaultAddr) + testAttributes(l1InfoTx, predeploys.SequencerFeeVaultAddr) }) } diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go new file mode 100644 index 000000000..48f78841d --- /dev/null +++ b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go @@ -0,0 +1,119 @@ +package derive + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/ethereum-optimism/optimism/op-bindings/predeploys" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" +) + +func TestMPTSourcesMatchSpec(t *testing.T) { + for _, test := range []struct { + source UpgradeDepositSource + expectedHash string + }{ + { + source: deployBaseFeeVaultSource, + expectedHash: "0xdd882729c9833d55eb4ad39f08f578c0b92e171234e1b4ddc8f91d7878cd8686", + }, + { + source: updateBaseFeeVaultProxySource, + expectedHash: "0x747e2dc0ea5ed790a8746601b59c7588bfdce93e5d4dc0f6fd92a4d32c07596d", + }, + { + source: deployL1FeeVaultSource, + expectedHash: "0xb88c42fa962a1aa3d495761f85b93fd496a9607b57ffda85a1e3840b0d854794", + }, + { + source: updateL1FeeVaultProxySource, + expectedHash: "0xd4b39da88babd8b9c3d96bfc88b2c4be2a977c3b2629d0f2498fc290e1c523be", + }, + { + source: deploySequencerFeeVaultSource, + expectedHash: "0x4618df4b1692fcaee1da6b0532641b361f5dbfc3bb5714ae22802f989dc59c6f", + }, + { + source: updateSequencerFeeVaultProxySource, + expectedHash: "0xaf7e0d5c4b92ad5918fe238414031d8a82b87841ed70f1ba247d50121f9c04eb", + }, + { + source: deployL1BlockMPTSource, + expectedHash: "0x3c459db0fc6553f1b48a3b7f1e20de2e80d7f28976085817070699d1502dbe74", + }, + { + source: updateL1BlockMPTProxySource, + expectedHash: "0xb3a45c33c31a2322c4c4db99788dcae68606b98e4c90ea9fb3d1bc93ddfbf3bf", + }, + } { + require.Equal(t, common.HexToHash(test.expectedHash), test.source.SourceHash()) + } +} + +func TestMPTNetworkTransactions(t *testing.T) { + upgradeTxns, err := KromaMPTNetworkUpgradeTransactions() + require.NoError(t, err) + require.Len(t, upgradeTxns, 8) + + deployL1BlockSender, deployL1Block := toDepositTxn(t, upgradeTxns[0]) + require.Equal(t, deployL1BlockSender, L1BlockDeployerAddress) + require.Equal(t, deployL1BlockMPTSource.SourceHash(), deployL1Block.SourceHash()) + require.Nil(t, deployL1Block.To()) + require.Equal(t, uint64(375_000), deployL1Block.Gas()) + require.Equal(t, hexutil.Bytes(l1BlockMPTDeploymentBytecode).String(), hexutil.Bytes(deployL1Block.Data()).String()) + + deployBaseFeeVaultSender, deployBaseFeeVault := toDepositTxn(t, upgradeTxns[1]) + require.Equal(t, deployBaseFeeVaultSender, KromaMPTDeployerAddress) + require.Equal(t, deployBaseFeeVaultSource.SourceHash(), deployBaseFeeVault.SourceHash()) + require.Nil(t, deployBaseFeeVault.To()) + require.Equal(t, uint64(1_000_000), deployBaseFeeVault.Gas()) + require.Equal(t, hexutil.Bytes(feeVaultDeploymentBytecode).String(), hexutil.Bytes(deployBaseFeeVault.Data()).String()) + + deployL1FeeVaultSender, deployL1FeeVault := toDepositTxn(t, upgradeTxns[2]) + require.Equal(t, deployL1FeeVaultSender, KromaMPTDeployerAddress) + require.Equal(t, deployL1FeeVaultSource.SourceHash(), deployL1FeeVault.SourceHash()) + require.Nil(t, deployL1FeeVault.To()) + require.Equal(t, uint64(1_000_000), deployL1FeeVault.Gas()) + require.Equal(t, hexutil.Bytes(feeVaultDeploymentBytecode).String(), hexutil.Bytes(deployL1FeeVault.Data()).String()) + + deployL1FeeVaultSender, deploySequencerFeeVault := toDepositTxn(t, upgradeTxns[3]) + require.Equal(t, deployL1FeeVaultSender, KromaMPTDeployerAddress) + require.Equal(t, deploySequencerFeeVaultSource.SourceHash(), deploySequencerFeeVault.SourceHash()) + require.Nil(t, deploySequencerFeeVault.To()) + require.Equal(t, uint64(1_000_000), deploySequencerFeeVault.Gas()) + require.Equal(t, hexutil.Bytes(feeVaultDeploymentBytecode).String(), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) + + updateL1BlockProxySender, updateL1BlockProxy := toDepositTxn(t, upgradeTxns[4]) + require.Equal(t, updateL1BlockProxySender, common.Address{}) + require.Equal(t, updateL1BlockMPTProxySource.SourceHash(), updateL1BlockProxy.SourceHash()) + require.NotNil(t, updateL1BlockProxy.To()) + require.Equal(t, *updateL1BlockProxy.To(), predeploys.L1BlockAddr) + require.Equal(t, uint64(50_000), updateL1BlockProxy.Gas()) + require.Equal(t, common.FromHex("0x3659cfe6000000000000000000000000cd7467a8926d13f8b41ea035ff3761326c822bad"), updateL1BlockProxy.Data()) + + updateBaseFeeVaultProxySender, updateBaseFeeVaultProxy := toDepositTxn(t, upgradeTxns[5]) + require.Equal(t, updateBaseFeeVaultProxySender, common.Address{}) + require.Equal(t, updateBaseFeeVaultProxySource.SourceHash(), updateBaseFeeVaultProxy.SourceHash()) + require.NotNil(t, updateBaseFeeVaultProxy.To()) + require.Equal(t, *updateBaseFeeVaultProxy.To(), predeploys.BaseFeeVaultAddr) + require.Equal(t, uint64(50_000), updateBaseFeeVaultProxy.Gas()) + require.Equal(t, common.FromHex("0x3659cfe60000000000000000000000008ab182eaa3d481ee66d13727c82c37a220032372"), updateBaseFeeVaultProxy.Data()) + + updateL1FeeVaultProxySender, updateL1FeeVaultProxy := toDepositTxn(t, upgradeTxns[6]) + require.Equal(t, updateL1FeeVaultProxySender, common.Address{}) + require.Equal(t, updateL1FeeVaultProxySource.SourceHash(), updateL1FeeVaultProxy.SourceHash()) + require.NotNil(t, updateL1FeeVaultProxy.To()) + require.Equal(t, *updateL1FeeVaultProxy.To(), predeploys.L1FeeVaultAddr) + require.Equal(t, uint64(50_000), updateL1FeeVaultProxy.Gas()) + require.Equal(t, common.FromHex("0x3659cfe60000000000000000000000008974d3621be88d87f4ff264e1215428fd60134bb"), updateL1FeeVaultProxy.Data()) + + updateSequencerFeeVaultProxySender, updateSequencerFeeVaultProxy := toDepositTxn(t, upgradeTxns[7]) + require.Equal(t, updateSequencerFeeVaultProxySender, common.Address{}) + require.Equal(t, updateSequencerFeeVaultProxySource.SourceHash(), updateSequencerFeeVaultProxy.SourceHash()) + require.NotNil(t, updateSequencerFeeVaultProxy.To()) + require.Equal(t, *updateSequencerFeeVaultProxy.To(), predeploys.SequencerFeeVaultAddr) + require.Equal(t, uint64(50_000), updateSequencerFeeVaultProxy.Gas()) + require.Equal(t, common.FromHex("0x3659cfe6000000000000000000000000ab31a20195e56a4858628b7a1c80178fa281d010"), updateSequencerFeeVaultProxy.Data()) +} diff --git a/op-node/rollup/derive/span_channel_out.go b/op-node/rollup/derive/span_channel_out.go index 71b3e90e2..97d593318 100644 --- a/op-node/rollup/derive/span_channel_out.go +++ b/op-node/rollup/derive/span_channel_out.go @@ -102,6 +102,7 @@ func (co *SpanChannelOut) AddSingularBatch(batch *SingularBatch, seqNum uint64) // Append Singular batch to its span batch builder co.spanBatchBuilder.AppendSingularBatch(batch, seqNum) // Convert Span batch to RawSpanBatch + //TODO rawSpanBatch, err := co.spanBatchBuilder.GetRawSpanBatch() if err != nil { return 0, fmt.Errorf("failed to convert SpanBatch into RawSpanBatch: %w", err) From d00fba09844eda84fe45e7153fc5f290dcf7aeae Mon Sep 17 00:00:00 2001 From: Ayaan Date: Mon, 9 Dec 2024 10:55:37 +0900 Subject: [PATCH 04/14] chore: update dependency --- go.mod | 2 +- go.sum | 4 ++-- ops-devnet/docker-compose.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index d2a7cfc00..649b98c05 100644 --- a/go.mod +++ b/go.mod @@ -207,4 +207,4 @@ require ( replace github.com/ethereum-optimism/optimism v1.7.2 => ./ -replace github.com/ethereum/go-ethereum v1.13.8 => github.com/kroma-network/go-ethereum v1.101308.3-0.20241205054106-fd7e291968d6 +replace github.com/ethereum/go-ethereum v1.13.8 => github.com/kroma-network/go-ethereum v1.101308.3-0.20241209003634-d80c1f1bfb77 diff --git a/go.sum b/go.sum index df4c25cfb..8956e7f1e 100644 --- a/go.sum +++ b/go.sum @@ -395,8 +395,8 @@ github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kroma-network/go-ethereum v1.101308.3-0.20241205054106-fd7e291968d6 h1:psD31rxeK1/94Uu3G1BpUlOYCOFzCtC4qGxqytfMWWo= -github.com/kroma-network/go-ethereum v1.101308.3-0.20241205054106-fd7e291968d6/go.mod h1:ZG4M8oph2j0C+R6CtUXuHeeUk5TuN5hVyl9gfwZawJg= +github.com/kroma-network/go-ethereum v1.101308.3-0.20241209003634-d80c1f1bfb77 h1:kyVTxKPf35OdA5D4Z0Hskyzv+5JRu1jeRIYYulRqPtM= +github.com/kroma-network/go-ethereum v1.101308.3-0.20241209003634-d80c1f1bfb77/go.mod h1:ZG4M8oph2j0C+R6CtUXuHeeUk5TuN5hVyl9gfwZawJg= github.com/kroma-network/zktrie v0.5.1-0.20230420142222-950ce7a8ce84 h1:VpLCQx+tFV6Nk0hbs3Noyxma/q9wIDdyacKpGQWUMI8= github.com/kroma-network/zktrie v0.5.1-0.20230420142222-950ce7a8ce84/go.mod h1:w54LrYo5rJEV503BgMPRNONsLTOEQv5V87q+uYaw9sM= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= diff --git a/ops-devnet/docker-compose.yml b/ops-devnet/docker-compose.yml index 8816ea79a..9efb913a2 100644 --- a/ops-devnet/docker-compose.yml +++ b/ops-devnet/docker-compose.yml @@ -108,7 +108,7 @@ services: l2: pid: host # allow debugging - image: kromanetwork/geth:mpt-fd7e2919 + image: kromanetwork/geth:zkvm-3471712 ports: - "9545:8545" - "9546:8546" @@ -128,7 +128,7 @@ services: l2-historical: pid: host # allow debugging - image: kromanetwork/geth:mpt-fd7e2919 + image: kromanetwork/geth:zkvm-3471712 ports: - "9445:8545" - "9446:8546" From 84576196d2f93357c1b535c861bd20e0528a0da8 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Tue, 10 Dec 2024 15:06:37 +0900 Subject: [PATCH 05/14] fix: fix reorg problem --- op-node/rollup/derive/l1_block_info.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/op-node/rollup/derive/l1_block_info.go b/op-node/rollup/derive/l1_block_info.go index 8edb5846b..bb9d00c0f 100644 --- a/op-node/rollup/derive/l1_block_info.go +++ b/op-node/rollup/derive/l1_block_info.go @@ -433,6 +433,8 @@ func L1InfoDeposit(rollupCfg *rollup.Config, sysCfg eth.SystemConfig, seqNumber // [Kroma: START] if rollupCfg.IsKromaMPT(l2BlockTime) { L1BlockAddress = oppredeploys.L1BlockAddr + } else { + L1BlockAddress = predeploys.L1BlockAddr } // [Kroma: END] From c0818548df57bfb0f06020ddb66e6d620f060493 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Tue, 10 Dec 2024 16:26:35 +0900 Subject: [PATCH 06/14] chore: fix typo --- op-node/rollup/derive/l1_block_info.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-node/rollup/derive/l1_block_info.go b/op-node/rollup/derive/l1_block_info.go index bb9d00c0f..c929e84a8 100644 --- a/op-node/rollup/derive/l1_block_info.go +++ b/op-node/rollup/derive/l1_block_info.go @@ -24,7 +24,7 @@ const ( L1InfoArguments = 9 L1InfoBedrockLen = 4 + 32*L1InfoArguments L1InfoEcotoneLen = 4 + 32*6 // after Ecotone upgrade, args are packed into 6 32-byte slots - L1InfoKromaMPTLen = 4 + 32*5 // after KromaMPT upgrade, args are packed into 6 32-byte slots + L1InfoKromaMPTLen = 4 + 32*5 // after KromaMPT upgrade, args are packed into 5 32-byte slots ) var ( From 21c1d19d38d3aa3f7e60818c9f550de5a6de549c Mon Sep 17 00:00:00 2001 From: Ayaan Date: Wed, 11 Dec 2024 15:34:32 +0900 Subject: [PATCH 07/14] chore: adjust PR reviews --- kroma-bindings/predeploys/addresses_test.go | 7 +- op-e2e/system_tob_test.go | 2 +- op-node/rollup/derive/attributes.go | 28 ++++---- .../rollup/derive/attributes_queue_test.go | 6 +- .../ecotone_upgrade_transactions_test.go | 2 - .../derive/kromampt_upgrade_transactions.go | 64 ++++++++++--------- .../kromampt_upgrade_transactions_test.go | 22 +++---- op-node/rollup/derive/l1_block_info.go | 6 +- op-node/rollup/derive/span_channel_out.go | 1 - op-node/rollup/types.go | 25 ++------ 10 files changed, 74 insertions(+), 89 deletions(-) diff --git a/kroma-bindings/predeploys/addresses_test.go b/kroma-bindings/predeploys/addresses_test.go index f97f1ec26..6d0b487cb 100644 --- a/kroma-bindings/predeploys/addresses_test.go +++ b/kroma-bindings/predeploys/addresses_test.go @@ -8,14 +8,15 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" + oppredeploys "github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/kroma-network/kroma/kroma-bindings/bindings" - "github.com/kroma-network/kroma/op-bindings/predeploys" ) func TestGethAddresses(t *testing.T) { // We test if the addresses in geth match those in op-bindings, to avoid an import-cycle: - // we import geth in the monorepo, and do not want to import kroma-bindings into geth. - require.Equal(t, predeploys.L1BlockAddr, types.L1BlockAddr) + // we import geth in the monorepo, and do not want to import op-bindings into geth. + require.Equal(t, oppredeploys.L1BlockAddr, types.L1BlockAddr) + require.Equal(t, L1BlockAddr, types.KromaL1BlockAddr) } func uintToHash(v uint) common.Hash { diff --git a/op-e2e/system_tob_test.go b/op-e2e/system_tob_test.go index 6e97efe87..22abc656a 100644 --- a/op-e2e/system_tob_test.go +++ b/op-e2e/system_tob_test.go @@ -23,13 +23,13 @@ import ( fuzz "github.com/google/gofuzz" "github.com/stretchr/testify/require" - "github.com/ethereum-optimism/optimism/kroma-chain-ops/crossdomain" "github.com/ethereum-optimism/optimism/op-e2e/e2eutils" "github.com/ethereum-optimism/optimism/op-e2e/e2eutils/geth" "github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait" "github.com/ethereum-optimism/optimism/op-service/testutils/fuzzerutils" "github.com/kroma-network/kroma/kroma-bindings/bindings" "github.com/kroma-network/kroma/kroma-bindings/predeploys" + "github.com/kroma-network/kroma/kroma-chain-ops/crossdomain" ) // TestGasPriceOracleFeeUpdates checks that the gas price oracle cannot be locked by mis-configuring parameters. diff --git a/op-node/rollup/derive/attributes.go b/op-node/rollup/derive/attributes.go index 806378979..ea0b18253 100644 --- a/op-node/rollup/derive/attributes.go +++ b/op-node/rollup/derive/attributes.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum-optimism/optimism/op-bindings/predeploys" + oppredeploys "github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" ) @@ -109,13 +109,13 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex } // [Kroma: START] - // Include KromaMPT network upgrade transactions in the block before(parent block) of the KromaMPT target block. + // Include KromaMPT network upgrade transactions in the parent block of the KromaMPT target block. if ba.rollupCfg.IsKromaMPTParentBlock(nextL2Time) { - kromaMPT, err := KromaMPTNetworkUpgradeTransactions() + mptUpgradeTxs, err := KromaMPTNetworkUpgradeTransactions() if err != nil { return nil, NewCriticalError(fmt.Errorf("failed to build kroma mpt network upgrade txs: %w", err)) } - upgradeTxs = append(upgradeTxs, kromaMPT...) + upgradeTxs = append(upgradeTxs, mptUpgradeTxs...) } // [Kroma: END] @@ -132,22 +132,20 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex // [Kroma: START] suggestedFeeRecipient := common.Address{} if ba.rollupCfg.IsKromaMPT(nextL2Time) { - suggestedFeeRecipient = predeploys.SequencerFeeVaultAddr + suggestedFeeRecipient = oppredeploys.SequencerFeeVaultAddr } else { // In Kroma, the IsSystemTransaction field was deleted from DepositTx. // After transitioning to MPT, we bring back the IsSystemTransaction field for compatibility with OP. // Therefore, before MPT time, use KromaDepositTx struct to create deposit transactions without that field. - if !ba.rollupCfg.IsKromaMPT(nextL2Time) { - for i, otx := range txs { - if otx[0] != types.DepositTxType { - continue - } - tx, err := ToKromaDepositBytes(otx) - if err != nil { - return nil, NewCriticalError(err) - } - txs[i] = tx + for i, otx := range txs { + if otx[0] != types.DepositTxType { + continue } + tx, err := ToKromaDepositBytes(otx) + if err != nil { + return nil, NewCriticalError(err) + } + txs[i] = tx } } // [Kroma: END] diff --git a/op-node/rollup/derive/attributes_queue_test.go b/op-node/rollup/derive/attributes_queue_test.go index 487f788ae..1f24f9c7f 100644 --- a/op-node/rollup/derive/attributes_queue_test.go +++ b/op-node/rollup/derive/attributes_queue_test.go @@ -74,10 +74,8 @@ func TestAttributesQueue(t *testing.T) { l2Fetcher.ExpectSystemConfigByL2Hash(safeHead.Hash, parentL1Cfg, nil) parentBeaconRoot := l1Info.ParentBeaconRoot() - if cfg.IsEcotone(0) { - if parentBeaconRoot == nil { // default to zero hash if there is no beacon-block-root available - parentBeaconRoot = new(common.Hash) - } + if cfg.IsEcotone(safeHead.Time+cfg.BlockTime) && parentBeaconRoot == nil { // default to zero hash if there is no beacon-block-root available + parentBeaconRoot = new(common.Hash) } attrs := eth.PayloadAttributes{ Timestamp: eth.Uint64Quantity(safeHead.Time + cfg.BlockTime), diff --git a/op-node/rollup/derive/ecotone_upgrade_transactions_test.go b/op-node/rollup/derive/ecotone_upgrade_transactions_test.go index 418058464..20e58afd3 100644 --- a/op-node/rollup/derive/ecotone_upgrade_transactions_test.go +++ b/op-node/rollup/derive/ecotone_upgrade_transactions_test.go @@ -50,9 +50,7 @@ func toDepositTxn(t *testing.T, data hexutil.Bytes) (common.Address, *types.Tran err := txn.UnmarshalBinary(data) require.NoError(t, err) require.Truef(t, txn.IsDepositTx(), "expected deposit txn, got %v", txn.Type()) - /* [Kroma: START] require.False(t, txn.IsSystemTx()) - [Kroma: END] */ signer := types.NewLondonSigner(big.NewInt(420)) from, err := signer.Sender(txn) diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions.go b/op-node/rollup/derive/kromampt_upgrade_transactions.go index c18091df5..28e9ae040 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions.go @@ -8,16 +8,20 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum-optimism/optimism/op-bindings/predeploys" + oppredeploys "github.com/ethereum-optimism/optimism/op-bindings/predeploys" + "github.com/kroma-network/kroma/kroma-bindings/bindings" ) var ( - KromaMPTDeployerAddress = common.HexToAddress("0x2551000000000000000000000000000000000000") + L1BlockMPTDeployerAddress = common.HexToAddress("0x2551000000000000000000000000000000000000") + BaseFeeVaultDeployerAddress = common.HexToAddress("0x2551000000000000000000000000000000000001") + L1FeeVaultDeployerAddress = common.HexToAddress("0x2551000000000000000000000000000000000002") + SequencerFeeVaultDeployerAddress = common.HexToAddress("0x2551000000000000000000000000000000000003") - newL1BlockMPTAddress = crypto.CreateAddress(KromaMPTDeployerAddress, 0) - newBaseFeeVaultAddress = crypto.CreateAddress(KromaMPTDeployerAddress, 1) - newL1FeeVaultAddress = crypto.CreateAddress(KromaMPTDeployerAddress, 2) - newSequencerFeeVaultAddress = crypto.CreateAddress(KromaMPTDeployerAddress, 3) + newL1BlockMPTAddress = crypto.CreateAddress(L1BlockMPTDeployerAddress, 0) + newBaseFeeVaultAddress = crypto.CreateAddress(BaseFeeVaultDeployerAddress, 0) + newL1FeeVaultAddress = crypto.CreateAddress(L1FeeVaultDeployerAddress, 0) + newSequencerFeeVaultAddress = crypto.CreateAddress(SequencerFeeVaultDeployerAddress, 0) deployBaseFeeVaultSource = UpgradeDepositSource{Intent: "KromaMPT: BaseFee Vault Deployment"} updateBaseFeeVaultProxySource = UpgradeDepositSource{Intent: "KromaMPT: BaseFee Vault Proxy Update"} @@ -25,23 +29,21 @@ var ( updateL1FeeVaultProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Fee Vault Proxy Update"} deploySequencerFeeVaultSource = UpgradeDepositSource{Intent: "KromaMPT: Sequencer Fee Vault Deployment"} updateSequencerFeeVaultProxySource = UpgradeDepositSource{Intent: "KromaMPT: Sequencer Fee Vault Proxy Update"} + deployL1BlockMPTSource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Deployment"} + updateL1BlockMPTProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Proxy Update"} - deployL1BlockMPTSource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Deployment"} - updateL1BlockMPTProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Proxy Update"} - l1BlockMPTDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b5061053e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638381f58a11610097578063c598591811610066578063c598591814610229578063e591b28214610249578063e81b2c6d14610289578063f82061401461029257600080fd5b80638381f58a146101e35780638b239f73146101f75780639e8c496614610200578063b80777ea1461020957600080fd5b806354fd4d50116100d357806354fd4d50146101335780635cf249691461017c57806364ca23ef1461018557806368d5dca6146101b257600080fd5b8063015d8eb9146100fa57806309bd5a601461010f578063440a5e201461012b575b600080fd5b61010d61010836600461044c565b61029b565b005b61011860025481565b6040519081526020015b60405180910390f35b61010d6103da565b61016f6040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161012291906104be565b61011860015481565b6003546101999067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610122565b6003546101ce9068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610122565b6000546101999067ffffffffffffffff1681565b61011860055481565b61011860065481565b6000546101999068010000000000000000900467ffffffffffffffff1681565b6003546101ce906c01000000000000000000000000900463ffffffff1681565b61026473deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610122565b61011860045481565b61011860075481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead000114610342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c7565730000000000606482015260840160405180910390fd5b6000805467ffffffffffffffff98891668010000000000000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116998916999099179890981790975560019490945560029290925560038054919094167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009190911617909255600491909155600555600655565b3373deaddeaddeaddeaddeaddeaddeaddeaddead00011461040357633cc50b456000526004601cfd5b60043560801c60035560143560801c600055602435600155604435600755606435600255608435600455565b803567ffffffffffffffff8116811461044757600080fd5b919050565b600080600080600080600080610100898b03121561046957600080fd5b6104728961042f565b975061048060208a0161042f565b9650604089013595506060890135945061049c60808a0161042f565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600060208083528351808285015260005b818110156104eb578581018301518582016040015282016104cf565b818111156104fd576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea164736f6c634300080f000a") - feeVaultDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b5061053e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638381f58a11610097578063c598591811610066578063c598591814610229578063e591b28214610249578063e81b2c6d14610289578063f82061401461029257600080fd5b80638381f58a146101e35780638b239f73146101f75780639e8c496614610200578063b80777ea1461020957600080fd5b806354fd4d50116100d357806354fd4d50146101335780635cf249691461017c57806364ca23ef1461018557806368d5dca6146101b257600080fd5b8063015d8eb9146100fa57806309bd5a601461010f578063440a5e201461012b575b600080fd5b61010d61010836600461044c565b61029b565b005b61011860025481565b6040519081526020015b60405180910390f35b61010d6103da565b61016f6040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161012291906104be565b61011860015481565b6003546101999067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610122565b6003546101ce9068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610122565b6000546101999067ffffffffffffffff1681565b61011860055481565b61011860065481565b6000546101999068010000000000000000900467ffffffffffffffff1681565b6003546101ce906c01000000000000000000000000900463ffffffff1681565b61026473deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610122565b61011860045481565b61011860075481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead000114610342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c7565730000000000606482015260840160405180910390fd5b6000805467ffffffffffffffff98891668010000000000000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116998916999099179890981790975560019490945560029290925560038054919094167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009190911617909255600491909155600555600655565b3373deaddeaddeaddeaddeaddeaddeaddeaddead00011461040357633cc50b456000526004601cfd5b60043560801c60035560143560801c600055602435600155604435600755606435600255608435600455565b803567ffffffffffffffff8116811461044757600080fd5b919050565b600080600080600080600080610100898b03121561046957600080fd5b6104728961042f565b975061048060208a0161042f565b9650604089013595506060890135945061049c60808a0161042f565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600060208083528351808285015260005b818110156104eb578581018301518582016040015282016104cf565b818111156104fd576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea164736f6c634300080f000a") + l1BlockMPTDeploymentBytecode = common.FromHex(bindings.L1BlockMetaData.Bin) + sequencerFeeVaultDeploymentBytecode = common.FromHex(bindings.ProtocolVaultMetaData.Bin) + baseFeeVaultDeploymentBytecode = common.FromHex(bindings.ProtocolVaultMetaData.Bin) + l1FeeVaultDeploymentBytecode = common.FromHex(bindings.L1FeeVaultMetaData.Bin) ) -// init overrides variables defined in the Kroma MPT upgrade. -func init() { -} - func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { upgradeTxns := make([]hexutil.Bytes, 0, 8) deployL1BlockTransaction, err := types.NewTx(&types.DepositTx{ SourceHash: deployL1BlockMPTSource.SourceHash(), - From: L1BlockDeployerAddress, + From: L1BlockMPTDeployerAddress, To: nil, Mint: big.NewInt(0), Value: big.NewInt(0), @@ -49,7 +51,6 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { IsSystemTransaction: false, Data: l1BlockMPTDeploymentBytecode, }).MarshalBinary() - if err != nil { return nil, err } @@ -58,41 +59,46 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { deployBaseFeeVault, err := types.NewTx(&types.DepositTx{ SourceHash: deployBaseFeeVaultSource.SourceHash(), - From: KromaMPTDeployerAddress, + From: BaseFeeVaultDeployerAddress, To: nil, Mint: big.NewInt(0), Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: feeVaultDeploymentBytecode, + Data: baseFeeVaultDeploymentBytecode, }).MarshalBinary() + if err != nil { + return nil, err + } upgradeTxns = append(upgradeTxns, deployBaseFeeVault) deployL1FeeVault, err := types.NewTx(&types.DepositTx{ SourceHash: deployL1FeeVaultSource.SourceHash(), - From: KromaMPTDeployerAddress, + From: L1FeeVaultDeployerAddress, To: nil, Mint: big.NewInt(0), Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: feeVaultDeploymentBytecode, + Data: l1FeeVaultDeploymentBytecode, }).MarshalBinary() + if err != nil { + return nil, err + } upgradeTxns = append(upgradeTxns, deployL1FeeVault) deploySequencerFeeVault, err := types.NewTx(&types.DepositTx{ SourceHash: deploySequencerFeeVaultSource.SourceHash(), - From: KromaMPTDeployerAddress, + From: SequencerFeeVaultDeployerAddress, To: nil, Mint: big.NewInt(0), Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: feeVaultDeploymentBytecode, + Data: sequencerFeeVaultDeploymentBytecode, }).MarshalBinary() - if err != nil { return nil, err } @@ -102,14 +108,13 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { updateL1BlockProxy, err := types.NewTx(&types.DepositTx{ SourceHash: updateL1BlockMPTProxySource.SourceHash(), From: common.Address{}, - To: &predeploys.L1BlockAddr, + To: &oppredeploys.L1BlockAddr, Mint: big.NewInt(0), Value: big.NewInt(0), Gas: 50_000, IsSystemTransaction: false, Data: upgradeToCalldata(newL1BlockMPTAddress), }).MarshalBinary() - if err != nil { return nil, err } @@ -119,14 +124,13 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { updateBaseFeeVaultProxy, err := types.NewTx(&types.DepositTx{ SourceHash: updateBaseFeeVaultProxySource.SourceHash(), From: common.Address{}, - To: &predeploys.BaseFeeVaultAddr, + To: &oppredeploys.BaseFeeVaultAddr, Mint: big.NewInt(0), Value: big.NewInt(0), Gas: 50_000, IsSystemTransaction: false, Data: upgradeToCalldata(newBaseFeeVaultAddress), }).MarshalBinary() - if err != nil { return nil, err } @@ -136,14 +140,13 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { updateL1FeeVaultProxy, err := types.NewTx(&types.DepositTx{ SourceHash: updateL1FeeVaultProxySource.SourceHash(), From: common.Address{}, - To: &predeploys.L1FeeVaultAddr, + To: &oppredeploys.L1FeeVaultAddr, Mint: big.NewInt(0), Value: big.NewInt(0), Gas: 50_000, IsSystemTransaction: false, Data: upgradeToCalldata(newL1FeeVaultAddress), }).MarshalBinary() - if err != nil { return nil, err } @@ -153,14 +156,13 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { updateSequencerFeeVaultProxy, err := types.NewTx(&types.DepositTx{ SourceHash: updateSequencerFeeVaultProxySource.SourceHash(), From: common.Address{}, - To: &predeploys.SequencerFeeVaultAddr, + To: &oppredeploys.SequencerFeeVaultAddr, Mint: big.NewInt(0), Value: big.NewInt(0), Gas: 50_000, IsSystemTransaction: false, Data: upgradeToCalldata(newSequencerFeeVaultAddress), }).MarshalBinary() - if err != nil { return nil, err } diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go index 48f78841d..524210dba 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go @@ -58,32 +58,32 @@ func TestMPTNetworkTransactions(t *testing.T) { require.Len(t, upgradeTxns, 8) deployL1BlockSender, deployL1Block := toDepositTxn(t, upgradeTxns[0]) - require.Equal(t, deployL1BlockSender, L1BlockDeployerAddress) + require.Equal(t, deployL1BlockSender, L1BlockMPTDeployerAddress) require.Equal(t, deployL1BlockMPTSource.SourceHash(), deployL1Block.SourceHash()) require.Nil(t, deployL1Block.To()) require.Equal(t, uint64(375_000), deployL1Block.Gas()) require.Equal(t, hexutil.Bytes(l1BlockMPTDeploymentBytecode).String(), hexutil.Bytes(deployL1Block.Data()).String()) deployBaseFeeVaultSender, deployBaseFeeVault := toDepositTxn(t, upgradeTxns[1]) - require.Equal(t, deployBaseFeeVaultSender, KromaMPTDeployerAddress) + require.Equal(t, deployBaseFeeVaultSender, BaseFeeVaultDeployerAddress) require.Equal(t, deployBaseFeeVaultSource.SourceHash(), deployBaseFeeVault.SourceHash()) require.Nil(t, deployBaseFeeVault.To()) require.Equal(t, uint64(1_000_000), deployBaseFeeVault.Gas()) - require.Equal(t, hexutil.Bytes(feeVaultDeploymentBytecode).String(), hexutil.Bytes(deployBaseFeeVault.Data()).String()) + require.Equal(t, hexutil.Bytes(baseFeeVaultDeploymentBytecode).String(), hexutil.Bytes(deployBaseFeeVault.Data()).String()) deployL1FeeVaultSender, deployL1FeeVault := toDepositTxn(t, upgradeTxns[2]) - require.Equal(t, deployL1FeeVaultSender, KromaMPTDeployerAddress) + require.Equal(t, deployL1FeeVaultSender, L1FeeVaultDeployerAddress) require.Equal(t, deployL1FeeVaultSource.SourceHash(), deployL1FeeVault.SourceHash()) require.Nil(t, deployL1FeeVault.To()) require.Equal(t, uint64(1_000_000), deployL1FeeVault.Gas()) - require.Equal(t, hexutil.Bytes(feeVaultDeploymentBytecode).String(), hexutil.Bytes(deployL1FeeVault.Data()).String()) + require.Equal(t, hexutil.Bytes(l1FeeVaultDeploymentBytecode).String(), hexutil.Bytes(deployL1FeeVault.Data()).String()) - deployL1FeeVaultSender, deploySequencerFeeVault := toDepositTxn(t, upgradeTxns[3]) - require.Equal(t, deployL1FeeVaultSender, KromaMPTDeployerAddress) + deploySequencerFeeVaultSender, deploySequencerFeeVault := toDepositTxn(t, upgradeTxns[3]) + require.Equal(t, deploySequencerFeeVaultSender, SequencerFeeVaultDeployerAddress) require.Equal(t, deploySequencerFeeVaultSource.SourceHash(), deploySequencerFeeVault.SourceHash()) require.Nil(t, deploySequencerFeeVault.To()) require.Equal(t, uint64(1_000_000), deploySequencerFeeVault.Gas()) - require.Equal(t, hexutil.Bytes(feeVaultDeploymentBytecode).String(), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) + require.Equal(t, hexutil.Bytes(sequencerFeeVaultDeploymentBytecode).String(), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) updateL1BlockProxySender, updateL1BlockProxy := toDepositTxn(t, upgradeTxns[4]) require.Equal(t, updateL1BlockProxySender, common.Address{}) @@ -99,7 +99,7 @@ func TestMPTNetworkTransactions(t *testing.T) { require.NotNil(t, updateBaseFeeVaultProxy.To()) require.Equal(t, *updateBaseFeeVaultProxy.To(), predeploys.BaseFeeVaultAddr) require.Equal(t, uint64(50_000), updateBaseFeeVaultProxy.Gas()) - require.Equal(t, common.FromHex("0x3659cfe60000000000000000000000008ab182eaa3d481ee66d13727c82c37a220032372"), updateBaseFeeVaultProxy.Data()) + require.Equal(t, common.FromHex("3659cfe6000000000000000000000000db78bab44d9632e68348659dd47b4806ba276d89"), updateBaseFeeVaultProxy.Data()) updateL1FeeVaultProxySender, updateL1FeeVaultProxy := toDepositTxn(t, upgradeTxns[6]) require.Equal(t, updateL1FeeVaultProxySender, common.Address{}) @@ -107,7 +107,7 @@ func TestMPTNetworkTransactions(t *testing.T) { require.NotNil(t, updateL1FeeVaultProxy.To()) require.Equal(t, *updateL1FeeVaultProxy.To(), predeploys.L1FeeVaultAddr) require.Equal(t, uint64(50_000), updateL1FeeVaultProxy.Gas()) - require.Equal(t, common.FromHex("0x3659cfe60000000000000000000000008974d3621be88d87f4ff264e1215428fd60134bb"), updateL1FeeVaultProxy.Data()) + require.Equal(t, common.FromHex("3659cfe6000000000000000000000000d86e1a7c380f398bda3d598ee65c891ce5c3c8f0"), updateL1FeeVaultProxy.Data()) updateSequencerFeeVaultProxySender, updateSequencerFeeVaultProxy := toDepositTxn(t, upgradeTxns[7]) require.Equal(t, updateSequencerFeeVaultProxySender, common.Address{}) @@ -115,5 +115,5 @@ func TestMPTNetworkTransactions(t *testing.T) { require.NotNil(t, updateSequencerFeeVaultProxy.To()) require.Equal(t, *updateSequencerFeeVaultProxy.To(), predeploys.SequencerFeeVaultAddr) require.Equal(t, uint64(50_000), updateSequencerFeeVaultProxy.Gas()) - require.Equal(t, common.FromHex("0x3659cfe6000000000000000000000000ab31a20195e56a4858628b7a1c80178fa281d010"), updateSequencerFeeVaultProxy.Data()) + require.Equal(t, common.FromHex("3659cfe600000000000000000000000013963c74d9c62d31ce3fcec0d46f6430a74ea79e"), updateSequencerFeeVaultProxy.Data()) } diff --git a/op-node/rollup/derive/l1_block_info.go b/op-node/rollup/derive/l1_block_info.go index c929e84a8..63e340520 100644 --- a/op-node/rollup/derive/l1_block_info.go +++ b/op-node/rollup/derive/l1_block_info.go @@ -11,11 +11,11 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum-optimism/optimism/kroma-bindings/predeploys" oppredeploys "github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" "github.com/ethereum-optimism/optimism/op-service/solabi" + "github.com/kroma-network/kroma/kroma-bindings/predeploys" ) const ( @@ -406,9 +406,11 @@ func L1InfoDeposit(rollupCfg *rollup.Config, sysCfg eth.SystemConfig, seqNumber l1BlockInfo.BlobBaseFeeScalar = blobBaseFeeScalar l1BlockInfo.BaseFeeScalar = baseFeeScalar l1BlockInfo.ValidatorRewardScalar = sysCfg.ValidatorRewardScalar - out, err := l1BlockInfo.marshalBinaryEcotone() + var out []byte if rollupCfg.IsKromaMPT(l2BlockTime) { out, err = l1BlockInfo.marshalBinaryKromaMPT() + } else { + out, err = l1BlockInfo.marshalBinaryEcotone() } if err != nil { return nil, fmt.Errorf("failed to marshal Ecotone l1 block info: %w", err) diff --git a/op-node/rollup/derive/span_channel_out.go b/op-node/rollup/derive/span_channel_out.go index 97d593318..71b3e90e2 100644 --- a/op-node/rollup/derive/span_channel_out.go +++ b/op-node/rollup/derive/span_channel_out.go @@ -102,7 +102,6 @@ func (co *SpanChannelOut) AddSingularBatch(batch *SingularBatch, seqNum uint64) // Append Singular batch to its span batch builder co.spanBatchBuilder.AppendSingularBatch(batch, seqNum) // Convert Span batch to RawSpanBatch - //TODO rawSpanBatch, err := co.spanBatchBuilder.GetRawSpanBatch() if err != nil { return 0, fmt.Errorf("failed to convert SpanBatch into RawSpanBatch: %w", err) diff --git a/op-node/rollup/types.go b/op-node/rollup/types.go index b3c93bed8..6c563b8dc 100644 --- a/op-node/rollup/types.go +++ b/op-node/rollup/types.go @@ -371,6 +371,12 @@ func (c *Config) IsKromaMPT(timestamp uint64) bool { return c.KromaMPTTime != nil && timestamp >= *c.KromaMPTTime } +// IsKromaMPTParentBlock returns whether the specified block is the parent block subject to the +// KromaMPT upgrade. +func (c *Config) IsKromaMPTParentBlock(l2BlockTime uint64) bool { + return c.KromaMPTTime != nil && l2BlockTime == *c.KromaMPTTime-c.BlockTime +} + // IsFjord returns true if the Fjord hardfork is active at or past the given timestamp. func (c *Config) IsFjord(timestamp uint64) bool { return c.FjordTime != nil && timestamp >= *c.FjordTime @@ -381,25 +387,6 @@ func (c *Config) IsInterop(timestamp uint64) bool { return c.InteropTime != nil && timestamp >= *c.InteropTime } -// IsEcotoneActivationBlock returns whether the specified block is the first block subject to the -// KromaMPT upgrade. KromaMPT activation at genesis does not count. -func (c *Config) IsKromaMPTActivationBlock(l2BlockTime uint64) bool { - return c.IsKromaMPT(l2BlockTime) && - l2BlockTime >= c.BlockTime && - !c.IsKromaMPT(l2BlockTime-c.BlockTime) -} - -// IsKromaMPTParentBlock returns whether the specified block is the parent block subject to the -// KromaMPT upgrade. -func (c *Config) IsKromaMPTParentBlock(l2BlockTime uint64) bool { - if c.KromaMPTTime == nil { - return false - } - return l2BlockTime == *c.KromaMPTTime-c.BlockTime -} - -// [Kroma: END] - // ForkchoiceUpdatedVersion returns the EngineAPIMethod suitable for the chain hard fork version. func (c *Config) ForkchoiceUpdatedVersion(attr *eth.PayloadAttributes) eth.EngineAPIMethod { if attr == nil { From 20d945083eca03ef033653ae3a05e4f229492468 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Wed, 11 Dec 2024 16:34:13 +0900 Subject: [PATCH 08/14] feat: set noTxPool in MPT parent block --- op-node/rollup/driver/sequencer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/op-node/rollup/driver/sequencer.go b/op-node/rollup/driver/sequencer.go index 135591b76..721e965a2 100644 --- a/op-node/rollup/driver/sequencer.go +++ b/op-node/rollup/driver/sequencer.go @@ -99,6 +99,12 @@ func (d *Sequencer) StartBuildingBlock(ctx context.Context) error { d.log.Info("Sequencing Ecotone upgrade block") } + // For the KromaMPT parent block we shouldn't include any sequencer transactions. + if d.rollupCfg.IsKromaMPTParentBlock(uint64(attrs.Timestamp)) { + attrs.NoTxPool = true + d.log.Info("Sequencing MPT upgrade block") + } + d.log.Debug("prepared attributes for new block", "num", l2Head.Number+1, "time", uint64(attrs.Timestamp), "origin", l1Origin, "origin_time", l1Origin.Time, "noTxPool", attrs.NoTxPool) From 905ac77c008234f4c104040b590678c50464f170 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Wed, 11 Dec 2024 16:55:38 +0900 Subject: [PATCH 09/14] chore: adjust PR reviews - 2 --- op-node/rollup/derive/fuzz_parsers_test.go | 29 +++++++++++++++++++ .../derive/kromampt_upgrade_transactions.go | 2 +- .../kromampt_upgrade_transactions_test.go | 2 +- op-node/rollup/types.go | 2 +- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/op-node/rollup/derive/fuzz_parsers_test.go b/op-node/rollup/derive/fuzz_parsers_test.go index 949704c30..a9f1450e5 100644 --- a/op-node/rollup/derive/fuzz_parsers_test.go +++ b/op-node/rollup/derive/fuzz_parsers_test.go @@ -99,6 +99,35 @@ func FuzzL1InfoEcotoneRoundTrip(f *testing.F) { }) } +// FuzzL1InfoKromaMPTRoundTrip checks that our Kroma MPT encoder round trips properly +func FuzzL1InfoKromaMPTRoundTrip(f *testing.F) { + f.Fuzz(func(t *testing.T, number, time uint64, baseFee, blobBaseFee, hash []byte, seqNumber uint64, baseFeeScalar, blobBaseFeeScalar uint32, validatorRewardScalar []byte) { + in := L1BlockInfo{ + Number: number, + Time: time, + BaseFee: BytesToBigInt(baseFee), + BlockHash: common.BytesToHash(hash), + SequenceNumber: seqNumber, + BlobBaseFee: BytesToBigInt(blobBaseFee), + BaseFeeScalar: baseFeeScalar, + BlobBaseFeeScalar: blobBaseFeeScalar, + ValidatorRewardScalar: eth.Bytes32(common.BytesToHash(validatorRewardScalar)), + } + enc, err := in.marshalBinaryKromaMPT() + if err != nil { + t.Fatalf("Failed to marshal binary: %v", err) + } + var out L1BlockInfo + err = out.unmarshalBinaryKromaMPT(enc) + if err != nil { + t.Fatalf("Failed to unmarshal binary: %v", err) + } + if !cmp.Equal(in, out, cmp.Comparer(testutils.BigEqual)) { + t.Fatalf("The data did not round trip correctly. in: %v. out: %v", in, out) + } + }) +} + // FuzzL1InfoAgainstContract checks the custom Bedrock L1 Info marshalling functions against the // setL1BlockValues contract bindings to ensure that our functions are up to date and match the // bindings. Note that we don't test setL1BlockValuesEcotone since it accepts only custom packed diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions.go b/op-node/rollup/derive/kromampt_upgrade_transactions.go index 28e9ae040..a46035cf4 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions.go @@ -47,7 +47,7 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { To: nil, Mint: big.NewInt(0), Value: big.NewInt(0), - Gas: 375_000, + Gas: 500_000, IsSystemTransaction: false, Data: l1BlockMPTDeploymentBytecode, }).MarshalBinary() diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go index 524210dba..d557654df 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go @@ -61,7 +61,7 @@ func TestMPTNetworkTransactions(t *testing.T) { require.Equal(t, deployL1BlockSender, L1BlockMPTDeployerAddress) require.Equal(t, deployL1BlockMPTSource.SourceHash(), deployL1Block.SourceHash()) require.Nil(t, deployL1Block.To()) - require.Equal(t, uint64(375_000), deployL1Block.Gas()) + require.Equal(t, uint64(500_000), deployL1Block.Gas()) require.Equal(t, hexutil.Bytes(l1BlockMPTDeploymentBytecode).String(), hexutil.Bytes(deployL1Block.Data()).String()) deployBaseFeeVaultSender, deployBaseFeeVault := toDepositTxn(t, upgradeTxns[1]) diff --git a/op-node/rollup/types.go b/op-node/rollup/types.go index 6c563b8dc..cd26cdb39 100644 --- a/op-node/rollup/types.go +++ b/op-node/rollup/types.go @@ -372,7 +372,7 @@ func (c *Config) IsKromaMPT(timestamp uint64) bool { } // IsKromaMPTParentBlock returns whether the specified block is the parent block subject to the -// KromaMPT upgrade. +// KromaMPT upgrade. KromaMPT activation at genesis does not count. func (c *Config) IsKromaMPTParentBlock(l2BlockTime uint64) bool { return c.KromaMPTTime != nil && l2BlockTime == *c.KromaMPTTime-c.BlockTime } From 939d4731badefffaeb63a22520a243087e0fb52f Mon Sep 17 00:00:00 2001 From: Ayaan Date: Thu, 12 Dec 2024 14:47:37 +0900 Subject: [PATCH 10/14] chore: adjust PR reviews - 3 --- op-node/rollup/derive/fuzz_parsers_test.go | 19 +++++++++---------- .../derive/kromampt_upgrade_transactions.go | 9 ++++----- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/op-node/rollup/derive/fuzz_parsers_test.go b/op-node/rollup/derive/fuzz_parsers_test.go index a9f1450e5..a45a78183 100644 --- a/op-node/rollup/derive/fuzz_parsers_test.go +++ b/op-node/rollup/derive/fuzz_parsers_test.go @@ -101,17 +101,16 @@ func FuzzL1InfoEcotoneRoundTrip(f *testing.F) { // FuzzL1InfoKromaMPTRoundTrip checks that our Kroma MPT encoder round trips properly func FuzzL1InfoKromaMPTRoundTrip(f *testing.F) { - f.Fuzz(func(t *testing.T, number, time uint64, baseFee, blobBaseFee, hash []byte, seqNumber uint64, baseFeeScalar, blobBaseFeeScalar uint32, validatorRewardScalar []byte) { + f.Fuzz(func(t *testing.T, number, time uint64, baseFee, blobBaseFee, hash []byte, seqNumber uint64, baseFeeScalar, blobBaseFeeScalar uint32) { in := L1BlockInfo{ - Number: number, - Time: time, - BaseFee: BytesToBigInt(baseFee), - BlockHash: common.BytesToHash(hash), - SequenceNumber: seqNumber, - BlobBaseFee: BytesToBigInt(blobBaseFee), - BaseFeeScalar: baseFeeScalar, - BlobBaseFeeScalar: blobBaseFeeScalar, - ValidatorRewardScalar: eth.Bytes32(common.BytesToHash(validatorRewardScalar)), + Number: number, + Time: time, + BaseFee: BytesToBigInt(baseFee), + BlockHash: common.BytesToHash(hash), + SequenceNumber: seqNumber, + BlobBaseFee: BytesToBigInt(blobBaseFee), + BaseFeeScalar: baseFeeScalar, + BlobBaseFeeScalar: blobBaseFeeScalar, } enc, err := in.marshalBinaryKromaMPT() if err != nil { diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions.go b/op-node/rollup/derive/kromampt_upgrade_transactions.go index a46035cf4..e2992fe8b 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions.go @@ -9,7 +9,6 @@ import ( "github.com/ethereum/go-ethereum/crypto" oppredeploys "github.com/ethereum-optimism/optimism/op-bindings/predeploys" - "github.com/kroma-network/kroma/kroma-bindings/bindings" ) var ( @@ -32,10 +31,10 @@ var ( deployL1BlockMPTSource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Deployment"} updateL1BlockMPTProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Proxy Update"} - l1BlockMPTDeploymentBytecode = common.FromHex(bindings.L1BlockMetaData.Bin) - sequencerFeeVaultDeploymentBytecode = common.FromHex(bindings.ProtocolVaultMetaData.Bin) - baseFeeVaultDeploymentBytecode = common.FromHex(bindings.ProtocolVaultMetaData.Bin) - l1FeeVaultDeploymentBytecode = common.FromHex(bindings.L1FeeVaultMetaData.Bin) + l1BlockMPTDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b50610624806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639e8c496611610097578063e81b2c6d11610066578063e81b2c6d14610281578063ed579ad31461028a578063efc674eb14610293578063f8206140146102a657600080fd5b80639e8c4966146101f8578063b80777ea14610201578063c598591814610221578063e591b2821461024157600080fd5b806364ca23ef116100d357806364ca23ef1461017d57806368d5dca6146101aa5780638381f58a146101db5780638b239f73146101ef57600080fd5b806309bd5a6014610105578063440a5e201461012157806354fd4d501461012b5780635cf2496914610174575b600080fd5b61010e60025481565b6040519081526020015b60405180910390f35b6101296102af565b005b6101676040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b604051610118919061050b565b61010e60015481565b6003546101919067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610118565b6003546101c69068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610118565b6000546101919067ffffffffffffffff1681565b61010e60055481565b61010e60065481565b6000546101919068010000000000000000900467ffffffffffffffff1681565b6003546101c6906c01000000000000000000000000900463ffffffff1681565b61025c73deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b61010e60045481565b61010e60075481565b6101296102a136600461059b565b61030a565b61010e60085481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146102d857633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560085560643560025560843560045560a435600755565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c756573000000000060648201526084015b60405180910390fd5b61271081111561046a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c31426c6f636b3a20746865206d61782076616c7565206f662076616c69646160448201527f746f7220726577617264207363616c617220686173206265656e20657863656560648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016103a9565b6000805467ffffffffffffffff998a1668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009091169a8a169a909a179990991790985560019590955560029390935560038054929095167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009290921691909117909355600492909255600591909155600655600755565b600060208083528351808285015260005b818110156105385785810183015185820160400152820161051c565b8181111561054a576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803567ffffffffffffffff8116811461059657600080fd5b919050565b60008060008060008060008060006101208a8c0312156105ba57600080fd5b6105c38a61057e565b98506105d160208b0161057e565b975060408a0135965060608a013595506105ed60808b0161057e565b989b979a50959894979660a0860135965060c08601359560e081013595506101000135935091505056fea164736f6c634300080f000a") + sequencerFeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3100000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") + baseFeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3100000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") + l1FeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3200000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") ) func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { From bd9073e522659ce001ead34ee2811559b79e9110 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Thu, 12 Dec 2024 17:08:17 +0900 Subject: [PATCH 11/14] chore: adjust PR reviews - 4 --- op-e2e/op_geth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-e2e/op_geth.go b/op-e2e/op_geth.go index 744ffe745..5cbb0319a 100644 --- a/op-e2e/op_geth.go +++ b/op-e2e/op_geth.go @@ -226,7 +226,7 @@ func (d *OpGeth) CreatePayloadAttributes(txs ...*types.Transaction) (*eth.Payloa if txBytes[i][0] == types.DepositTxType { bin, err := derive.ToKromaDepositBytes(txBytes[i]) if err != nil { - return nil, fmt.Errorf("failed to convert DepositTx to KromaDepositTx: %w", err) + return nil, err } txBytes[i] = bin } From 8a13c9e3ee7997b0cde68651aef7fb9cf4785a19 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Fri, 13 Dec 2024 16:04:08 +0900 Subject: [PATCH 12/14] feat: modified to provide chainID-specific deployment bytecode --- op-node/rollup/derive/attributes.go | 2 +- .../derive/kromampt_upgrade_transactions.go | 97 ++++++- .../kromampt_upgrade_transactions_test.go | 236 +++++++++++++----- 3 files changed, 262 insertions(+), 73 deletions(-) diff --git a/op-node/rollup/derive/attributes.go b/op-node/rollup/derive/attributes.go index ea0b18253..f482d0ae2 100644 --- a/op-node/rollup/derive/attributes.go +++ b/op-node/rollup/derive/attributes.go @@ -111,7 +111,7 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex // [Kroma: START] // Include KromaMPT network upgrade transactions in the parent block of the KromaMPT target block. if ba.rollupCfg.IsKromaMPTParentBlock(nextL2Time) { - mptUpgradeTxs, err := KromaMPTNetworkUpgradeTransactions() + mptUpgradeTxs, err := KromaMPTNetworkUpgradeTransactions(ba.rollupCfg.L2ChainID) if err != nil { return nil, NewCriticalError(fmt.Errorf("failed to build kroma mpt network upgrade txs: %w", err)) } diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions.go b/op-node/rollup/derive/kromampt_upgrade_transactions.go index e2992fe8b..ef968d4e0 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions.go @@ -1,6 +1,7 @@ package derive import ( + "github.com/ethereum/go-ethereum/accounts/abi" "math/big" "github.com/ethereum/go-ethereum/common" @@ -30,14 +31,90 @@ var ( updateSequencerFeeVaultProxySource = UpgradeDepositSource{Intent: "KromaMPT: Sequencer Fee Vault Proxy Update"} deployL1BlockMPTSource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Deployment"} updateL1BlockMPTProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Proxy Update"} - - l1BlockMPTDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b50610624806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639e8c496611610097578063e81b2c6d11610066578063e81b2c6d14610281578063ed579ad31461028a578063efc674eb14610293578063f8206140146102a657600080fd5b80639e8c4966146101f8578063b80777ea14610201578063c598591814610221578063e591b2821461024157600080fd5b806364ca23ef116100d357806364ca23ef1461017d57806368d5dca6146101aa5780638381f58a146101db5780638b239f73146101ef57600080fd5b806309bd5a6014610105578063440a5e201461012157806354fd4d501461012b5780635cf2496914610174575b600080fd5b61010e60025481565b6040519081526020015b60405180910390f35b6101296102af565b005b6101676040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b604051610118919061050b565b61010e60015481565b6003546101919067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610118565b6003546101c69068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610118565b6000546101919067ffffffffffffffff1681565b61010e60055481565b61010e60065481565b6000546101919068010000000000000000900467ffffffffffffffff1681565b6003546101c6906c01000000000000000000000000900463ffffffff1681565b61025c73deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b61010e60045481565b61010e60075481565b6101296102a136600461059b565b61030a565b61010e60085481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146102d857633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560085560643560025560843560045560a435600755565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c756573000000000060648201526084015b60405180910390fd5b61271081111561046a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c31426c6f636b3a20746865206d61782076616c7565206f662076616c69646160448201527f746f7220726577617264207363616c617220686173206265656e20657863656560648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016103a9565b6000805467ffffffffffffffff998a1668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009091169a8a169a909a179990991790985560019590955560029390935560038054929095167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009290921691909117909355600492909255600591909155600655600755565b600060208083528351808285015260005b818110156105385785810183015185820160400152820161051c565b8181111561054a576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803567ffffffffffffffff8116811461059657600080fd5b919050565b60008060008060008060008060006101208a8c0312156105ba57600080fd5b6105c38a61057e565b98506105d160208b0161057e565b975060408a0135965060608a013595506105ed60808b0161057e565b989b979a50959894979660a0860135965060c08601359560e081013595506101000135935091505056fea164736f6c634300080f000a") - sequencerFeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3100000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") - baseFeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3100000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") - l1FeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3200000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") ) -func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { +// Bytecode mapping by ChainID +type ChainConfig struct { + protocolVaultRecipient common.Address + l1FeeVaultRecipient common.Address + SequencerFeeVaultDeploymentBytecode []byte + BaseFeeVaultDeploymentBytecode []byte + L1FeeVaultDeploymentBytecode []byte +} + +type DeploymentData struct { + l1BlockMPTDeploymentBytecode []byte + SequencerFeeVaultDeploymentBytecodeWithArg []byte + BaseFeeVaultDeploymentBytecodeWithArg []byte + L1FeeVaultDeploymentBytecodeWithArg []byte +} + +var ChainConfigs = map[string]ChainConfig{ + "901": { // Devnet (Default) + protocolVaultRecipient: common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"), + l1FeeVaultRecipient: common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"), + SequencerFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + BaseFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + L1FeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + }, + "255": { // Kroma + protocolVaultRecipient: common.HexToAddress("0xA03c13C6597a0716D1525b7fDaD2fD95ECb49081"), + l1FeeVaultRecipient: common.HexToAddress("0xA03c13C6597a0716D1525b7fDaD2fD95ECb49081"), + SequencerFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + BaseFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + L1FeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + }, + "2358": { // Kroma Sepolia + protocolVaultRecipient: common.HexToAddress("0xb5d7c1921fdbdea614f264a75ca0be416cf63eb5"), + l1FeeVaultRecipient: common.HexToAddress("0xb5d7c1921fdbdea614f264a75ca0be416cf63eb5"), + SequencerFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + BaseFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + L1FeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + }, + "7791": { // Kroma Holesky + protocolVaultRecipient: common.HexToAddress("0x69487D0D1F969E99D3b68C4F79F0F47375c4Ee4A"), + l1FeeVaultRecipient: common.HexToAddress("0x69487D0D1F969E99D3b68C4F79F0F47375c4Ee4A"), + SequencerFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + BaseFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + L1FeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + }, +} + +// function to get DeploymentData +func getDeploymentData(chainID *big.Int) *DeploymentData { + chainConfig, exists := ChainConfigs[chainID.String()] + if !exists { + chainConfig = ChainConfigs["901"] // Default to devnet configuration + } + + var deploymentData = &DeploymentData{ + l1BlockMPTDeploymentBytecode: common.FromHex("0x608060405234801561001057600080fd5b50610624806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639e8c496611610097578063e81b2c6d11610066578063e81b2c6d14610281578063ed579ad31461028a578063efc674eb14610293578063f8206140146102a657600080fd5b80639e8c4966146101f8578063b80777ea14610201578063c598591814610221578063e591b2821461024157600080fd5b806364ca23ef116100d357806364ca23ef1461017d57806368d5dca6146101aa5780638381f58a146101db5780638b239f73146101ef57600080fd5b806309bd5a6014610105578063440a5e201461012157806354fd4d501461012b5780635cf2496914610174575b600080fd5b61010e60025481565b6040519081526020015b60405180910390f35b6101296102af565b005b6101676040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b604051610118919061050b565b61010e60015481565b6003546101919067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610118565b6003546101c69068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610118565b6000546101919067ffffffffffffffff1681565b61010e60055481565b61010e60065481565b6000546101919068010000000000000000900467ffffffffffffffff1681565b6003546101c6906c01000000000000000000000000900463ffffffff1681565b61025c73deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b61010e60045481565b61010e60075481565b6101296102a136600461059b565b61030a565b61010e60085481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146102d857633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560085560643560025560843560045560a435600755565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c756573000000000060648201526084015b60405180910390fd5b61271081111561046a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c31426c6f636b3a20746865206d61782076616c7565206f662076616c69646160448201527f746f7220726577617264207363616c617220686173206265656e20657863656560648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016103a9565b6000805467ffffffffffffffff998a1668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009091169a8a169a909a179990991790985560019590955560029390935560038054929095167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009290921691909117909355600492909255600591909155600655600755565b600060208083528351808285015260005b818110156105385785810183015185820160400152820161051c565b8181111561054a576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803567ffffffffffffffff8116811461059657600080fd5b919050565b60008060008060008060008060006101208a8c0312156105ba57600080fd5b6105c38a61057e565b98506105d160208b0161057e565b975060408a0135965060608a013595506105ed60808b0161057e565b989b979a50959894979660a0860135965060c08601359560e081013595506101000135935091505056fea164736f6c634300080f000a"), + SequencerFeeVaultDeploymentBytecodeWithArg: createDeploymentBytecode(chainConfig.SequencerFeeVaultDeploymentBytecode, chainConfig.protocolVaultRecipient), + BaseFeeVaultDeploymentBytecodeWithArg: createDeploymentBytecode(chainConfig.BaseFeeVaultDeploymentBytecode, chainConfig.protocolVaultRecipient), + L1FeeVaultDeploymentBytecodeWithArg: createDeploymentBytecode(chainConfig.L1FeeVaultDeploymentBytecode, chainConfig.l1FeeVaultRecipient), + } + return deploymentData +} + +// Function to create deployment bytecode with constructor arguments +func createDeploymentBytecode(bytecode []byte, args ...interface{}) []byte { + // Define ABI arguments for the constructor + addressType, _ := abi.NewType("address", "", nil) + constructorArgs := abi.Arguments{ + { + Type: addressType, + }, + } + encodedArgs, _ := constructorArgs.Pack(args...) + + // Combine bytecode with encoded arguments + deploymentBytecode := append(bytecode, encodedArgs...) + return deploymentBytecode +} + +func KromaMPTNetworkUpgradeTransactions(chainID *big.Int) ([]hexutil.Bytes, error) { + deploymentData := getDeploymentData(chainID) + upgradeTxns := make([]hexutil.Bytes, 0, 8) deployL1BlockTransaction, err := types.NewTx(&types.DepositTx{ @@ -48,7 +125,7 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { Value: big.NewInt(0), Gas: 500_000, IsSystemTransaction: false, - Data: l1BlockMPTDeploymentBytecode, + Data: deploymentData.l1BlockMPTDeploymentBytecode, }).MarshalBinary() if err != nil { return nil, err @@ -64,7 +141,7 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: baseFeeVaultDeploymentBytecode, + Data: deploymentData.BaseFeeVaultDeploymentBytecodeWithArg, }).MarshalBinary() if err != nil { return nil, err @@ -80,7 +157,7 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: l1FeeVaultDeploymentBytecode, + Data: deploymentData.L1FeeVaultDeploymentBytecodeWithArg, }).MarshalBinary() if err != nil { return nil, err @@ -96,7 +173,7 @@ func KromaMPTNetworkUpgradeTransactions() ([]hexutil.Bytes, error) { Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: sequencerFeeVaultDeploymentBytecode, + Data: deploymentData.SequencerFeeVaultDeploymentBytecodeWithArg, }).MarshalBinary() if err != nil { return nil, err diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go index d557654df..9d87c9e48 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go @@ -1,8 +1,12 @@ package derive import ( + "encoding/hex" + "fmt" + "math/big" "testing" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/stretchr/testify/require" "github.com/ethereum-optimism/optimism/op-bindings/predeploys" @@ -53,67 +57,175 @@ func TestMPTSourcesMatchSpec(t *testing.T) { } func TestMPTNetworkTransactions(t *testing.T) { - upgradeTxns, err := KromaMPTNetworkUpgradeTransactions() + // Test chainId-specific configurations + tests := []struct { + name string + chainId *big.Int + }{ + { + name: "Devnet Configuration", + chainId: big.NewInt(901), + }, + { + name: "Kroma Configuration", + chainId: big.NewInt(255), + }, + { + name: "Kroma Sepolia Configuration", + chainId: big.NewInt(2358), + }, + { + name: "Kroma Holesky Configuration", + chainId: big.NewInt(7791), + }, + { + name: "Unsupported Chain Defaults to Devnet", + chainId: big.NewInt(9999), + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(tt.chainId) + deploymentData := getDeploymentData(tt.chainId) + require.NoError(t, err) + require.Len(t, upgradeTxns, 8) + + deployBaseFeeVaultSender, deployBaseFeeVault := toDepositTxn(t, upgradeTxns[1]) + require.Equal(t, deployBaseFeeVaultSender, BaseFeeVaultDeployerAddress) + require.Equal(t, deployBaseFeeVaultSource.SourceHash(), deployBaseFeeVault.SourceHash()) + require.Nil(t, deployBaseFeeVault.To()) + require.Equal(t, uint64(1_000_000), deployBaseFeeVault.Gas()) + require.Equal(t, "0x"+hex.EncodeToString(deploymentData.BaseFeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deployBaseFeeVault.Data()).String()) + + deployL1FeeVaultSender, deployL1FeeVault := toDepositTxn(t, upgradeTxns[2]) + require.Equal(t, deployL1FeeVaultSender, L1FeeVaultDeployerAddress) + require.Equal(t, deployL1FeeVaultSource.SourceHash(), deployL1FeeVault.SourceHash()) + require.Nil(t, deployL1FeeVault.To()) + require.Equal(t, uint64(1_000_000), deployL1FeeVault.Gas()) + require.Equal(t, "0x"+hex.EncodeToString(deploymentData.L1FeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deployL1FeeVault.Data()).String()) + + deploySequencerFeeVaultSender, deploySequencerFeeVault := toDepositTxn(t, upgradeTxns[3]) + require.Equal(t, deploySequencerFeeVaultSender, SequencerFeeVaultDeployerAddress) + require.Equal(t, deploySequencerFeeVaultSource.SourceHash(), deploySequencerFeeVault.SourceHash()) + require.Nil(t, deploySequencerFeeVault.To()) + require.Equal(t, uint64(1_000_000), deploySequencerFeeVault.Gas()) + require.Equal(t, "0x"+hex.EncodeToString(deploymentData.SequencerFeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) + }) + } + + // Test chainId-independent configurations + t.Run("ChainId-Independent Configurations", func(t *testing.T) { + chainID := big.NewInt(1) + deploymentData := getDeploymentData(chainID) + upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(chainID) // Use default configuration + require.NoError(t, err) + require.Len(t, upgradeTxns, 8) + + deployL1BlockSender, deployL1Block := toDepositTxn(t, upgradeTxns[0]) + require.Equal(t, deployL1BlockSender, L1BlockMPTDeployerAddress) + require.Equal(t, deployL1BlockMPTSource.SourceHash(), deployL1Block.SourceHash()) + require.Nil(t, deployL1Block.To()) + require.Equal(t, uint64(500_000), deployL1Block.Gas()) + require.Equal(t, hexutil.Bytes(deploymentData.l1BlockMPTDeploymentBytecode).String(), hexutil.Bytes(deployL1Block.Data()).String()) + + updateL1BlockProxySender, updateL1BlockProxy := toDepositTxn(t, upgradeTxns[4]) + require.Equal(t, updateL1BlockProxySender, common.Address{}) + require.Equal(t, updateL1BlockMPTProxySource.SourceHash(), updateL1BlockProxy.SourceHash()) + require.NotNil(t, updateL1BlockProxy.To()) + require.Equal(t, *updateL1BlockProxy.To(), predeploys.L1BlockAddr) + require.Equal(t, uint64(50_000), updateL1BlockProxy.Gas()) + require.Equal(t, common.FromHex("0x3659cfe6000000000000000000000000cd7467a8926d13f8b41ea035ff3761326c822bad"), updateL1BlockProxy.Data()) + + updateBaseFeeVaultProxySender, updateBaseFeeVaultProxy := toDepositTxn(t, upgradeTxns[5]) + require.Equal(t, updateBaseFeeVaultProxySender, common.Address{}) + require.Equal(t, updateBaseFeeVaultProxySource.SourceHash(), updateBaseFeeVaultProxy.SourceHash()) + require.NotNil(t, updateBaseFeeVaultProxy.To()) + require.Equal(t, *updateBaseFeeVaultProxy.To(), predeploys.BaseFeeVaultAddr) + require.Equal(t, uint64(50_000), updateBaseFeeVaultProxy.Gas()) + require.Equal(t, common.FromHex("3659cfe6000000000000000000000000db78bab44d9632e68348659dd47b4806ba276d89"), updateBaseFeeVaultProxy.Data()) + }) +} + +func TestKromaMPTNetworkUpgradeTransactions(t *testing.T) { + tests := []struct { + name string + chainId *big.Int + expectedCode ChainConfig + }{ + { + name: "Mainnet Configuration", + chainId: big.NewInt(1), + expectedCode: ChainConfigs["1"], + }, + { + name: "Goerli Configuration", + chainId: big.NewInt(5), + expectedCode: ChainConfigs["5"], + }, + { + name: "Unsupported Chain Defaults to Devnet", + chainId: big.NewInt(9999), + expectedCode: ChainConfigs["1"], + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(tt.chainId) + require.NoError(t, err, "expected no error for chain ID %d", tt.chainId) + require.NotNil(t, upgradeTxns, "expected transactions for chain ID %d", tt.chainId) + + // Validate the bytecode in the transactions + require.Equal(t, tt.expectedCode.BaseFeeVaultDeploymentBytecode, ChainConfigs[tt.chainId.String()].BaseFeeVaultDeploymentBytecode, "BaseFeeVaultBytecode mismatch for chain ID %d", tt.chainId) + require.Equal(t, tt.expectedCode.L1FeeVaultDeploymentBytecode, ChainConfigs[tt.chainId.String()].L1FeeVaultDeploymentBytecode, "L1FeeVaultBytecode mismatch for chain ID %d", tt.chainId) + require.Equal(t, tt.expectedCode.SequencerFeeVaultDeploymentBytecode, ChainConfigs[tt.chainId.String()].SequencerFeeVaultDeploymentBytecode, "SequencerFeeVaultBytecode mismatch for chain ID %d", tt.chainId) + }) + } +} + +func TestCreateDeploymentBytecode(t *testing.T) { + // example deployment bytecode, constructor argument + bytecode := "0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a" + constructorArg := "0xA03c13C6597a0716D1525b7fDaD2fD95ECb49081" + + // expected ABI-encoded argument + expectedEncodedArg := "000000000000000000000000a03c13c6597a0716d1525b7fdad2fd95ecb49081" + encodedArg, err := encodeConstructorArg(constructorArg) require.NoError(t, err) - require.Len(t, upgradeTxns, 8) - - deployL1BlockSender, deployL1Block := toDepositTxn(t, upgradeTxns[0]) - require.Equal(t, deployL1BlockSender, L1BlockMPTDeployerAddress) - require.Equal(t, deployL1BlockMPTSource.SourceHash(), deployL1Block.SourceHash()) - require.Nil(t, deployL1Block.To()) - require.Equal(t, uint64(500_000), deployL1Block.Gas()) - require.Equal(t, hexutil.Bytes(l1BlockMPTDeploymentBytecode).String(), hexutil.Bytes(deployL1Block.Data()).String()) - - deployBaseFeeVaultSender, deployBaseFeeVault := toDepositTxn(t, upgradeTxns[1]) - require.Equal(t, deployBaseFeeVaultSender, BaseFeeVaultDeployerAddress) - require.Equal(t, deployBaseFeeVaultSource.SourceHash(), deployBaseFeeVault.SourceHash()) - require.Nil(t, deployBaseFeeVault.To()) - require.Equal(t, uint64(1_000_000), deployBaseFeeVault.Gas()) - require.Equal(t, hexutil.Bytes(baseFeeVaultDeploymentBytecode).String(), hexutil.Bytes(deployBaseFeeVault.Data()).String()) - - deployL1FeeVaultSender, deployL1FeeVault := toDepositTxn(t, upgradeTxns[2]) - require.Equal(t, deployL1FeeVaultSender, L1FeeVaultDeployerAddress) - require.Equal(t, deployL1FeeVaultSource.SourceHash(), deployL1FeeVault.SourceHash()) - require.Nil(t, deployL1FeeVault.To()) - require.Equal(t, uint64(1_000_000), deployL1FeeVault.Gas()) - require.Equal(t, hexutil.Bytes(l1FeeVaultDeploymentBytecode).String(), hexutil.Bytes(deployL1FeeVault.Data()).String()) - - deploySequencerFeeVaultSender, deploySequencerFeeVault := toDepositTxn(t, upgradeTxns[3]) - require.Equal(t, deploySequencerFeeVaultSender, SequencerFeeVaultDeployerAddress) - require.Equal(t, deploySequencerFeeVaultSource.SourceHash(), deploySequencerFeeVault.SourceHash()) - require.Nil(t, deploySequencerFeeVault.To()) - require.Equal(t, uint64(1_000_000), deploySequencerFeeVault.Gas()) - require.Equal(t, hexutil.Bytes(sequencerFeeVaultDeploymentBytecode).String(), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) - - updateL1BlockProxySender, updateL1BlockProxy := toDepositTxn(t, upgradeTxns[4]) - require.Equal(t, updateL1BlockProxySender, common.Address{}) - require.Equal(t, updateL1BlockMPTProxySource.SourceHash(), updateL1BlockProxy.SourceHash()) - require.NotNil(t, updateL1BlockProxy.To()) - require.Equal(t, *updateL1BlockProxy.To(), predeploys.L1BlockAddr) - require.Equal(t, uint64(50_000), updateL1BlockProxy.Gas()) - require.Equal(t, common.FromHex("0x3659cfe6000000000000000000000000cd7467a8926d13f8b41ea035ff3761326c822bad"), updateL1BlockProxy.Data()) - - updateBaseFeeVaultProxySender, updateBaseFeeVaultProxy := toDepositTxn(t, upgradeTxns[5]) - require.Equal(t, updateBaseFeeVaultProxySender, common.Address{}) - require.Equal(t, updateBaseFeeVaultProxySource.SourceHash(), updateBaseFeeVaultProxy.SourceHash()) - require.NotNil(t, updateBaseFeeVaultProxy.To()) - require.Equal(t, *updateBaseFeeVaultProxy.To(), predeploys.BaseFeeVaultAddr) - require.Equal(t, uint64(50_000), updateBaseFeeVaultProxy.Gas()) - require.Equal(t, common.FromHex("3659cfe6000000000000000000000000db78bab44d9632e68348659dd47b4806ba276d89"), updateBaseFeeVaultProxy.Data()) - - updateL1FeeVaultProxySender, updateL1FeeVaultProxy := toDepositTxn(t, upgradeTxns[6]) - require.Equal(t, updateL1FeeVaultProxySender, common.Address{}) - require.Equal(t, updateL1FeeVaultProxySource.SourceHash(), updateL1FeeVaultProxy.SourceHash()) - require.NotNil(t, updateL1FeeVaultProxy.To()) - require.Equal(t, *updateL1FeeVaultProxy.To(), predeploys.L1FeeVaultAddr) - require.Equal(t, uint64(50_000), updateL1FeeVaultProxy.Gas()) - require.Equal(t, common.FromHex("3659cfe6000000000000000000000000d86e1a7c380f398bda3d598ee65c891ce5c3c8f0"), updateL1FeeVaultProxy.Data()) - - updateSequencerFeeVaultProxySender, updateSequencerFeeVaultProxy := toDepositTxn(t, upgradeTxns[7]) - require.Equal(t, updateSequencerFeeVaultProxySender, common.Address{}) - require.Equal(t, updateSequencerFeeVaultProxySource.SourceHash(), updateSequencerFeeVaultProxy.SourceHash()) - require.NotNil(t, updateSequencerFeeVaultProxy.To()) - require.Equal(t, *updateSequencerFeeVaultProxy.To(), predeploys.SequencerFeeVaultAddr) - require.Equal(t, uint64(50_000), updateSequencerFeeVaultProxy.Gas()) - require.Equal(t, common.FromHex("3659cfe600000000000000000000000013963c74d9c62d31ce3fcec0d46f6430a74ea79e"), updateSequencerFeeVaultProxy.Data()) + require.Equal(t, expectedEncodedArg, encodedArg) + + // create deployment bytecode + deploymentBytecode := createDeploymentBytecode(common.FromHex(bytecode), common.HexToAddress(constructorArg)) + + // Validate deployment bytecode + expectedDeploymentBytecodeHex := bytecode + expectedEncodedArg + actualDeploymentBytecodeHex := "0x" + hex.EncodeToString(deploymentBytecode) + require.Equal(t, expectedDeploymentBytecodeHex, actualDeploymentBytecodeHex, "deployment bytecode mismatch") + + // Validate the split between base bytecode and constructor argument + actualBytecode := actualDeploymentBytecodeHex[:len(bytecode)] + actualArg := actualDeploymentBytecodeHex[len(bytecode):] + require.Equal(t, bytecode, actualBytecode, "base bytecode invalid") + require.Equal(t, expectedEncodedArg, actualArg, "constructor argument invalid") +} + +// Function to encode constructor arguments +func encodeConstructorArg(arg string) (string, error) { + // Define ABI argument as an address type + addressType, _ := abi.NewType("address", "", nil) + constructorArgs := abi.Arguments{ + { + Type: addressType, + }, + } + + // Pack the argument + encodedArgs, err := constructorArgs.Pack(common.HexToAddress(arg)) + if err != nil { + return "", fmt.Errorf("failed to encode constructor argument: %w", err) + } + + // Return encoded arguments as a hex string + return hex.EncodeToString(encodedArgs), nil } From 0de6ec0796c2489dcfa60ee84e37e96239f4d918 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Fri, 13 Dec 2024 21:05:15 +0900 Subject: [PATCH 13/14] chore: adjust PR reviews - 5 --- .../derive/kromampt_upgrade_transactions.go | 185 +++++++++++------- .../kromampt_upgrade_transactions_test.go | 112 +++-------- 2 files changed, 146 insertions(+), 151 deletions(-) diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions.go b/op-node/rollup/derive/kromampt_upgrade_transactions.go index ef968d4e0..80e2cbf6d 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions.go @@ -1,17 +1,24 @@ package derive import ( - "github.com/ethereum/go-ethereum/accounts/abi" + "fmt" "math/big" + "strconv" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" oppredeploys "github.com/ethereum-optimism/optimism/op-bindings/predeploys" ) +const ( + KromaLocalDevnetChainID = 901 +) + var ( L1BlockMPTDeployerAddress = common.HexToAddress("0x2551000000000000000000000000000000000000") BaseFeeVaultDeployerAddress = common.HexToAddress("0x2551000000000000000000000000000000000001") @@ -31,89 +38,133 @@ var ( updateSequencerFeeVaultProxySource = UpgradeDepositSource{Intent: "KromaMPT: Sequencer Fee Vault Proxy Update"} deployL1BlockMPTSource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Deployment"} updateL1BlockMPTProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Proxy Update"} -) -// Bytecode mapping by ChainID -type ChainConfig struct { - protocolVaultRecipient common.Address - l1FeeVaultRecipient common.Address - SequencerFeeVaultDeploymentBytecode []byte - BaseFeeVaultDeploymentBytecode []byte - L1FeeVaultDeploymentBytecode []byte -} - -type DeploymentData struct { - l1BlockMPTDeploymentBytecode []byte - SequencerFeeVaultDeploymentBytecodeWithArg []byte - BaseFeeVaultDeploymentBytecodeWithArg []byte - L1FeeVaultDeploymentBytecodeWithArg []byte -} + l1BlockMPTDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b50610624806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639e8c496611610097578063e81b2c6d11610066578063e81b2c6d14610281578063ed579ad31461028a578063efc674eb14610293578063f8206140146102a657600080fd5b80639e8c4966146101f8578063b80777ea14610201578063c598591814610221578063e591b2821461024157600080fd5b806364ca23ef116100d357806364ca23ef1461017d57806368d5dca6146101aa5780638381f58a146101db5780638b239f73146101ef57600080fd5b806309bd5a6014610105578063440a5e201461012157806354fd4d501461012b5780635cf2496914610174575b600080fd5b61010e60025481565b6040519081526020015b60405180910390f35b6101296102af565b005b6101676040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b604051610118919061050b565b61010e60015481565b6003546101919067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610118565b6003546101c69068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610118565b6000546101919067ffffffffffffffff1681565b61010e60055481565b61010e60065481565b6000546101919068010000000000000000900467ffffffffffffffff1681565b6003546101c6906c01000000000000000000000000900463ffffffff1681565b61025c73deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b61010e60045481565b61010e60075481565b6101296102a136600461059b565b61030a565b61010e60085481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146102d857633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560085560643560025560843560045560a435600755565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c756573000000000060648201526084015b60405180910390fd5b61271081111561046a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c31426c6f636b3a20746865206d61782076616c7565206f662076616c69646160448201527f746f7220726577617264207363616c617220686173206265656e20657863656560648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016103a9565b6000805467ffffffffffffffff998a1668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009091169a8a169a909a179990991790985560019590955560029390935560038054929095167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009290921691909117909355600492909255600591909155600655600755565b600060208083528351808285015260005b818110156105385785810183015185820160400152820161051c565b8181111561054a576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803567ffffffffffffffff8116811461059657600080fd5b919050565b60008060008060008060008060006101208a8c0312156105ba57600080fd5b6105c38a61057e565b98506105d160208b0161057e565b975060408a0135965060608a013595506105ed60808b0161057e565b989b979a50959894979660a0860135965060c08601359560e081013595506101000135935091505056fea164736f6c634300080f000a") + sequencerFeeVaultDeploymentBytecode = common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a") + baseFeeVaultDeploymentBytecode = common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a") + l1FeeVaultDeploymentBytecode = common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a") +) var ChainConfigs = map[string]ChainConfig{ - "901": { // Devnet (Default) - protocolVaultRecipient: common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"), - l1FeeVaultRecipient: common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"), - SequencerFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), - BaseFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), - L1FeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + strconv.Itoa(KromaLocalDevnetChainID): { // Local devnet (Default) + protocolVaultRecipient: common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"), + l1FeeVaultRecipient: common.HexToAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"), }, - "255": { // Kroma - protocolVaultRecipient: common.HexToAddress("0xA03c13C6597a0716D1525b7fDaD2fD95ECb49081"), - l1FeeVaultRecipient: common.HexToAddress("0xA03c13C6597a0716D1525b7fDaD2fD95ECb49081"), - SequencerFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), - BaseFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), - L1FeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + strconv.Itoa(params.KromaMainnetChainID): { // Kroma + protocolVaultRecipient: common.HexToAddress("0xA03c13C6597a0716D1525b7fDaD2fD95ECb49081"), + l1FeeVaultRecipient: common.HexToAddress("0xA03c13C6597a0716D1525b7fDaD2fD95ECb49081"), }, - "2358": { // Kroma Sepolia - protocolVaultRecipient: common.HexToAddress("0xb5d7c1921fdbdea614f264a75ca0be416cf63eb5"), - l1FeeVaultRecipient: common.HexToAddress("0xb5d7c1921fdbdea614f264a75ca0be416cf63eb5"), - SequencerFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), - BaseFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), - L1FeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + strconv.Itoa(params.KromaSepoliaChainID): { // Kroma Sepolia + protocolVaultRecipient: common.HexToAddress("0xb5d7c1921fdbdea614f264a75ca0be416cf63eb5"), + l1FeeVaultRecipient: common.HexToAddress("0xb5d7c1921fdbdea614f264a75ca0be416cf63eb5"), }, - "7791": { // Kroma Holesky - protocolVaultRecipient: common.HexToAddress("0x69487D0D1F969E99D3b68C4F79F0F47375c4Ee4A"), - l1FeeVaultRecipient: common.HexToAddress("0x69487D0D1F969E99D3b68C4F79F0F47375c4Ee4A"), - SequencerFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), - BaseFeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), - L1FeeVaultDeploymentBytecode: common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"), + strconv.Itoa(params.KromaDevnetChainID): { // Kroma Holesky + protocolVaultRecipient: common.HexToAddress("0x69487D0D1F969E99D3b68C4F79F0F47375c4Ee4A"), + l1FeeVaultRecipient: common.HexToAddress("0x69487D0D1F969E99D3b68C4F79F0F47375c4Ee4A"), }, } -// function to get DeploymentData -func getDeploymentData(chainID *big.Int) *DeploymentData { +// ChainConfig constructor arguments mapping by ChainID +type ChainConfig struct { + protocolVaultRecipient common.Address + l1FeeVaultRecipient common.Address +} + +// DeploymentData deployment bytecode information including constructor arguments +type DeploymentData struct { + sequencerFeeVaultDeploymentBytecodeWithArg []byte + baseFeeVaultDeploymentBytecodeWithArg []byte + l1FeeVaultDeploymentBytecodeWithArg []byte +} + +// getDeploymentData retrieves data that is necessary for deployments of predeploy contracts +// at the previous block of Kroma MPT upgrade. +func getDeploymentData(chainID *big.Int) (*DeploymentData, error) { chainConfig, exists := ChainConfigs[chainID.String()] if !exists { - chainConfig = ChainConfigs["901"] // Default to devnet configuration + chainConfig = ChainConfigs[strconv.Itoa(KromaLocalDevnetChainID)] // Default to local devnet configuration } - var deploymentData = &DeploymentData{ - l1BlockMPTDeploymentBytecode: common.FromHex("0x608060405234801561001057600080fd5b50610624806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639e8c496611610097578063e81b2c6d11610066578063e81b2c6d14610281578063ed579ad31461028a578063efc674eb14610293578063f8206140146102a657600080fd5b80639e8c4966146101f8578063b80777ea14610201578063c598591814610221578063e591b2821461024157600080fd5b806364ca23ef116100d357806364ca23ef1461017d57806368d5dca6146101aa5780638381f58a146101db5780638b239f73146101ef57600080fd5b806309bd5a6014610105578063440a5e201461012157806354fd4d501461012b5780635cf2496914610174575b600080fd5b61010e60025481565b6040519081526020015b60405180910390f35b6101296102af565b005b6101676040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b604051610118919061050b565b61010e60015481565b6003546101919067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610118565b6003546101c69068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610118565b6000546101919067ffffffffffffffff1681565b61010e60055481565b61010e60065481565b6000546101919068010000000000000000900467ffffffffffffffff1681565b6003546101c6906c01000000000000000000000000900463ffffffff1681565b61025c73deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b61010e60045481565b61010e60075481565b6101296102a136600461059b565b61030a565b61010e60085481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146102d857633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560085560643560025560843560045560a435600755565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c756573000000000060648201526084015b60405180910390fd5b61271081111561046a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c31426c6f636b3a20746865206d61782076616c7565206f662076616c69646160448201527f746f7220726577617264207363616c617220686173206265656e20657863656560648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016103a9565b6000805467ffffffffffffffff998a1668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009091169a8a169a909a179990991790985560019590955560029390935560038054929095167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009290921691909117909355600492909255600591909155600655600755565b600060208083528351808285015260005b818110156105385785810183015185820160400152820161051c565b8181111561054a576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803567ffffffffffffffff8116811461059657600080fd5b919050565b60008060008060008060008060006101208a8c0312156105ba57600080fd5b6105c38a61057e565b98506105d160208b0161057e565b975060408a0135965060608a013595506105ed60808b0161057e565b989b979a50959894979660a0860135965060c08601359560e081013595506101000135935091505056fea164736f6c634300080f000a"), - SequencerFeeVaultDeploymentBytecodeWithArg: createDeploymentBytecode(chainConfig.SequencerFeeVaultDeploymentBytecode, chainConfig.protocolVaultRecipient), - BaseFeeVaultDeploymentBytecodeWithArg: createDeploymentBytecode(chainConfig.BaseFeeVaultDeploymentBytecode, chainConfig.protocolVaultRecipient), - L1FeeVaultDeploymentBytecodeWithArg: createDeploymentBytecode(chainConfig.L1FeeVaultDeploymentBytecode, chainConfig.l1FeeVaultRecipient), + sequencerBytecode, err := createDeploymentBytecode(sequencerFeeVaultDeploymentBytecode, chainConfig.protocolVaultRecipient) + if err != nil { + return nil, fmt.Errorf("failed to create sequencerFeeVault deployment bytecode: %w", err) } - return deploymentData -} -// Function to create deployment bytecode with constructor arguments -func createDeploymentBytecode(bytecode []byte, args ...interface{}) []byte { - // Define ABI arguments for the constructor - addressType, _ := abi.NewType("address", "", nil) - constructorArgs := abi.Arguments{ - { - Type: addressType, - }, + baseFeeBytecode, err := createDeploymentBytecode(baseFeeVaultDeploymentBytecode, chainConfig.protocolVaultRecipient) + if err != nil { + return nil, fmt.Errorf("failed to create baseFeeVault deployment bytecode: %w", err) } - encodedArgs, _ := constructorArgs.Pack(args...) - // Combine bytecode with encoded arguments + l1FeeBytecode, err := createDeploymentBytecode(l1FeeVaultDeploymentBytecode, chainConfig.l1FeeVaultRecipient) + if err != nil { + return nil, fmt.Errorf("failed to create l1FeeVault deployment bytecode: %w", err) + } + + return &DeploymentData{ + sequencerFeeVaultDeploymentBytecodeWithArg: sequencerBytecode, + baseFeeVaultDeploymentBytecodeWithArg: baseFeeBytecode, + l1FeeVaultDeploymentBytecodeWithArg: l1FeeBytecode, + }, nil +} + +// createDeploymentBytecode returns the result, including information about the constructor arguments +// in the deploymentByteCode. +func createDeploymentBytecode(bytecode []byte, args ...interface{}) ([]byte, error) { + encodedArgs, err := encodeConstructorArg(args...) + if err != nil { + return nil, err + } + // combine bytecode with encoded arguments deploymentBytecode := append(bytecode, encodedArgs...) - return deploymentBytecode + return deploymentBytecode, nil +} + +func encodeConstructorArg(args ...interface{}) ([]byte, error) { + // define ABI arguments dynamically based on the types of args + constructorArgs := abi.Arguments{} + + for _, arg := range args { + var argType abi.Type + var err error + + switch v := arg.(type) { + case common.Address: + argType, err = abi.NewType("address", "", nil) + case uint64: + argType, err = abi.NewType("uint64", "", nil) + case *big.Int: + argType, err = abi.NewType("uint256", "", nil) + case []byte: + argType, err = abi.NewType("bytes", "", nil) + case bool: + argType, err = abi.NewType("bool", "", nil) + default: + return nil, fmt.Errorf("unsupported argument type: %T", v) + } + + if err != nil { + return nil, fmt.Errorf("failed to create ABI type for argument: %w", err) + } + + constructorArgs = append(constructorArgs, abi.Argument{ + Type: argType, + }) + } + + // pack the arguments into ABI-encoded bytes + encodedArgs, err := constructorArgs.Pack(args...) + if err != nil { + return nil, fmt.Errorf("failed to encode constructor arguments: %w", err) + } + + return encodedArgs, nil } func KromaMPTNetworkUpgradeTransactions(chainID *big.Int) ([]hexutil.Bytes, error) { - deploymentData := getDeploymentData(chainID) + deploymentData, err := getDeploymentData(chainID) + if err != nil { + return nil, err + } upgradeTxns := make([]hexutil.Bytes, 0, 8) @@ -125,7 +176,7 @@ func KromaMPTNetworkUpgradeTransactions(chainID *big.Int) ([]hexutil.Bytes, erro Value: big.NewInt(0), Gas: 500_000, IsSystemTransaction: false, - Data: deploymentData.l1BlockMPTDeploymentBytecode, + Data: l1BlockMPTDeploymentBytecode, }).MarshalBinary() if err != nil { return nil, err @@ -141,7 +192,7 @@ func KromaMPTNetworkUpgradeTransactions(chainID *big.Int) ([]hexutil.Bytes, erro Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: deploymentData.BaseFeeVaultDeploymentBytecodeWithArg, + Data: deploymentData.baseFeeVaultDeploymentBytecodeWithArg, }).MarshalBinary() if err != nil { return nil, err @@ -157,7 +208,7 @@ func KromaMPTNetworkUpgradeTransactions(chainID *big.Int) ([]hexutil.Bytes, erro Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: deploymentData.L1FeeVaultDeploymentBytecodeWithArg, + Data: deploymentData.l1FeeVaultDeploymentBytecodeWithArg, }).MarshalBinary() if err != nil { return nil, err @@ -173,7 +224,7 @@ func KromaMPTNetworkUpgradeTransactions(chainID *big.Int) ([]hexutil.Bytes, erro Value: big.NewInt(0), Gas: 1_000_000, IsSystemTransaction: false, - Data: deploymentData.SequencerFeeVaultDeploymentBytecodeWithArg, + Data: deploymentData.sequencerFeeVaultDeploymentBytecodeWithArg, }).MarshalBinary() if err != nil { return nil, err diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go index 9d87c9e48..46a6be48e 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go @@ -6,12 +6,12 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/stretchr/testify/require" "github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/params" ) func TestMPTSourcesMatchSpec(t *testing.T) { @@ -57,29 +57,29 @@ func TestMPTSourcesMatchSpec(t *testing.T) { } func TestMPTNetworkTransactions(t *testing.T) { - // Test chainId-specific configurations + // test chainId-specific configurations tests := []struct { name string chainId *big.Int }{ { - name: "Devnet Configuration", - chainId: big.NewInt(901), + name: "Local devnet configuration", + chainId: big.NewInt(KromaLocalDevnetChainID), }, { - name: "Kroma Configuration", - chainId: big.NewInt(255), + name: "Kroma configuration", + chainId: big.NewInt(params.KromaMainnetChainID), }, { - name: "Kroma Sepolia Configuration", - chainId: big.NewInt(2358), + name: "Kroma Sepolia configuration", + chainId: big.NewInt(params.KromaSepoliaChainID), }, { - name: "Kroma Holesky Configuration", - chainId: big.NewInt(7791), + name: "Kroma Holesky configuration", + chainId: big.NewInt(params.KromaDevnetChainID), }, { - name: "Unsupported Chain Defaults to Devnet", + name: "Unsupported chain. Defaults to local devnet", chainId: big.NewInt(9999), }, } @@ -87,7 +87,8 @@ func TestMPTNetworkTransactions(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(tt.chainId) - deploymentData := getDeploymentData(tt.chainId) + require.NoError(t, err) + deploymentData, err := getDeploymentData(tt.chainId) require.NoError(t, err) require.Len(t, upgradeTxns, 8) @@ -96,28 +97,27 @@ func TestMPTNetworkTransactions(t *testing.T) { require.Equal(t, deployBaseFeeVaultSource.SourceHash(), deployBaseFeeVault.SourceHash()) require.Nil(t, deployBaseFeeVault.To()) require.Equal(t, uint64(1_000_000), deployBaseFeeVault.Gas()) - require.Equal(t, "0x"+hex.EncodeToString(deploymentData.BaseFeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deployBaseFeeVault.Data()).String()) + require.Equal(t, fmt.Sprintf("0x%x", deploymentData.baseFeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deployBaseFeeVault.Data()).String()) deployL1FeeVaultSender, deployL1FeeVault := toDepositTxn(t, upgradeTxns[2]) require.Equal(t, deployL1FeeVaultSender, L1FeeVaultDeployerAddress) require.Equal(t, deployL1FeeVaultSource.SourceHash(), deployL1FeeVault.SourceHash()) require.Nil(t, deployL1FeeVault.To()) require.Equal(t, uint64(1_000_000), deployL1FeeVault.Gas()) - require.Equal(t, "0x"+hex.EncodeToString(deploymentData.L1FeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deployL1FeeVault.Data()).String()) + require.Equal(t, fmt.Sprintf("0x%x", deploymentData.l1FeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deployL1FeeVault.Data()).String()) deploySequencerFeeVaultSender, deploySequencerFeeVault := toDepositTxn(t, upgradeTxns[3]) require.Equal(t, deploySequencerFeeVaultSender, SequencerFeeVaultDeployerAddress) require.Equal(t, deploySequencerFeeVaultSource.SourceHash(), deploySequencerFeeVault.SourceHash()) require.Nil(t, deploySequencerFeeVault.To()) require.Equal(t, uint64(1_000_000), deploySequencerFeeVault.Gas()) - require.Equal(t, "0x"+hex.EncodeToString(deploymentData.SequencerFeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) + require.Equal(t, fmt.Sprintf("0x%x", deploymentData.sequencerFeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) }) } - // Test chainId-independent configurations + // test chainId-independent configurations t.Run("ChainId-Independent Configurations", func(t *testing.T) { - chainID := big.NewInt(1) - deploymentData := getDeploymentData(chainID) + chainID := big.NewInt(KromaLocalDevnetChainID) upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(chainID) // Use default configuration require.NoError(t, err) require.Len(t, upgradeTxns, 8) @@ -127,7 +127,7 @@ func TestMPTNetworkTransactions(t *testing.T) { require.Equal(t, deployL1BlockMPTSource.SourceHash(), deployL1Block.SourceHash()) require.Nil(t, deployL1Block.To()) require.Equal(t, uint64(500_000), deployL1Block.Gas()) - require.Equal(t, hexutil.Bytes(deploymentData.l1BlockMPTDeploymentBytecode).String(), hexutil.Bytes(deployL1Block.Data()).String()) + require.Equal(t, hexutil.Bytes(l1BlockMPTDeploymentBytecode).String(), hexutil.Bytes(deployL1Block.Data()).String()) updateL1BlockProxySender, updateL1BlockProxy := toDepositTxn(t, upgradeTxns[4]) require.Equal(t, updateL1BlockProxySender, common.Address{}) @@ -147,85 +147,29 @@ func TestMPTNetworkTransactions(t *testing.T) { }) } -func TestKromaMPTNetworkUpgradeTransactions(t *testing.T) { - tests := []struct { - name string - chainId *big.Int - expectedCode ChainConfig - }{ - { - name: "Mainnet Configuration", - chainId: big.NewInt(1), - expectedCode: ChainConfigs["1"], - }, - { - name: "Goerli Configuration", - chainId: big.NewInt(5), - expectedCode: ChainConfigs["5"], - }, - { - name: "Unsupported Chain Defaults to Devnet", - chainId: big.NewInt(9999), - expectedCode: ChainConfigs["1"], - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(tt.chainId) - require.NoError(t, err, "expected no error for chain ID %d", tt.chainId) - require.NotNil(t, upgradeTxns, "expected transactions for chain ID %d", tt.chainId) - - // Validate the bytecode in the transactions - require.Equal(t, tt.expectedCode.BaseFeeVaultDeploymentBytecode, ChainConfigs[tt.chainId.String()].BaseFeeVaultDeploymentBytecode, "BaseFeeVaultBytecode mismatch for chain ID %d", tt.chainId) - require.Equal(t, tt.expectedCode.L1FeeVaultDeploymentBytecode, ChainConfigs[tt.chainId.String()].L1FeeVaultDeploymentBytecode, "L1FeeVaultBytecode mismatch for chain ID %d", tt.chainId) - require.Equal(t, tt.expectedCode.SequencerFeeVaultDeploymentBytecode, ChainConfigs[tt.chainId.String()].SequencerFeeVaultDeploymentBytecode, "SequencerFeeVaultBytecode mismatch for chain ID %d", tt.chainId) - }) - } -} - func TestCreateDeploymentBytecode(t *testing.T) { // example deployment bytecode, constructor argument - bytecode := "0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a" - constructorArg := "0xA03c13C6597a0716D1525b7fDaD2fD95ECb49081" + bytecode := fmt.Sprintf("0x%x", "example bytecode") + constructorArg := common.HexToAddress("0x1234") // expected ABI-encoded argument - expectedEncodedArg := "000000000000000000000000a03c13c6597a0716d1525b7fdad2fd95ecb49081" + expectedEncodedArg := "0000000000000000000000000000000000000000000000000000000000001234" encodedArg, err := encodeConstructorArg(constructorArg) require.NoError(t, err) - require.Equal(t, expectedEncodedArg, encodedArg) + require.Equal(t, expectedEncodedArg, hex.EncodeToString(encodedArg)) // create deployment bytecode - deploymentBytecode := createDeploymentBytecode(common.FromHex(bytecode), common.HexToAddress(constructorArg)) + deploymentBytecode, err := createDeploymentBytecode(common.FromHex(bytecode), constructorArg) + require.NoError(t, err) - // Validate deployment bytecode + // validate deployment bytecode expectedDeploymentBytecodeHex := bytecode + expectedEncodedArg - actualDeploymentBytecodeHex := "0x" + hex.EncodeToString(deploymentBytecode) + actualDeploymentBytecodeHex := fmt.Sprintf("0x%s", hex.EncodeToString(deploymentBytecode)) require.Equal(t, expectedDeploymentBytecodeHex, actualDeploymentBytecodeHex, "deployment bytecode mismatch") - // Validate the split between base bytecode and constructor argument + // validate the split between base bytecode and constructor argument actualBytecode := actualDeploymentBytecodeHex[:len(bytecode)] actualArg := actualDeploymentBytecodeHex[len(bytecode):] require.Equal(t, bytecode, actualBytecode, "base bytecode invalid") require.Equal(t, expectedEncodedArg, actualArg, "constructor argument invalid") } - -// Function to encode constructor arguments -func encodeConstructorArg(arg string) (string, error) { - // Define ABI argument as an address type - addressType, _ := abi.NewType("address", "", nil) - constructorArgs := abi.Arguments{ - { - Type: addressType, - }, - } - - // Pack the argument - encodedArgs, err := constructorArgs.Pack(common.HexToAddress(arg)) - if err != nil { - return "", fmt.Errorf("failed to encode constructor argument: %w", err) - } - - // Return encoded arguments as a hex string - return hex.EncodeToString(encodedArgs), nil -} From ecd0cb1da60740a140fb5b159315366092f23935 Mon Sep 17 00:00:00 2001 From: Ayaan Date: Mon, 16 Dec 2024 14:54:55 +0900 Subject: [PATCH 14/14] chore: adjust PR reviews - 6 --- .../derive/kromampt_upgrade_transactions.go | 14 ++----- .../kromampt_upgrade_transactions_test.go | 40 +++++++++++++------ 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions.go b/op-node/rollup/derive/kromampt_upgrade_transactions.go index 80e2cbf6d..4a057b127 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions.go @@ -40,9 +40,9 @@ var ( updateL1BlockMPTProxySource = UpgradeDepositSource{Intent: "KromaMPT: L1 Block Proxy Update"} l1BlockMPTDeploymentBytecode = common.FromHex("0x608060405234801561001057600080fd5b50610624806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639e8c496611610097578063e81b2c6d11610066578063e81b2c6d14610281578063ed579ad31461028a578063efc674eb14610293578063f8206140146102a657600080fd5b80639e8c4966146101f8578063b80777ea14610201578063c598591814610221578063e591b2821461024157600080fd5b806364ca23ef116100d357806364ca23ef1461017d57806368d5dca6146101aa5780638381f58a146101db5780638b239f73146101ef57600080fd5b806309bd5a6014610105578063440a5e201461012157806354fd4d501461012b5780635cf2496914610174575b600080fd5b61010e60025481565b6040519081526020015b60405180910390f35b6101296102af565b005b6101676040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b604051610118919061050b565b61010e60015481565b6003546101919067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610118565b6003546101c69068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610118565b6000546101919067ffffffffffffffff1681565b61010e60055481565b61010e60065481565b6000546101919068010000000000000000900467ffffffffffffffff1681565b6003546101c6906c01000000000000000000000000900463ffffffff1681565b61025c73deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b61010e60045481565b61010e60075481565b6101296102a136600461059b565b61030a565b61010e60085481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146102d857633cc50b456000526004601cfd5b60043560801c60035560143560801c60005560243560015560443560085560643560025560843560045560a435600755565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146103b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c756573000000000060648201526084015b60405180910390fd5b61271081111561046a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4c31426c6f636b3a20746865206d61782076616c7565206f662076616c69646160448201527f746f7220726577617264207363616c617220686173206265656e20657863656560648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016103a9565b6000805467ffffffffffffffff998a1668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009091169a8a169a909a179990991790985560019590955560029390935560038054929095167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009290921691909117909355600492909255600591909155600655600755565b600060208083528351808285015260005b818110156105385785810183015185820160400152820161051c565b8181111561054a576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803567ffffffffffffffff8116811461059657600080fd5b919050565b60008060008060008060008060006101208a8c0312156105ba57600080fd5b6105c38a61057e565b98506105d160208b0161057e565b975060408a0135965060608a013595506105ed60808b0161057e565b989b979a50959894979660a0860135965060c08601359560e081013595506101000135935091505056fea164736f6c634300080f000a") - sequencerFeeVaultDeploymentBytecode = common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a") - baseFeeVaultDeploymentBytecode = common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0f380380610b0f8339810160408190526100309161005b565b600060808190526001600160a01b0390911660a052600160c081905260e0919091526101005261008b565b60006020828403121561006d57600080fd5b81516001600160a01b038116811461008457600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f860003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a") - l1FeeVaultDeploymentBytecode = common.FromHex("0x61012060405234801561001157600080fd5b50604051610b0c380380610b0c83398101604081905261003091610058565b600060808190526001600160a01b0390911660a052600160c05260e052600261010052610088565b60006020828403121561006a57600080fd5b81516001600160a01b038116811461008157600080fd5b9392505050565b60805160a05160c05160e05161010051610a176100f560003960006103620152600061033901526000610310015260008181608701528181610191015281816102a7015281816103c4015281816104840152610623015260008181610157015261052b0152610a176000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461010c57806384411d6514610121578063d3e5792b1461014557600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e8610179565b005b3480156100f657600080fd5b506100ff610309565b6040516100ca91906108c8565b34801561011857600080fd5b506100e86103ac565b34801561012d57600080fd5b5061013760005481565b6040519081526020016100ca565b34801561015157600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061024d610527565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd9184916102d4917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016108e2565b6000604051808303818588803b1580156102ed57600080fd5b505af1158015610301573d6000803e3d6000fd5b505050505050565b60606103347f0000000000000000000000000000000000000000000000000000000000000000610693565b61035d7f0000000000000000000000000000000000000000000000000000000000000000610693565b6103867f0000000000000000000000000000000000000000000000000000000000000000610693565b60405160200161039893929190610926565b604051602081830303815290604052905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610471576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161023a565b600061047b610527565b905060006104ba7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610751565b905080610523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161023a565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000004710156105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161023a565b600047905080600080828254610615919061099c565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b606060006106a08361076b565b600101905060008167ffffffffffffffff8111156106c0576106c06109db565b6040519080825280601f01601f1916602001820160405280156106ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846106f457509392505050565b600080600080845160208601878a8af19695505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106107b4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106107e0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106107fe57662386f26fc10000830492506010015b6305f5e1008310610816576305f5e100830492506008015b612710831061082a57612710830492506004015b6064831061083c576064830492506002015b600a8310610848576001015b92915050565b60005b83811015610869578181015183820152602001610851565b83811115610878576000848401525b50505050565b6000815180845261089681602086016020860161084e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db602083018461087e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff8316602082015260606040820152600061091d606083018461087e565b95945050505050565b6000845161093881846020890161084e565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551610974816001850160208a0161084e565b6001920191820152835161098f81600284016020880161084e565b0160020195945050505050565b600082198211156109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a") + sequencerFeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3100000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") + baseFeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3100000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") + l1FeeVaultDeploymentBytecode = common.FromHex("0x60c060405234801561001057600080fd5b5060405161081638038061081683398101604081905261002f91610045565b60006080526001600160a01b031660a052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b60805160a0516107536100c3600039600081816087015281816101c5015281816102db015281816103550152818161041501526105b401526000818161018b01526104bc01526107536000f3fe6080604052600436106100695760003560e01c80636ed39f62116100435780636ed39f621461014057806384411d6514610155578063d3e5792b1461017957600080fd5b80630d9019e1146100755780633ccfd60b146100d357806354fd4d50146100ea57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b506100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100df57600080fd5b506100e86101ad565b005b3480156100f657600080fd5b506101336040518060400160405280600581526020017f312e302e3200000000000000000000000000000000000000000000000000000081525081565b6040516100ca91906106a9565b34801561014c57600080fd5b506100e861033d565b34801561016157600080fd5b5061016b60005481565b6040519081526020016100ca565b34801561018557600080fd5b5061016b7f000000000000000000000000000000000000000000000000000000000000000081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610277576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60006102816104b8565b604080516020810182526000815290517fe11013dd0000000000000000000000000000000000000000000000000000000081529192507342000000000000000000000000000000000000099163e11013dd918491610308917f0000000000000000000000000000000000000000000000000000000000000000916188b891906004016106c3565b6000604051808303818588803b15801561032157600080fd5b505af1158015610335573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4665655661756c743a20746865206f6e6c7920726563697069656e742063616e60448201527f2063616c6c000000000000000000000000000000000000000000000000000000606482015260840161026e565b600061040c6104b8565b9050600061044b7f00000000000000000000000000000000000000000000000000000000000000005a8460405180602001604052806000815250610624565b9050806104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4665655661756c743a20455448207472616e73666572206661696c6564000000604482015260640161026e565b5050565b60007f0000000000000000000000000000000000000000000000000000000000000000471015610590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d207769746864726160648201527f77616c20616d6f756e7400000000000000000000000000000000000000000000608482015260a40161026e565b6000479050806000808282546105a69190610707565b9091555050604080518281527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166020820152338183015290517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1919050565b600080600080845160208601878a8af19695505050505050565b6000815180845260005b8181101561066457602081850181015186830182015201610648565b81811115610676576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106bc602083018461063e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff831660208201526060604082015260006106fe606083018461063e565b95945050505050565b60008219821115610741577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c634300080f000a") ) var ChainConfigs = map[string]ChainConfig{ @@ -130,14 +130,6 @@ func encodeConstructorArg(args ...interface{}) ([]byte, error) { switch v := arg.(type) { case common.Address: argType, err = abi.NewType("address", "", nil) - case uint64: - argType, err = abi.NewType("uint64", "", nil) - case *big.Int: - argType, err = abi.NewType("uint256", "", nil) - case []byte: - argType, err = abi.NewType("bytes", "", nil) - case bool: - argType, err = abi.NewType("bool", "", nil) default: return nil, fmt.Errorf("unsupported argument type: %T", v) } diff --git a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go index 46a6be48e..0c51f1e2d 100644 --- a/op-node/rollup/derive/kromampt_upgrade_transactions_test.go +++ b/op-node/rollup/derive/kromampt_upgrade_transactions_test.go @@ -63,32 +63,32 @@ func TestMPTNetworkTransactions(t *testing.T) { chainId *big.Int }{ { - name: "Local devnet configuration", + name: "LocalDevnet", chainId: big.NewInt(KromaLocalDevnetChainID), }, { - name: "Kroma configuration", + name: "KromaMainnet", chainId: big.NewInt(params.KromaMainnetChainID), }, { - name: "Kroma Sepolia configuration", + name: "KromaSepolia", chainId: big.NewInt(params.KromaSepoliaChainID), }, { - name: "Kroma Holesky configuration", + name: "KromaHolesky", chainId: big.NewInt(params.KromaDevnetChainID), }, { - name: "Unsupported chain. Defaults to local devnet", + name: "UnsupportedChain", chainId: big.NewInt(9999), }, } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(tt.chainId) + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(test.chainId) require.NoError(t, err) - deploymentData, err := getDeploymentData(tt.chainId) + deploymentData, err := getDeploymentData(test.chainId) require.NoError(t, err) require.Len(t, upgradeTxns, 8) @@ -97,26 +97,26 @@ func TestMPTNetworkTransactions(t *testing.T) { require.Equal(t, deployBaseFeeVaultSource.SourceHash(), deployBaseFeeVault.SourceHash()) require.Nil(t, deployBaseFeeVault.To()) require.Equal(t, uint64(1_000_000), deployBaseFeeVault.Gas()) - require.Equal(t, fmt.Sprintf("0x%x", deploymentData.baseFeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deployBaseFeeVault.Data()).String()) + require.Equal(t, hexutil.Bytes(deploymentData.baseFeeVaultDeploymentBytecodeWithArg).String(), hexutil.Bytes(deployBaseFeeVault.Data()).String()) deployL1FeeVaultSender, deployL1FeeVault := toDepositTxn(t, upgradeTxns[2]) require.Equal(t, deployL1FeeVaultSender, L1FeeVaultDeployerAddress) require.Equal(t, deployL1FeeVaultSource.SourceHash(), deployL1FeeVault.SourceHash()) require.Nil(t, deployL1FeeVault.To()) require.Equal(t, uint64(1_000_000), deployL1FeeVault.Gas()) - require.Equal(t, fmt.Sprintf("0x%x", deploymentData.l1FeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deployL1FeeVault.Data()).String()) + require.Equal(t, hexutil.Bytes(deploymentData.l1FeeVaultDeploymentBytecodeWithArg).String(), hexutil.Bytes(deployL1FeeVault.Data()).String()) deploySequencerFeeVaultSender, deploySequencerFeeVault := toDepositTxn(t, upgradeTxns[3]) require.Equal(t, deploySequencerFeeVaultSender, SequencerFeeVaultDeployerAddress) require.Equal(t, deploySequencerFeeVaultSource.SourceHash(), deploySequencerFeeVault.SourceHash()) require.Nil(t, deploySequencerFeeVault.To()) require.Equal(t, uint64(1_000_000), deploySequencerFeeVault.Gas()) - require.Equal(t, fmt.Sprintf("0x%x", deploymentData.sequencerFeeVaultDeploymentBytecodeWithArg), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) + require.Equal(t, hexutil.Bytes(deploymentData.sequencerFeeVaultDeploymentBytecodeWithArg).String(), hexutil.Bytes(deploySequencerFeeVault.Data()).String()) }) } // test chainId-independent configurations - t.Run("ChainId-Independent Configurations", func(t *testing.T) { + t.Run("ChainIDIndependent", func(t *testing.T) { chainID := big.NewInt(KromaLocalDevnetChainID) upgradeTxns, err := KromaMPTNetworkUpgradeTransactions(chainID) // Use default configuration require.NoError(t, err) @@ -144,6 +144,20 @@ func TestMPTNetworkTransactions(t *testing.T) { require.Equal(t, *updateBaseFeeVaultProxy.To(), predeploys.BaseFeeVaultAddr) require.Equal(t, uint64(50_000), updateBaseFeeVaultProxy.Gas()) require.Equal(t, common.FromHex("3659cfe6000000000000000000000000db78bab44d9632e68348659dd47b4806ba276d89"), updateBaseFeeVaultProxy.Data()) + updateL1FeeVaultProxySender, updateL1FeeVaultProxy := toDepositTxn(t, upgradeTxns[6]) + require.Equal(t, updateL1FeeVaultProxySender, common.Address{}) + require.Equal(t, updateL1FeeVaultProxySource.SourceHash(), updateL1FeeVaultProxy.SourceHash()) + require.NotNil(t, updateL1FeeVaultProxy.To()) + require.Equal(t, *updateL1FeeVaultProxy.To(), predeploys.L1FeeVaultAddr) + require.Equal(t, uint64(50_000), updateL1FeeVaultProxy.Gas()) + require.Equal(t, common.FromHex("3659cfe6000000000000000000000000d86e1a7c380f398bda3d598ee65c891ce5c3c8f0"), updateL1FeeVaultProxy.Data()) + updateSequencerFeeVaultProxySender, updateSequencerFeeVaultProxy := toDepositTxn(t, upgradeTxns[7]) + require.Equal(t, updateSequencerFeeVaultProxySender, common.Address{}) + require.Equal(t, updateSequencerFeeVaultProxySource.SourceHash(), updateSequencerFeeVaultProxy.SourceHash()) + require.NotNil(t, updateSequencerFeeVaultProxy.To()) + require.Equal(t, *updateSequencerFeeVaultProxy.To(), predeploys.SequencerFeeVaultAddr) + require.Equal(t, uint64(50_000), updateSequencerFeeVaultProxy.Gas()) + require.Equal(t, common.FromHex("3659cfe600000000000000000000000013963c74d9c62d31ce3fcec0d46f6430a74ea79e"), updateSequencerFeeVaultProxy.Data()) }) }