Skip to content

Commit

Permalink
v18 Cleanup (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Oct 24, 2023
1 parent 62c4d7e commit 5054e1b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 17 deletions.
3 changes: 3 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,10 @@ func GetDefaultBypassFeeMessages() []string {
// IBC
sdk.MsgTypeURL(&ibcchanneltypes.MsgRecvPacket{}),
sdk.MsgTypeURL(&ibcchanneltypes.MsgAcknowledgement{}),
sdk.MsgTypeURL(&ibcclienttypes.MsgCreateClient{}),
sdk.MsgTypeURL(&ibcclienttypes.MsgUpdateClient{}),
sdk.MsgTypeURL(&ibcclienttypes.MsgSubmitMisbehaviour{}),
sdk.MsgTypeURL(&ibcclienttypes.MsgUpgradeClient{}),
sdk.MsgTypeURL(&ibctransfertypes.MsgTransfer{}),
sdk.MsgTypeURL(&ibcchanneltypes.MsgTimeout{}),
sdk.MsgTypeURL(&ibcchanneltypes.MsgTimeoutOnClose{}),
Expand Down
10 changes: 5 additions & 5 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ type AppKeepers struct {
NFTKeeper nftkeeper.Keeper
FeeShareKeeper feesharekeeper.Keeper
GlobalFeeKeeper globalfeekeeper.Keeper
ContractKeeper *wasmkeeper.PermissionedKeeper
ContractKeeper wasmtypes.ContractOpsKeeper
ClockKeeper clockkeeper.Keeper
CWHooksKeeper cwhookskeeper.Keeper

Expand Down Expand Up @@ -394,7 +394,7 @@ func NewAppKeepers(
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.DistrKeeper,
appKeepers.BankKeeper,
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.HooksICS4Wrapper,
)

// Create Transfer Keepers
Expand Down Expand Up @@ -544,7 +544,7 @@ func NewAppKeepers(
)

// set the contract keeper for the Ics20WasmHooks
appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(appKeepers.WasmKeeper)
appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(&appKeepers.WasmKeeper)
appKeepers.Ics20WasmHooks.ContractKeeper = &appKeepers.WasmKeeper

appKeepers.FeeShareKeeper = feesharekeeper.NewKeeper(
Expand Down Expand Up @@ -574,7 +574,7 @@ func NewAppKeepers(
appKeepers.ClockKeeper = clockkeeper.NewKeeper(
appKeepers.keys[clocktypes.StoreKey],
appCodec,
*appKeepers.ContractKeeper,
appKeepers.ContractKeeper,
govModAddress,
)

Expand All @@ -584,7 +584,7 @@ func NewAppKeepers(
stakingKeeper,
*govKeeper,
appKeepers.WasmKeeper,
*appKeepers.ContractKeeper,
appKeepers.ContractKeeper,
govModAddress,
)

Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v17/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v17
import (
"fmt"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

log "github.com/cometbft/cometbft/libs/log"

Expand Down Expand Up @@ -89,7 +89,7 @@ func CreateV17UpgradeHandler(
}
}

func migrateChainOwnedSubDaos(ctx sdk.Context, logger log.Logger, ak authkeeper.AccountKeeper, ck *wasmkeeper.PermissionedKeeper) error {
func migrateChainOwnedSubDaos(ctx sdk.Context, logger log.Logger, ak authkeeper.AccountKeeper, ck wasmtypes.ContractOpsKeeper) error {
logger.Info("migrating chain owned sub-daos")

govAcc := ak.GetModuleAddress(govtypes.ModuleName)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/cometbft/cometbft-db v0.8.0
github.com/cosmos/cosmos-sdk v0.47.5
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.1-0.20231012160012-d0f49580a238
github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.0.0
github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230803181732-7c8f814d3b79
github.com/cosmos/ibc-go/v7 v7.3.0
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK
github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek=
github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg=
github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A=
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0 h1:i9esYyZ5ExpZOgxrLMQhY2jDTVYiaD8yUeqXN9QBgbk=
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0/go.mod h1:fctjEnz9xaBFOlmYYPdKL8Hs1Y3GUKilSwsJdqBb5QU=
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.1-0.20231012160012-d0f49580a238 h1:vc9zQUjiYctU3q4uF5usbl2JUqaa3F6bEyboNKOKyBk=
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.1-0.20231012160012-d0f49580a238/go.mod h1:WO/xWf+I8m+9PZsBkwZkEREZIW24j90Sz2yOsXU3B9U=
github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.0.0 h1:mMHedP3Q+mz5gpOWNz0P+X8hxPdamylrBKc/P2cFakA=
github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.0.0/go.mod h1:/P6l2bWo2AR3rrsfs0DHuFZO3Imzb93sxFD3ihrIgw4=
github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230803181732-7c8f814d3b79 h1:pCxyhIxgWTabAQC5UerkITraHG3SwajdLKKMCFDWCv4=
Expand Down Expand Up @@ -1237,6 +1237,8 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU=
go.uber.org/mock v0.2.0/go.mod h1:J0y0rp9L3xiff1+ZBfKxlC1fz2+aO16tw0tsDOixfuM=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
Expand Down
8 changes: 4 additions & 4 deletions x/clock/keeper/keeper.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package keeper

import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
Expand All @@ -15,15 +15,15 @@ type Keeper struct {
storeKey storetypes.StoreKey
cdc codec.BinaryCodec

contractKeeper wasmkeeper.PermissionedKeeper
contractKeeper wasmtypes.ContractOpsKeeper

authority string
}

func NewKeeper(
key storetypes.StoreKey,
cdc codec.BinaryCodec,
contractKeeper wasmkeeper.PermissionedKeeper,
contractKeeper wasmtypes.ContractOpsKeeper,
authority string,
) Keeper {
return Keeper{
Expand Down Expand Up @@ -65,6 +65,6 @@ func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) {
}

// GetContractKeeper returns the x/wasm module's contract keeper.
func (k Keeper) GetContractKeeper() wasmkeeper.PermissionedKeeper {
func (k Keeper) GetContractKeeper() wasmtypes.ContractOpsKeeper {
return k.contractKeeper
}
7 changes: 4 additions & 3 deletions x/cw-hooks/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

"github.com/cometbft/cometbft/libs/log"

Expand All @@ -23,7 +24,7 @@ type Keeper struct {
stakingKeeper slashingtypes.StakingKeeper
govKeeper govkeeper.Keeper
wk wasmkeeper.Keeper
contractKeeper wasmkeeper.PermissionedKeeper
contractKeeper wasmtypes.ContractOpsKeeper

authority string
}
Expand All @@ -34,7 +35,7 @@ func NewKeeper(
stakingKeeper slashingtypes.StakingKeeper,
govKeeper govkeeper.Keeper,
wasmkeeper wasmkeeper.Keeper,
contractKeeper wasmkeeper.PermissionedKeeper,
contractKeeper wasmtypes.ContractOpsKeeper,
authority string,
) Keeper {
return Keeper{
Expand All @@ -54,7 +55,7 @@ func (k Keeper) GetAuthority() string {
}

// GetContractKeeper returns the x/wasm module's contract keeper.
func (k Keeper) GetContractKeeper() wasmkeeper.PermissionedKeeper {
func (k Keeper) GetContractKeeper() wasmtypes.ContractOpsKeeper {
return k.contractKeeper
}

Expand Down

0 comments on commit 5054e1b

Please sign in to comment.