Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 33 deletions.
2 changes: 1 addition & 1 deletion app/consumer-democracy/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
18 changes: 9 additions & 9 deletions app/consumer-democracy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import (
ibc "github.com/cosmos/ibc-go/v7/modules/core"
ibcconnectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types"
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v7/modules/core/24-host"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibctesting "github.com/cosmos/ibc-go/v7/testing"
"github.com/gorilla/mux"
Expand Down Expand Up @@ -255,7 +255,7 @@ func New(
keys := sdk.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey,
capabilitytypes.StoreKey, authzkeeper.StoreKey,
consumertypes.StoreKey,
Expand Down Expand Up @@ -293,7 +293,7 @@ func New(
keys[capabilitytypes.StoreKey],
memKeys[capabilitytypes.MemStoreKey],
)
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName)
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
scopedIBCConsumerKeeper := app.CapabilityKeeper.ScopeToModule(consumertypes.ModuleName)
app.CapabilityKeeper.Seal()
Expand Down Expand Up @@ -402,8 +402,8 @@ func New(

app.IBCKeeper = ibckeeper.NewKeeper(
appCodec,
keys[ibchost.StoreKey],
app.GetSubspace(ibchost.ModuleName),
keys[ibcexported.StoreKey],
app.GetSubspace(ibcexported.ModuleName),
&app.ConsumerKeeper,
app.UpgradeKeeper,
scopedIBCKeeper,
Expand Down Expand Up @@ -522,7 +522,7 @@ func New(
paramstypes.ModuleName,
vestingtypes.ModuleName,
ibctransfertypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
consumertypes.ModuleName,
)
app.MM.SetOrderEndBlockers(
Expand All @@ -542,7 +542,7 @@ func New(
upgradetypes.ModuleName,
vestingtypes.ModuleName,
ibctransfertypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
consumertypes.ModuleName,
)

Expand All @@ -568,7 +568,7 @@ func New(
paramstypes.ModuleName,
upgradetypes.ModuleName,
vestingtypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
consumertypes.ModuleName,
)
Expand Down Expand Up @@ -937,7 +937,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(gov.ProvideKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(ibcexported.ModuleName)
paramsKeeper.Subspace(consumertypes.ModuleName)

return paramsKeeper
Expand Down
2 changes: 1 addition & 1 deletion app/consumer/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
18 changes: 9 additions & 9 deletions app/consumer/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import (
ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
ibcconnectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types"
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v7/modules/core/24-host"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibctesting "github.com/cosmos/ibc-go/v7/testing"
appparams "github.com/cosmos/interchain-security/app/params"
Expand Down Expand Up @@ -215,7 +215,7 @@ func New(

keys := sdk.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, slashingtypes.StoreKey,
paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey,
capabilitytypes.StoreKey, feegrant.StoreKey, authzkeeper.StoreKey,
ibcconsumertypes.StoreKey,
Expand Down Expand Up @@ -253,7 +253,7 @@ func New(
keys[capabilitytypes.StoreKey],
memKeys[capabilitytypes.MemStoreKey],
)
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName)
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
scopedIBCConsumerKeeper := app.CapabilityKeeper.ScopeToModule(ibcconsumertypes.ModuleName)
app.CapabilityKeeper.Seal()
Expand Down Expand Up @@ -315,8 +315,8 @@ func New(
)
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec,
keys[ibchost.StoreKey],
app.GetSubspace(ibchost.ModuleName),
keys[ibcexported.StoreKey],
app.GetSubspace(ibcexported.ModuleName),
&app.ConsumerKeeper,
app.UpgradeKeeper,
scopedIBCKeeper,
Expand Down Expand Up @@ -406,7 +406,7 @@ func New(
capabilitytypes.ModuleName,
crisistypes.ModuleName,
ibctransfertypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName,
slashingtypes.ModuleName,
Expand All @@ -420,7 +420,7 @@ func New(
app.MM.SetOrderEndBlockers(
crisistypes.ModuleName,
ibctransfertypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
feegrant.ModuleName,
authz.ModuleName,
capabilitytypes.ModuleName,
Expand All @@ -447,7 +447,7 @@ func New(
banktypes.ModuleName,
slashingtypes.ModuleName,
crisistypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
feegrant.ModuleName,
Expand Down Expand Up @@ -758,7 +758,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(ibcexported.ModuleName)
paramsKeeper.Subspace(ibcconsumertypes.ModuleName)

return paramsKeeper
Expand Down
2 changes: 1 addition & 1 deletion app/provider/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
20 changes: 10 additions & 10 deletions app/provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ import (
ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
ibcconnectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types"
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v7/modules/core/24-host"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibctesting "github.com/cosmos/ibc-go/v7/testing"

Expand Down Expand Up @@ -256,7 +256,7 @@ func New(
keys := sdk.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey,
capabilitytypes.StoreKey,
providertypes.StoreKey,
Expand Down Expand Up @@ -294,7 +294,7 @@ func New(
keys[capabilitytypes.StoreKey],
memKeys[capabilitytypes.MemStoreKey],
)
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName)
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
scopedIBCProviderKeeper := app.CapabilityKeeper.ScopeToModule(providertypes.ModuleName)
app.CapabilityKeeper.Seal()
Expand Down Expand Up @@ -381,8 +381,8 @@ func New(

app.IBCKeeper = ibckeeper.NewKeeper(
appCodec,
keys[ibchost.StoreKey],
app.GetSubspace(ibchost.ModuleName),
keys[ibcexported.StoreKey],
app.GetSubspace(ibcexported.ModuleName),
app.StakingKeeper,
app.UpgradeKeeper,
scopedIBCKeeper,
Expand Down Expand Up @@ -420,7 +420,7 @@ func New(
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.UpgradeKeeper)).
AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(ibcexported.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(providertypes.RouterKey, ibcprovider.NewProviderProposalHandler(app.ProviderKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))

Expand Down Expand Up @@ -498,7 +498,7 @@ func New(
govtypes.ModuleName,
stakingtypes.ModuleName,
ibctransfertypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName,
distrtypes.ModuleName,
Expand All @@ -521,7 +521,7 @@ func New(
govtypes.ModuleName,
stakingtypes.ModuleName,
ibctransfertypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
capabilitytypes.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName,
Expand Down Expand Up @@ -552,7 +552,7 @@ func New(
govtypes.ModuleName,
minttypes.ModuleName,
crisistypes.ModuleName,
ibchost.ModuleName,
ibcexported.ModuleName,
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
genutiltypes.ModuleName,
Expand Down Expand Up @@ -868,7 +868,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(gov.ProvideKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(ibcexported.ModuleName)
paramsKeeper.Subspace(providertypes.ModuleName)

return paramsKeeper
Expand Down
3 changes: 2 additions & 1 deletion x/ccv/consumer/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
conntypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types"
channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
host "github.com/cosmos/ibc-go/v7/modules/core/24-host"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"

tmtypes "github.com/cometbft/cometbft/abci/types"
"github.com/cometbft/cometbft/libs/log"
Expand Down Expand Up @@ -122,7 +123,7 @@ func (k Keeper) mustValidateFields() {

// Logger returns a module-specific logger.
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", "x/"+host.ModuleName+"-"+types.ModuleName)
return ctx.Logger().With("module", "x/"+ibcexported.ModuleName+"-"+types.ModuleName)
}

func (k *Keeper) SetHooks(sh ccv.ConsumerHooks) *Keeper {
Expand Down
2 changes: 1 addition & 1 deletion x/ccv/provider/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (k Keeper) mustValidateFields() {

// Logger returns a module-specific logger.
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", "x/"+host.ModuleName+"-"+types.ModuleName)
return ctx.Logger().With("module", "x/"+ibcexported.ModuleName+"-"+types.ModuleName)
}

// IsBound checks if the CCV module is already bound to the desired port
Expand Down
1 change: 1 addition & 0 deletions x/ccv/types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func SendIBCPacket(
"source port: %s, source channel: %s", portID, channelID,
)
}
// TODO update from https://github.com/cosmos/ibc-go/blob/v7.0.0/docs/migrations/v5-to-v6.md#ics04---sendpacket-api-change
packet := channeltypes.NewPacket(
packetData, sequence,
portID, channelID,
Expand Down

0 comments on commit 4bf3222

Please sign in to comment.