Skip to content

Commit

Permalink
Merge QGB feature branch into main (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id authored Sep 23, 2022
2 parents d53f66b + 13a9db9 commit 53d688e
Show file tree
Hide file tree
Showing 58 changed files with 7,126 additions and 248 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ frontend/.cache
secret.yml
build
coverage.txt
.idea
.vscode
tools-stamp
.vscode
profile.out
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test:
.PHONY: test

proto-gen:
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen:latest sh ./scripts/protocgen.sh
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen:v0.7 sh ./scripts/protocgen.sh

proto-lint:
@$(DOCKER_BUF) lint --error-format=json
Expand Down
28 changes: 16 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,21 @@ func New(
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper)
app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String())

app.QgbKeeper = *qgbmodulekeeper.NewKeeper(
appCodec,
keys[qgbmoduletypes.StoreKey],
app.GetSubspace(qgbmoduletypes.ModuleName),
&stakingKeeper,
)
qgbmod := qgbmodule.NewAppModule(appCodec, app.QgbKeeper)

// register the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
app.StakingKeeper = *stakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()),
stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(),
app.SlashingKeeper.Hooks(),
app.QgbKeeper.Hooks(),
),
)

// ... other modules keepers
Expand All @@ -329,7 +340,7 @@ func New(
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper))
// AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))
// AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))

// Create Transfer Keepers
// app.TransferKeeper = ibctransferkeeper.NewKeeper(
Expand Down Expand Up @@ -357,14 +368,7 @@ func New(
app.PaymentKeeper = *paymentmodulekeeper.NewKeeper(
appCodec,
)
paymentmodule := paymentmodule.NewAppModule(appCodec, app.PaymentKeeper)

app.QgbKeeper = *qgbmodulekeeper.NewKeeper(
appCodec,
keys[qgbmoduletypes.StoreKey],
keys[qgbmoduletypes.MemStoreKey],
)
qgbmodule := qgbmodule.NewAppModule(appCodec, app.QgbKeeper)
paymentmod := paymentmodule.NewAppModule(appCodec, app.PaymentKeeper)

// // Create static IBC router, add transfer route, then set and seal it
// ibcRouter := ibcporttypes.NewRouter()
Expand Down Expand Up @@ -401,8 +405,8 @@ func New(
// ibc.NewAppModule(app.IBCKeeper),
params.NewAppModule(app.ParamsKeeper),
// transferModule,
paymentmodule,
qgbmodule,
paymentmod,
qgbmod,
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand Down
Loading

0 comments on commit 53d688e

Please sign in to comment.