forked from cerc-io/laconicd-deprecated
620f6a6770
* add gasWanted transient store keys * add gasWanted transient store keeper functions * add gasWanted transient store tracker * add comment * remove unncesary comment * remove unnecesary function * fix tests * fix bad comment * remove unnecesary comment * update comment * update changelog * Update CHANGELOG.md Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * add GasWantedDecorator * remove unnecesary comments * gasWanted decorator test * fix tests * fix tests and build * fix lint * updated end block event * Update app/ante/fee_market.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix undeclared variable * Update app/ante/fee_market_test.go * remove unnecesary line * migrate MinGasMultiplier to FeeMarket module * set limited gas wanted * remove old newKeeper param * update proto comment * fix test * update comments * Update x/feemarket/keeper/abci.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * address comments from review * tidy * tests Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
42 lines
1.4 KiB
Go
42 lines
1.4 KiB
Go
package ante
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
tx "github.com/cosmos/cosmos-sdk/types/tx"
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/core"
|
|
"github.com/ethereum/go-ethereum/core/vm"
|
|
"github.com/ethereum/go-ethereum/params"
|
|
"github.com/tharsis/ethermint/x/evm/statedb"
|
|
evmtypes "github.com/tharsis/ethermint/x/evm/types"
|
|
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types"
|
|
)
|
|
|
|
// EVMKeeper defines the expected keeper interface used on the Eth AnteHandler
|
|
type EVMKeeper interface {
|
|
statedb.Keeper
|
|
|
|
ChainID() *big.Int
|
|
GetParams(ctx sdk.Context) evmtypes.Params
|
|
NewEVM(ctx sdk.Context, msg core.Message, cfg *evmtypes.EVMConfig, tracer vm.EVMLogger, stateDB vm.StateDB) *vm.EVM
|
|
DeductTxCostsFromUserBalance(
|
|
ctx sdk.Context, msgEthTx evmtypes.MsgEthereumTx, txData evmtypes.TxData, denom string, homestead, istanbul, london bool,
|
|
) (sdk.Coins, error)
|
|
GetBaseFee(ctx sdk.Context, ethCfg *params.ChainConfig) *big.Int
|
|
GetBalance(ctx sdk.Context, addr common.Address) *big.Int
|
|
ResetTransientGasUsed(ctx sdk.Context)
|
|
GetTxIndexTransient(ctx sdk.Context) uint64
|
|
}
|
|
|
|
type protoTxProvider interface {
|
|
GetProtoTx() *tx.Tx
|
|
}
|
|
|
|
// FeeMarketKeeper defines the expected keeper interface used on the AnteHandler
|
|
type FeeMarketKeeper interface {
|
|
GetParams(ctx sdk.Context) (params feemarkettypes.Params)
|
|
AddTransientGasWanted(ctx sdk.Context, gasWanted uint64) (uint64, error)
|
|
}
|