github.com/Finschia/finschia-sdk@v0.48.1/x/distribution/keeper/params.go (about) 1 package keeper 2 3 import ( 4 sdk "github.com/Finschia/finschia-sdk/types" 5 "github.com/Finschia/finschia-sdk/x/distribution/types" 6 ) 7 8 // GetParams returns the total set of distribution parameters. 9 func (k Keeper) GetParams(clientCtx sdk.Context) (params types.Params) { 10 k.paramSpace.GetParamSet(clientCtx, ¶ms) 11 return params 12 } 13 14 // SetParams sets the distribution parameters to the param space. 15 func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { 16 k.paramSpace.SetParamSet(ctx, ¶ms) 17 } 18 19 // GetCommunityTax returns the current distribution community tax. 20 func (k Keeper) GetCommunityTax(ctx sdk.Context) (percent sdk.Dec) { 21 k.paramSpace.Get(ctx, types.ParamStoreKeyCommunityTax, &percent) 22 return percent 23 } 24 25 // GetBaseProposerReward returns the current distribution base proposer rate. 26 func (k Keeper) GetBaseProposerReward(ctx sdk.Context) (percent sdk.Dec) { 27 k.paramSpace.Get(ctx, types.ParamStoreKeyBaseProposerReward, &percent) 28 return percent 29 } 30 31 // GetBonusProposerReward returns the current distribution bonus proposer reward 32 // rate. 33 func (k Keeper) GetBonusProposerReward(ctx sdk.Context) (percent sdk.Dec) { 34 k.paramSpace.Get(ctx, types.ParamStoreKeyBonusProposerReward, &percent) 35 return percent 36 } 37 38 // GetWithdrawAddrEnabled returns the current distribution withdraw address 39 // enabled parameter. 40 func (k Keeper) GetWithdrawAddrEnabled(ctx sdk.Context) (enabled bool) { 41 k.paramSpace.Get(ctx, types.ParamStoreKeyWithdrawAddrEnabled, &enabled) 42 return enabled 43 }