github.com/cosmos/cosmos-sdk@v0.50.10/x/distribution/keeper/params.go (about) 1 package keeper 2 3 import ( 4 "context" 5 6 "cosmossdk.io/math" 7 ) 8 9 // GetCommunityTax returns the current distribution community tax. 10 func (k Keeper) GetCommunityTax(ctx context.Context) (math.LegacyDec, error) { 11 params, err := k.Params.Get(ctx) 12 if err != nil { 13 return math.LegacyDec{}, err 14 } 15 16 return params.CommunityTax, nil 17 } 18 19 // GetWithdrawAddrEnabled returns the current distribution withdraw address 20 // enabled parameter. 21 func (k Keeper) GetWithdrawAddrEnabled(ctx context.Context) (enabled bool, err error) { 22 params, err := k.Params.Get(ctx) 23 if err != nil { 24 return false, err 25 } 26 27 return params.WithdrawAddrEnabled, nil 28 }