@@ -28,7 +28,7 @@ import (
2828 "github.com/cosmos/cosmos-sdk/x/group"
2929 groupmodule "github.com/cosmos/cosmos-sdk/x/group/module"
3030 "github.com/cosmos/cosmos-sdk/x/protocolpool"
31- "github.com/cosmos/gaia/v25 /x/liquid"
31+ "github.com/cosmos/gaia/v27 /x/liquid"
3232 "github.com/cosmos/gogoproto/proto"
3333 icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller"
3434 ibccallbacks "github.com/cosmos/ibc-go/v10/modules/apps/callbacks"
@@ -51,6 +51,10 @@ import (
5151 transferv2 "github.com/cosmos/ibc-go/v10/modules/apps/transfer/v2"
5252 "github.com/gorilla/mux"
5353 "github.com/rakyll/statik/fs"
54+ "github.com/strangelove-ventures/tokenfactory/x/tokenfactory"
55+ "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/bindings"
56+ tokenfactorykeeper "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/keeper"
57+ tokenfactorytypes "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/types"
5458
5559 autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
5660 reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
@@ -122,8 +126,8 @@ import (
122126 "github.com/cosmos/cosmos-sdk/x/staking"
123127 stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
124128 stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
125- liquidkeeper "github.com/cosmos/gaia/v25 /x/liquid/keeper"
126- liquidtypes "github.com/cosmos/gaia/v25 /x/liquid/types"
129+ liquidkeeper "github.com/cosmos/gaia/v27 /x/liquid/keeper"
130+ liquidtypes "github.com/cosmos/gaia/v27 /x/liquid/types"
127131 ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts"
128132 icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper"
129133 icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types"
@@ -160,6 +164,16 @@ var (
160164 // of "EnableAllProposals" (takes precedence over ProposalsEnabled)
161165 // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
162166 EnableSpecificProposals = ""
167+
168+ tokenFactoryCapabilities = []string {
169+ tokenfactorytypes .EnableSudoMint ,
170+ tokenfactorytypes .EnableBurnOwn ,
171+ //tokenfactorytypes.EnableBurnOwnUnregistered,
172+ //tokenfactorytypes.EnableBurnFrom,
173+ //tokenfactorytypes.EnableForceTransfer,
174+ tokenfactorytypes .EnableSetMetadata ,
175+ tokenfactorytypes .EnableCommunityPoolFeeFunding ,
176+ }
163177)
164178
165179func ConvertToProposals (keys []string ) ([]wasmtypes.ProposalType , error ) {
@@ -212,9 +226,10 @@ var (
212226 protocolpooltypes .ModuleName : nil ,
213227 protocolpooltypes .ProtocolPoolEscrowAccount : nil ,
214228 // non sdk modules
215- ibctransfertypes .ModuleName : {authtypes .Minter , authtypes .Burner },
216- icatypes .ModuleName : nil ,
217- wasmtypes .ModuleName : {authtypes .Burner },
229+ ibctransfertypes .ModuleName : {authtypes .Minter , authtypes .Burner },
230+ icatypes .ModuleName : nil ,
231+ wasmtypes .ModuleName : {authtypes .Burner },
232+ tokenfactorytypes .ModuleName : {authtypes .Minter , authtypes .Burner },
218233 }
219234)
220235
@@ -278,6 +293,7 @@ type App struct {
278293 ICAHostKeeper icahostkeeper.Keeper
279294 TransferKeeper ibctransferkeeper.Keeper
280295 WasmKeeper wasmkeeper.Keeper
296+ TokenFactoryKeeper tokenfactorykeeper.Keeper
281297
282298 // the module manager
283299 mm * module.Manager
@@ -347,6 +363,7 @@ func New(
347363 ibcexported .StoreKey , ibctransfertypes .StoreKey ,
348364 wasmtypes .StoreKey , icahosttypes .StoreKey ,
349365 icacontrollertypes .StoreKey ,
366+ tokenfactorytypes .StoreKey ,
350367 paramstypes .StoreKey ,
351368 CapabilityStoreKey ,
352369 liquidtypes .StoreKey ,
@@ -407,6 +424,7 @@ func New(
407424 slashingSS := app .ParamsKeeper .Subspace (slashingtypes .ModuleName ).WithKeyTable (slashingtypes .ParamKeyTable ())
408425
409426 govSS := app .ParamsKeeper .Subspace (govtypes .ModuleName ).WithKeyTable (govv1 .ParamKeyTable ())
427+ tokenFactorySS := app .ParamsKeeper .Subspace (tokenfactorytypes .ModuleName )
410428
411429 // Combine legacy IBC ParamSets so all migrators (client, connection, channel)
412430 // can read their old params from x/params during the upgrade.
@@ -583,7 +601,7 @@ func New(
583601
584602 app .GovKeeper = * govKeeper .SetHooks (
585603 govtypes .NewMultiGovHooks (
586- // register the governance hooks
604+ // register the governance hooks
587605 ),
588606 )
589607
@@ -606,14 +624,27 @@ func New(
606624 // If evidence needs to be handled for the app, set routes in router here and seal
607625 app .EvidenceKeeper = * evidenceKeeper
608626
627+ // Create the TokenFactory Keeper
628+ app .TokenFactoryKeeper = tokenfactorykeeper .NewKeeper (
629+ appCodec ,
630+ app .keys [tokenfactorytypes .StoreKey ],
631+ maccPerms ,
632+ app .AccountKeeper ,
633+ app .BankKeeper ,
634+ app .DistrKeeper ,
635+ tokenFactoryCapabilities ,
636+ authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
637+ )
638+ wasmOpts = append (wasmOpts , bindings .RegisterCustomPlugins (app .BankKeeper , & app .TokenFactoryKeeper )... )
639+
609640 app .EpochsKeeper = epochskeeper .NewKeeper (
610641 runtime .NewKVStoreService (keys [epochstypes .StoreKey ]),
611642 appCodec ,
612643 )
613644
614645 app .EpochsKeeper .SetHooks (
615646 epochstypes .NewMultiEpochHooks (
616- // insert epoch hooks receivers here
647+ // insert epoch hooks receivers here
617648 ),
618649 )
619650
@@ -763,6 +794,7 @@ func New(
763794 transfer .NewAppModule (app .TransferKeeper ),
764795 ica .NewAppModule (& app .ICAControllerKeeper , & app .ICAHostKeeper ),
765796 ibctm .NewAppModule (tmLightClientModule ),
797+ tokenfactory .NewAppModule (app .TokenFactoryKeeper , app .AccountKeeper , app .BankKeeper , tokenFactorySS ),
766798 liquid .NewAppModule (appCodec , app .LiquidKeeper , app .AccountKeeper , app .BankKeeper , app .StakingKeeper ),
767799 )
768800
@@ -806,6 +838,7 @@ func New(
806838 icatypes .ModuleName ,
807839 liquidtypes .ModuleName ,
808840 wasmtypes .ModuleName ,
841+ tokenfactorytypes .ModuleName ,
809842 )
810843
811844 app .mm .SetOrderEndBlockers (
@@ -820,6 +853,7 @@ func New(
820853 ibcexported .ModuleName ,
821854 icatypes .ModuleName ,
822855 wasmtypes .ModuleName ,
856+ tokenfactorytypes .ModuleName ,
823857 )
824858
825859 // NOTE: The genutils module must occur after staking so that pools are
@@ -857,6 +891,7 @@ func New(
857891 icatypes .ModuleName ,
858892 // wasm after ibc transfer
859893 wasmtypes .ModuleName ,
894+ tokenfactorytypes .ModuleName ,
860895 liquidtypes .ModuleName ,
861896 }
862897
@@ -886,6 +921,7 @@ func New(
886921 icatypes .ModuleName ,
887922 // wasm after ibc transfer
888923 wasmtypes .ModuleName ,
924+ tokenfactorytypes .ModuleName ,
889925 liquidtypes .ModuleName ,
890926 }
891927
0 commit comments