Skip to content

Commit

Permalink
Fixes for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Apr 19, 2024
1 parent 40330c5 commit be591fe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
11 changes: 11 additions & 0 deletions testutil/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
Expand Down Expand Up @@ -146,6 +148,13 @@ func ParamsKeeper(
)
}

func ConsensusKeeper(
cdc codec.Codec,
) consensuskeeper.Keeper {
storeKey := sdk.NewKVStoreKey(consensustypes.StoreKey)
return consensuskeeper.NewKeeper(cdc, storeKey, authtypes.NewModuleAddress(govtypes.ModuleName).String())
}

// AccountKeeper instantiates an account keeper for testing purposes
func AccountKeeper(
cdc codec.Codec,
Expand Down Expand Up @@ -285,6 +294,7 @@ func FeeMarketKeeper(
storeKey,
transientKey,
paramKeeper.Subspace(feemarkettypes.ModuleName),
ConsensusKeeper(cdc),
)
}

Expand Down Expand Up @@ -318,6 +328,7 @@ func EVMKeeper(
geth.NewEVM,
"",
paramKeeper.Subspace(evmtypes.ModuleName),
ConsensusKeeper(cdc),
)

return k
Expand Down
2 changes: 1 addition & 1 deletion testutil/keeper/lightclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package keeper
import (
"testing"

tmdb "github.com/cometbft/cometbft-db"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
tmdb "github.com/tendermint/tm-db"
lightclientmocks "github.com/zeta-chain/zetacore/testutil/keeper/mocks/lightclient"
"github.com/zeta-chain/zetacore/x/lightclient/keeper"
"github.com/zeta-chain/zetacore/x/lightclient/types"
Expand Down
2 changes: 1 addition & 1 deletion x/lightclient/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package keeper
import (
"fmt"

"github.com/cometbft/cometbft/libs/log"
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/tendermint/libs/log"
"github.com/zeta-chain/zetacore/x/lightclient/types"
)

Expand Down
15 changes: 1 addition & 14 deletions x/lightclient/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"

abci "github.com/cometbft/cometbft/abci/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand All @@ -13,7 +14,6 @@ import (
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/zeta-chain/zetacore/x/lightclient/client/cli"
"github.com/zeta-chain/zetacore/x/lightclient/keeper"
"github.com/zeta-chain/zetacore/x/lightclient/types"
Expand Down Expand Up @@ -117,19 +117,6 @@ func (am AppModule) Name() string {
return am.AppModuleBasic.Name()
}

// Route returns the lightclient module's message routing key.
func (am AppModule) Route() sdk.Route {
return sdk.Route{}
}

// QuerierRoute returns the lightclient module's query routing key.
func (AppModule) QuerierRoute() string { return types.QuerierRoute }

// LegacyQuerierHandler returns the lightclient module's Querier.
func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier {
return nil
}

// RegisterServices registers a GRPC query service to respond to the
// module-specific GRPC queries.
func (am AppModule) RegisterServices(cfg module.Configurator) {
Expand Down

0 comments on commit be591fe

Please sign in to comment.