@@ -13,30 +13,27 @@ import (
13
13
dbm "github.com/cosmos/cosmos-db"
14
14
"github.com/cosmos/gogoproto/proto"
15
15
ibccallbacks "github.com/cosmos/ibc-go/modules/apps/callbacks"
16
- "github.com/cosmos/ibc-go/modules/capability"
17
- capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
18
- capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
19
- ica "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts"
20
- icacontroller "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller"
21
- icacontrollerkeeper "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/keeper"
22
- icacontrollertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types"
23
- icahost "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host"
24
- icahostkeeper "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/keeper"
25
- icahosttypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types"
26
- icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types"
27
- ibcfee "github.com/cosmos/ibc-go/v9/modules/apps/29-fee"
28
- ibcfeekeeper "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/keeper"
29
- ibcfeetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types"
30
- "github.com/cosmos/ibc-go/v9/modules/apps/transfer"
31
- ibctransferkeeper "github.com/cosmos/ibc-go/v9/modules/apps/transfer/keeper"
32
- ibctransfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types"
33
- ibc "github.com/cosmos/ibc-go/v9/modules/core"
34
- ibcclienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types"
35
- ibcconnectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types"
36
- porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types"
37
- ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported"
38
- ibckeeper "github.com/cosmos/ibc-go/v9/modules/core/keeper"
39
- ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint"
16
+ ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts"
17
+ icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller"
18
+ icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper"
19
+ icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types"
20
+ icahost "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host"
21
+ icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper"
22
+ icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types"
23
+ icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types"
24
+ ibcfee "github.com/cosmos/ibc-go/v10/modules/apps/29-fee"
25
+ ibcfeekeeper "github.com/cosmos/ibc-go/v10/modules/apps/29-fee/keeper"
26
+ ibcfeetypes "github.com/cosmos/ibc-go/v10/modules/apps/29-fee/types"
27
+ "github.com/cosmos/ibc-go/v10/modules/apps/transfer"
28
+ ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
29
+ ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
30
+ ibc "github.com/cosmos/ibc-go/v10/modules/core"
31
+ ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types"
32
+ ibcconnectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types"
33
+ porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
34
+ ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
35
+ ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
36
+ ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"
40
37
"github.com/spf13/cast"
41
38
42
39
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
@@ -195,14 +192,12 @@ type WasmApp struct {
195
192
interfaceRegistry types.InterfaceRegistry
196
193
197
194
// keys to access the substores
198
- keys map [string ]* storetypes.KVStoreKey
199
- tkeys map [string ]* storetypes.TransientStoreKey
200
- memKeys map [string ]* storetypes.MemoryStoreKey
195
+ keys map [string ]* storetypes.KVStoreKey
196
+ tkeys map [string ]* storetypes.TransientStoreKey
201
197
202
198
// keepers
203
199
AccountKeeper authkeeper.AccountKeeper
204
200
BankKeeper bankkeeper.BaseKeeper
205
- CapabilityKeeper * capabilitykeeper.Keeper
206
201
StakingKeeper * stakingkeeper.Keeper
207
202
SlashingKeeper slashingkeeper.Keeper
208
203
MintKeeper mintkeeper.Keeper
@@ -226,13 +221,6 @@ type WasmApp struct {
226
221
TransferKeeper ibctransferkeeper.Keeper
227
222
WasmKeeper wasmkeeper.Keeper
228
223
229
- ScopedIBCKeeper capabilitykeeper.ScopedKeeper
230
- ScopedICAHostKeeper capabilitykeeper.ScopedKeeper
231
- ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper
232
- ScopedTransferKeeper capabilitykeeper.ScopedKeeper
233
- ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper
234
- ScopedWasmKeeper capabilitykeeper.ScopedKeeper
235
-
236
224
// the module manager
237
225
ModuleManager * module.Manager
238
226
BasicModuleManager module.BasicManager
@@ -321,13 +309,12 @@ func NewWasmApp(
321
309
evidencetypes .StoreKey , circuittypes .StoreKey ,
322
310
authzkeeper .StoreKey , nftkeeper .StoreKey , group .StoreKey ,
323
311
// non sdk store keys
324
- capabilitytypes . StoreKey , ibcexported .StoreKey , ibctransfertypes .StoreKey , ibcfeetypes .StoreKey ,
312
+ ibcexported .StoreKey , ibctransfertypes .StoreKey , ibcfeetypes .StoreKey ,
325
313
wasmtypes .StoreKey , icahosttypes .StoreKey ,
326
314
icacontrollertypes .StoreKey ,
327
315
)
328
316
329
317
tkeys := storetypes .NewTransientStoreKeys (paramstypes .TStoreKey )
330
- memKeys := storetypes .NewMemoryStoreKeys (capabilitytypes .MemStoreKey )
331
318
332
319
// register streaming services
333
320
if err := bApp .RegisterStreamingServices (appOpts , keys ); err != nil {
@@ -342,7 +329,6 @@ func NewWasmApp(
342
329
interfaceRegistry : interfaceRegistry ,
343
330
keys : keys ,
344
331
tkeys : tkeys ,
345
- memKeys : memKeys ,
346
332
}
347
333
348
334
app .ParamsKeeper = initParamsKeeper (
@@ -361,20 +347,6 @@ func NewWasmApp(
361
347
)
362
348
bApp .SetParamStore (app .ConsensusParamsKeeper .ParamsStore )
363
349
364
- // add capability keeper and ScopeToModule for ibc module
365
- app .CapabilityKeeper = capabilitykeeper .NewKeeper (
366
- appCodec ,
367
- keys [capabilitytypes .StoreKey ],
368
- memKeys [capabilitytypes .MemStoreKey ],
369
- )
370
-
371
- scopedIBCKeeper := app .CapabilityKeeper .ScopeToModule (ibcexported .ModuleName )
372
- scopedICAHostKeeper := app .CapabilityKeeper .ScopeToModule (icahosttypes .SubModuleName )
373
- scopedICAControllerKeeper := app .CapabilityKeeper .ScopeToModule (icacontrollertypes .SubModuleName )
374
- scopedTransferKeeper := app .CapabilityKeeper .ScopeToModule (ibctransfertypes .ModuleName )
375
- scopedWasmKeeper := app .CapabilityKeeper .ScopeToModule (wasmtypes .ModuleName )
376
- app .CapabilityKeeper .Seal ()
377
-
378
350
// add keepers
379
351
380
352
app .AccountKeeper = authkeeper .NewAccountKeeper (
@@ -513,10 +485,9 @@ func NewWasmApp(
513
485
514
486
app .IBCKeeper = ibckeeper .NewKeeper (
515
487
appCodec ,
516
- keys [ibcexported .StoreKey ],
488
+ runtime . NewKVStoreService ( keys [ibcexported .StoreKey ]) ,
517
489
app .GetSubspace (ibcexported .ModuleName ),
518
490
app .UpgradeKeeper ,
519
- scopedIBCKeeper ,
520
491
authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
521
492
)
522
493
@@ -574,48 +545,42 @@ func NewWasmApp(
574
545
575
546
// IBC Fee Module keeper
576
547
app .IBCFeeKeeper = ibcfeekeeper .NewKeeper (
577
- appCodec , keys [ibcfeetypes .StoreKey ],
548
+ appCodec , runtime . NewKVStoreService ( keys [ibcfeetypes .StoreKey ]) ,
578
549
app .IBCKeeper .ChannelKeeper , // may be replaced with IBC middleware
579
550
app .IBCKeeper .ChannelKeeper ,
580
- app .IBCKeeper . PortKeeper , app . AccountKeeper , app .BankKeeper ,
551
+ app .AccountKeeper , app .BankKeeper ,
581
552
)
582
553
583
554
// Create Transfer Keepers
584
555
app .TransferKeeper = ibctransferkeeper .NewKeeper (
585
556
appCodec ,
586
- keys [ibctransfertypes .StoreKey ],
557
+ runtime . NewKVStoreService ( keys [ibctransfertypes .StoreKey ]) ,
587
558
app .GetSubspace (ibctransfertypes .ModuleName ),
588
559
app .IBCFeeKeeper , // ISC4 Wrapper: fee IBC middleware
589
560
app .IBCKeeper .ChannelKeeper ,
590
- app .IBCKeeper .PortKeeper ,
591
561
app .AccountKeeper ,
592
562
app .BankKeeper ,
593
- scopedTransferKeeper ,
594
563
authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
595
564
)
596
565
597
566
app .ICAHostKeeper = icahostkeeper .NewKeeper (
598
567
appCodec ,
599
- keys [icahosttypes .StoreKey ],
568
+ runtime . NewKVStoreService ( keys [icahosttypes .StoreKey ]) ,
600
569
app .GetSubspace (icahosttypes .SubModuleName ),
601
570
app .IBCFeeKeeper , // use ics29 fee as ics4Wrapper in middleware stack
602
571
app .IBCKeeper .ChannelKeeper ,
603
- app .IBCKeeper .PortKeeper ,
604
572
app .AccountKeeper ,
605
- scopedICAHostKeeper ,
606
573
app .MsgServiceRouter (),
607
574
app .GRPCQueryRouter (), // set grpc router for ica host
608
575
authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
609
576
)
610
577
611
578
app .ICAControllerKeeper = icacontrollerkeeper .NewKeeper (
612
579
appCodec ,
613
- keys [icacontrollertypes .StoreKey ],
580
+ runtime . NewKVStoreService ( keys [icacontrollertypes .StoreKey ]) ,
614
581
app .GetSubspace (icacontrollertypes .SubModuleName ),
615
582
app .IBCFeeKeeper , // use ics29 fee as ics4Wrapper in middleware stack
616
583
app .IBCKeeper .ChannelKeeper ,
617
- app .IBCKeeper .PortKeeper ,
618
- scopedICAControllerKeeper ,
619
584
app .MsgServiceRouter (),
620
585
authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
621
586
)
@@ -637,8 +602,6 @@ func NewWasmApp(
637
602
distrkeeper .NewQuerier (app .DistrKeeper ),
638
603
app .IBCFeeKeeper , // ISC4 Wrapper: fee IBC middleware
639
604
app .IBCKeeper .ChannelKeeper ,
640
- app .IBCKeeper .PortKeeper ,
641
- scopedWasmKeeper ,
642
605
app .TransferKeeper ,
643
606
app .MsgServiceRouter (),
644
607
app .GRPCQueryRouter (),
@@ -733,7 +696,6 @@ func NewWasmApp(
733
696
consensus .NewAppModule (appCodec , app .ConsensusParamsKeeper ),
734
697
circuit .NewAppModule (appCodec , app .CircuitKeeper ),
735
698
// non sdk modules
736
- capability .NewAppModule (appCodec , * app .CapabilityKeeper , false ),
737
699
wasm .NewAppModule (appCodec , & app .WasmKeeper , app .StakingKeeper , app .AccountKeeper , app .BankKeeper , app .MsgServiceRouter (), app .GetSubspace (wasmtypes .ModuleName )),
738
700
ibc .NewAppModule (app .IBCKeeper ),
739
701
transfer .NewAppModule (app .TransferKeeper ),
@@ -779,7 +741,6 @@ func NewWasmApp(
779
741
genutiltypes .ModuleName ,
780
742
authz .ModuleName ,
781
743
// additional non simd modules
782
- capabilitytypes .ModuleName ,
783
744
ibctransfertypes .ModuleName ,
784
745
ibcexported .ModuleName ,
785
746
icatypes .ModuleName ,
@@ -795,7 +756,6 @@ func NewWasmApp(
795
756
feegrant .ModuleName ,
796
757
group .ModuleName ,
797
758
// additional non simd modules
798
- capabilitytypes .ModuleName ,
799
759
ibctransfertypes .ModuleName ,
800
760
ibcexported .ModuleName ,
801
761
icatypes .ModuleName ,
@@ -812,7 +772,6 @@ func NewWasmApp(
812
772
// NOTE: wasm module should be at the end as it can call other module functionality direct or via message dispatching during
813
773
// genesis phase. For example bank transfer, auth account check, staking, ...
814
774
genesisModuleOrder := []string {
815
- capabilitytypes .ModuleName ,
816
775
// simd modules
817
776
authtypes .ModuleName , banktypes .ModuleName ,
818
777
distrtypes .ModuleName , stakingtypes .ModuleName , slashingtypes .ModuleName , govtypes .ModuleName ,
@@ -869,7 +828,6 @@ func NewWasmApp(
869
828
// initialize stores
870
829
app .MountKVStores (keys )
871
830
app .MountTransientStores (tkeys )
872
- app .MountMemoryStores (memKeys )
873
831
874
832
// initialize BaseApp
875
833
app .SetInitChainer (app .InitChainer )
@@ -890,12 +848,6 @@ func NewWasmApp(
890
848
}
891
849
}
892
850
893
- app .ScopedIBCKeeper = scopedIBCKeeper
894
- app .ScopedTransferKeeper = scopedTransferKeeper
895
- app .ScopedWasmKeeper = scopedWasmKeeper
896
- app .ScopedICAHostKeeper = scopedICAHostKeeper
897
- app .ScopedICAControllerKeeper = scopedICAControllerKeeper
898
-
899
851
// In v0.46, the SDK introduces _postHandlers_. PostHandlers are like
900
852
// antehandlers, but are run _after_ the `runMsgs` execution. They are also
901
853
// defined as a chain, and have the same signature as antehandlers.
@@ -1094,13 +1046,6 @@ func (app *WasmApp) GetTKey(storeKey string) *storetypes.TransientStoreKey {
1094
1046
return app .tkeys [storeKey ]
1095
1047
}
1096
1048
1097
- // GetMemKey returns the MemStoreKey for the provided mem key.
1098
- //
1099
- // NOTE: This is solely used for testing purposes.
1100
- func (app * WasmApp ) GetMemKey (storeKey string ) * storetypes.MemoryStoreKey {
1101
- return app .memKeys [storeKey ]
1102
- }
1103
-
1104
1049
// GetSubspace returns a param subspace for a given module name.
1105
1050
//
1106
1051
// NOTE: This is solely to be used for testing purposes.
0 commit comments