Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteHerrmann committed Aug 8, 2024
1 parent 43c3c47 commit 02b5e6f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions ante/cosmos/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
"github.com/cosmos/cosmos-sdk/x/authz"
"github.com/evmos/evmos/os/encoding"
"github.com/evmos/evmos/v19/app"
"github.com/evmos/os/crypto/ethsecp256k1"
"github.com/evmos/os/encoding"
app "github.com/evmos/os/example_chain"
)

func (suite *AnteTestSuite) CreateTestCosmosTxBuilder(gasPrice sdkmath.Int, denom string, msgs ...sdk.Msg) client.TxBuilder {
Expand Down
2 changes: 1 addition & 1 deletion ante/interfaces/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

// EVMKeeper exposes the required EVM keeper interface required for ante handlers
type EVMKeeper interface { //nolint: revive
type EVMKeeper interface {
statedb.Keeper
DynamicFeeEVMKeeper

Expand Down
9 changes: 4 additions & 5 deletions example_chain/ante/evm_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/ethereum/go-ethereum/params"
evmkeeper "github.com/evmos/evmos/v19/x/evm/keeper"
evmtypes "github.com/evmos/evmos/v19/x/evm/types"
anteutils "github.com/evmos/os/ante/cosmos"
evmante "github.com/evmos/os/ante/evm"
anteinterfaces "github.com/evmos/os/ante/interfaces"
)
Expand All @@ -43,8 +42,8 @@ type MonoDecorator struct {
bankKeeper evmtypes.BankKeeper
feeMarketKeeper anteinterfaces.FeeMarketKeeper
evmKeeper anteinterfaces.EVMKeeper
distributionKeeper anteutils.DistributionKeeper
stakingKeeper anteutils.StakingKeeper
distributionKeeper anteinterfaces.DistributionKeeper
stakingKeeper anteinterfaces.StakingKeeper
maxGasWanted uint64
}

Expand All @@ -71,8 +70,8 @@ func NewEVMMonoDecorator(
bankKeeper evmtypes.BankKeeper,
feeMarketKeeper anteinterfaces.FeeMarketKeeper,
evmKeeper anteinterfaces.EVMKeeper,
distributionKeeper anteutils.DistributionKeeper,
stakingKeeper anteutils.StakingKeeper,
distributionKeeper anteinterfaces.DistributionKeeper,
stakingKeeper anteinterfaces.StakingKeeper,
maxGasWanted uint64,
) MonoDecorator {
return MonoDecorator{
Expand Down
7 changes: 3 additions & 4 deletions example_chain/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

evmtypes "github.com/evmos/evmos/v19/x/evm/types"
evmoscosmosante "github.com/evmos/os/ante/cosmos"
anteinterfaces "github.com/evmos/os/ante/interfaces"
)

// HandlerOptions defines the list of module keepers required to run the Evmos
Expand All @@ -23,8 +22,8 @@ type HandlerOptions struct {
Cdc codec.BinaryCodec
AccountKeeper evmtypes.AccountKeeper
BankKeeper evmtypes.BankKeeper
DistributionKeeper evmoscosmosante.DistributionKeeper
StakingKeeper evmoscosmosante.StakingKeeper
DistributionKeeper anteinterfaces.DistributionKeeper
StakingKeeper anteinterfaces.StakingKeeper
FeeMarketKeeper anteinterfaces.FeeMarketKeeper
EvmKeeper anteinterfaces.EVMKeeper
FeegrantKeeper ante.FeegrantKeeper
Expand Down
4 changes: 2 additions & 2 deletions example_chain/testutil/fund.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/evmos/evmos/os/utils"
"github.com/evmos/os/testutil"
)

// FundAccount is a utility function that funds an account by minting and
Expand All @@ -25,7 +25,7 @@ func FundAccount(ctx sdk.Context, bankKeeper bankkeeper.Keeper, addr sdk.AccAddr
// to fund an account with the default Evmos denomination.
func FundAccountWithBaseDenom(ctx sdk.Context, bankKeeper bankkeeper.Keeper, addr sdk.AccAddress, amount int64) error {
coins := sdk.NewCoins(
sdk.NewCoin(utils.BaseDenom, math.NewInt(amount)),
sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(amount)),
)
return FundAccount(ctx, bankKeeper, addr, coins)
}
Expand Down

0 comments on commit 02b5e6f

Please sign in to comment.