Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(x/data): add data module to stable app config #887

Merged
merged 4 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ import (

moduletypes "github.com/regen-network/regen-ledger/types/module"
"github.com/regen-network/regen-ledger/types/module/server"
data "github.com/regen-network/regen-ledger/x/data/module"
"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/basket"
ecocreditmodule "github.com/regen-network/regen-ledger/x/ecocredit/module"
Expand Down Expand Up @@ -135,6 +136,7 @@ var (
feegrantmodule.AppModuleBasic{},
authzmodule.AppModuleBasic{},
ecocreditmodule.Module{},
data.Module{},
}, setCustomModuleBasics()...)...,
)

Expand Down Expand Up @@ -388,7 +390,7 @@ func NewRegenApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest
app.BankKeeper,
app.DistrKeeper,
)
newModules := []moduletypes.Module{ecocreditModule}
newModules := []moduletypes.Module{ecocreditModule, data.Module{}}
err := app.smm.RegisterModules(newModules)
if err != nil {
panic(err)
Expand Down
3 changes: 0 additions & 3 deletions app/experimental_appconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (

moduletypes "github.com/regen-network/regen-ledger/types/module"
"github.com/regen-network/regen-ledger/types/module/server"
data "github.com/regen-network/regen-ledger/x/data/module"
group "github.com/regen-network/regen-ledger/x/group/module"
)

Expand All @@ -44,7 +43,6 @@ func setCustomModuleBasics() []module.AppModuleBasic {
)...,
),
wasm.AppModuleBasic{},
data.Module{},
group.Module{},
}
}
Expand Down Expand Up @@ -105,7 +103,6 @@ func setCustomModules(app *RegenApp, interfaceRegistry types.InterfaceRegistry)
groupModule := group.Module{AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper}
// use a separate newModules from the global NewModules here because we need to pass state into the group module
newModules := []moduletypes.Module{
data.Module{},
groupModule,
}
err := newModuleManager.RegisterModules(newModules)
Expand Down