From 8a566e6a2fe40b22cddb04580eb5bb39d0b05a3f Mon Sep 17 00:00:00 2001 From: Michael Tsitrin <114929630+mtsitrin@users.noreply.github.com> Date: Sun, 14 Apr 2024 13:24:02 +0300 Subject: [PATCH] chore(dist): setting default values for distribution module (#379) --- x/dist/module.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/x/dist/module.go b/x/dist/module.go index cae083f6..73ff6370 100644 --- a/x/dist/module.go +++ b/x/dist/module.go @@ -1,6 +1,7 @@ package dist import ( + "encoding/json" "time" abci "github.com/tendermint/tendermint/abci/types" @@ -66,3 +67,14 @@ func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { consAddr := sdk.ConsAddress(req.Header.ProposerAddress) am.keeper.SetPreviousProposerConsAddr(ctx, consAddr) } + +func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + defGenesis := types.DefaultGenesisState() + + // by default, all rewards goes to the governers + defGenesis.Params.CommunityTax = sdk.ZeroDec() + defGenesis.Params.BaseProposerReward = sdk.ZeroDec() + defGenesis.Params.BonusProposerReward = sdk.ZeroDec() + + return cdc.MustMarshalJSON(defGenesis) +}