From 2ddb4d1e595e962adbeff55a28ad2f205650e5ec Mon Sep 17 00:00:00 2001 From: Thomas van Dam Date: Fri, 16 Aug 2024 16:49:21 +0200 Subject: [PATCH] chore(data-proxy): wire data-proxy module into app Part-of: #316 --- app/app.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index bb047d2f..e1bb45e6 100644 --- a/app/app.go +++ b/app/app.go @@ -131,6 +131,9 @@ import ( "github.com/sedaprotocol/seda-chain/app/keepers" appparams "github.com/sedaprotocol/seda-chain/app/params" "github.com/sedaprotocol/seda-chain/docs" + dataproxy "github.com/sedaprotocol/seda-chain/x/data-proxy" + dataproxykeeper "github.com/sedaprotocol/seda-chain/x/data-proxy/keeper" + dataproxytypes "github.com/sedaprotocol/seda-chain/x/data-proxy/types" "github.com/sedaprotocol/seda-chain/x/staking" stakingkeeper "github.com/sedaprotocol/seda-chain/x/staking/keeper" "github.com/sedaprotocol/seda-chain/x/tally" @@ -182,6 +185,7 @@ var ( packetforward.AppModuleBasic{}, wasmstorage.AppModuleBasic{}, tally.AppModuleBasic{}, + dataproxy.AppModuleBasic{}, ) // module account permissions @@ -238,6 +242,7 @@ type App struct { // SEDA modules keepers WasmStorageKeeper wasmstoragekeeper.Keeper TallyKeeper tallykeeper.Keeper + DataProxyKeeper dataproxykeeper.Keeper mm *module.Manager bmm module.BasicManager @@ -302,7 +307,7 @@ func NewApp( feegrant.StoreKey, evidencetypes.StoreKey, circuittypes.StoreKey, authzkeeper.StoreKey, group.StoreKey, capabilitytypes.StoreKey, ibcexported.StoreKey, ibctransfertypes.StoreKey, ibcfeetypes.StoreKey, wasmtypes.StoreKey, icahosttypes.StoreKey, icacontrollertypes.StoreKey, packetforwardtypes.StoreKey, - crisistypes.StoreKey, wasmstoragetypes.StoreKey, + crisistypes.StoreKey, wasmstoragetypes.StoreKey, dataproxytypes.StoreKey, ) memKeys := storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) @@ -624,6 +629,8 @@ func NewApp( app.TallyKeeper = tallykeeper.NewKeeper(app.WasmStorageKeeper, contractKeeper, app.WasmKeeper) + app.DataProxyKeeper = *dataproxykeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[dataproxytypes.StoreKey]), authtypes.NewModuleAddress(govtypes.ModuleName).String()) + /* =================================================== */ /* TRANSFER STACK */ /* =================================================== */ @@ -737,6 +744,7 @@ func NewApp( packetforward.NewAppModule(app.PacketForwardKeeper, nil), wasmstorage.NewAppModule(appCodec, app.WasmStorageKeeper), tally.NewAppModule(app.TallyKeeper), + dataproxy.NewAppModule(appCodec, app.DataProxyKeeper), crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, nil), // always be last to make sure that it checks for all invariants and not only part of them ) @@ -793,6 +801,7 @@ func NewApp( // custom modules wasmstoragetypes.ModuleName, tallytypes.ModuleName, + dataproxytypes.ModuleName, ) app.mm.SetOrderEndBlockers( @@ -823,6 +832,7 @@ func NewApp( // custom modules wasmstoragetypes.ModuleName, tallytypes.ModuleName, + dataproxytypes.ModuleName, ) // NOTE: The genutils module must occur after sdkstaking so that pools are @@ -859,6 +869,7 @@ func NewApp( // custom modules wasmstoragetypes.ModuleName, tallytypes.ModuleName, + dataproxytypes.ModuleName, } app.mm.SetOrderInitGenesis(genesisModuleOrder...) app.mm.SetOrderExportGenesis(genesisModuleOrder...)