Skip to content

Commit

Permalink
Problem: missing json rpc of eth_feeHistory evmos#685
Browse files Browse the repository at this point in the history
  • Loading branch information
leejw51crypto committed Oct 21, 2021
1 parent c644dd6 commit a214350
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion rpc/ethereum/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/server"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/eth/gasprice"
"github.com/ethereum/go-ethereum/params"
tmrpctypes "github.com/tendermint/tendermint/rpc/core/types"

Expand Down Expand Up @@ -86,6 +87,7 @@ type EVMBackend struct {
logger log.Logger
chainID *big.Int
cfg config.Config
gpo *gasprice.Oracle
}

// NewEVMBackend creates a new EVMBackend instance
Expand All @@ -97,14 +99,21 @@ func NewEVMBackend(ctx *server.Context, logger log.Logger, clientCtx client.Cont

appConf := config.GetConfig(ctx.Viper)

return &EVMBackend{
ret := &EVMBackend{
ctx: context.Background(),
clientCtx: clientCtx,
queryClient: types.NewQueryClient(clientCtx),
logger: logger.With("module", "evm-backend"),
chainID: chainID,
cfg: appConf,
gpo: nil,
}

param := gasprice.Config{}
gpo := gasprice.NewOracle(nil, param)
ret.gpo = gpo

return ret
}

// BlockNumber returns the current block number in abci app state.
Expand Down

0 comments on commit a214350

Please sign in to comment.