forked from cerc-io/laconicd-deprecated
e1560849dd
* Set priority for eth transactions Set the tx priority to the lowest priority in the messages. fix unit tests code cleanup and spec update spec fix go lint add priority integration test add python linter job add access list tx type fix gas limit remove ledger tag, so no need to replace hid dependency fix earlier check ibc-go v5.0.0-beta1 * fix pruned node integration test * Update x/feemarket/spec/09_antehandlers.md 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/evmos/ethermint/x/evm/statedb"
|
|
evmtypes "github.com/evmos/ethermint/x/evm/types"
|
|
feemarkettypes "github.com/evmos/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,
|
|
) (fees sdk.Coins, priority int64, err 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)
|
|
}
|