Skip to content

Commit

Permalink
chore(dist): setting default values for distribution module (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsitrin authored Apr 14, 2024
1 parent bf14e28 commit 8a566e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions x/dist/module.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dist

import (
"encoding/json"
"time"

abci "github.com/tendermint/tendermint/abci/types"
Expand Down Expand Up @@ -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)
}

0 comments on commit 8a566e6

Please sign in to comment.