diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 56ac9808e..76e8161b5 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -92,8 +92,9 @@ func (k *Keeper) Setup( // Build the Polaris EVM Provider cfg, err := polar.LoadConfigFromFilePath(polarisConfigPath) - if err != nil { - logger.Error("failed to load config", "falling back to defaults") + // TODO: fix properly + if err != nil || cfg.GPO == nil { + logger.Error("failed to load polaris config", "falling back to defaults") cfg = polar.DefaultConfig() } diff --git a/eth/polar/backend.go b/eth/polar/backend.go index 5ce864ce8..aa7f86ba4 100644 --- a/eth/polar/backend.go +++ b/eth/polar/backend.go @@ -80,7 +80,7 @@ func NewBackend( cfg: cfg, logger: log.Root(), } - b.gpo = gasprice.NewOracle(b, cfg.GPO) + b.gpo = gasprice.NewOracle(b, *cfg.GPO) return b } diff --git a/eth/polar/config.go b/eth/polar/config.go index 658f530ad..291481fba 100644 --- a/eth/polar/config.go +++ b/eth/polar/config.go @@ -45,7 +45,7 @@ func DefaultConfig() *Config { gpoConfig := ethconfig.FullNodeGPO gpoConfig.Default = big.NewInt(gpoDefault) return &Config{ - GPO: gpoConfig, + GPO: &gpoConfig, RPCGasCap: ethconfig.Defaults.RPCGasCap, RPCTxFeeCap: ethconfig.Defaults.RPCTxFeeCap, RPCEVMTimeout: ethconfig.Defaults.RPCEVMTimeout, @@ -55,7 +55,7 @@ func DefaultConfig() *Config { // Config represents the configurable parameters for Polaris. type Config struct { // Gas Price Oracle config. - GPO gasprice.Config + GPO *gasprice.Config // RPCGasCap is the global gas cap for eth-call variants. RPCGasCap uint64 `toml:""`