forked from cerc-io/laconicd-deprecated
evm: move ChainConfig to Params (#266)
* evm: move ChainConfig to Params * fixes * fix test
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
|
||||
ethermint "github.com/tharsis/ethermint/types"
|
||||
evmtypes "github.com/tharsis/ethermint/x/evm/types"
|
||||
@@ -42,8 +41,6 @@ type Backend interface {
|
||||
// Used by log filter
|
||||
GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, error)
|
||||
BloomStatus() (uint64, uint64)
|
||||
|
||||
ChainConfig() *params.ChainConfig
|
||||
}
|
||||
|
||||
var _ Backend = (*EVMBackend)(nil)
|
||||
@@ -383,14 +380,3 @@ func (e *EVMBackend) GetLogsByNumber(blockNum types.BlockNumber) ([][]*ethtypes.
|
||||
func (e *EVMBackend) BloomStatus() (uint64, uint64) {
|
||||
return 4096, 0
|
||||
}
|
||||
|
||||
// ChainConfig returns the chain configuration for the chain. This method returns a nil pointer if
|
||||
// the query fails.
|
||||
func (e *EVMBackend) ChainConfig() *params.ChainConfig {
|
||||
res, err := e.queryClient.QueryClient.ChainConfig(e.ctx, &evmtypes.QueryChainConfigRequest{})
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return res.Config.EthereumConfig(e.chainID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user