@@ -77,18 +77,18 @@ func newConfigFromFile(path string, withValidation bool) (*Config, error) {
7777 logrus .SetLevel (logrus .Level (cfg .LogLevel )) // #nosec G115 -- overflow not possible (uint8 -> uint32)
7878
7979 // Extract the Layer2.MsgSvcContract address from the string
80- addr , err := common .NewMixedcaseAddressFromString (cfg .Layer2 .MsgSvcContractStr )
80+ lsMsgSvcAddress , err := common .NewMixedcaseAddressFromString (cfg .Layer2 .MsgSvcContractStr )
8181 if withValidation && err != nil {
8282 return nil , fmt .Errorf ("failed to extract Layer2.MsgSvcContract address: %w" , err )
8383 }
84- cfg .Layer2 .MsgSvcContract = addr .Address ()
84+ cfg .Layer2 .MsgSvcContract = lsMsgSvcAddress .Address ()
8585
8686 // Extract the coinbase address from the string
87- // addr , err := common.NewMixedcaseAddressFromString(cfg.Layer2.CoinbaseStr )
88- // if withValidation && err != nil {
89- // return nil, fmt.Errorf("failed to extract Layer2.MsgSvcContract address: %w", err)
90- // }
91- // cfg.Layer2.MsgSvcContract = addr .Address()
87+ coinBaseAddr , err := common .NewMixedcaseAddressFromString (cfg .Layer2 .CoinBaseStr )
88+ if withValidation && err != nil {
89+ return nil , fmt .Errorf ("failed to extract Layer2.MsgSvcContract address: %w" , err )
90+ }
91+ cfg .Layer2 .MsgSvcContract = coinBaseAddr .Address ()
9292
9393 // ensure that asset dir / kzgsrs exists using os.Stat
9494 srsDir := cfg .PathForSRS ()
@@ -103,6 +103,7 @@ func newConfigFromFile(path string, withValidation bool) (*Config, error) {
103103 cfg .PublicInputInterconnection .ChainID = uint64 (cfg .Layer2 .ChainID )
104104 cfg .PublicInputInterconnection .BaseFee = uint64 (cfg .Layer2 .BaseFee )
105105 cfg .PublicInputInterconnection .L2MsgServiceAddr = cfg .Layer2 .MsgSvcContract
106+ cfg .PublicInputInterconnection .CoinBase = cfg .Layer2 .CoinBase
106107
107108 return & cfg , nil
108109}
@@ -152,10 +153,12 @@ type Config struct {
152153 // Use this field when you need the ETH address as a string.
153154 MsgSvcContractStr string `mapstructure:"message_service_contract" validate:"required,eth_addr"`
154155
155- // CoinbaseStr string `mapstructure:"coinbase" validate:"required,eth_addr"`
156+ // CoinBaseStr stores the coinbase address of Linea as a string.
157+ CoinBaseStr string `mapstructure:"coin_base" validate:"required,eth_addr"`
156158
157159 // MsgSvcContract stores the unique ID of the Service Contract (SC), as a common.Address.
158160 MsgSvcContract common.Address `mapstructure:"-"`
161+ CoinBase common.Address `mapstructure:"-"`
159162 }
160163
161164 TracesLimits TracesLimits `mapstructure:"traces_limits" validate:"required"`
@@ -324,7 +327,7 @@ type PublicInput struct {
324327 ChainID uint64 // duplicate from Config
325328 BaseFee uint64 // duplicate from Config
326329 L2MsgServiceAddr common.Address // duplicate from Config
327- // Coinbase common.Address // duplicate from Config
330+ CoinBase common.Address // duplicate from Config
328331}
329332
330333type Debug struct {
0 commit comments