Documentation ¶
Overview ¶
Package keeper contains dao module keeper.
Index ¶
- type Keeper
- func (k Keeper) ExchangeWithTreasuryProposal(ctx sdk.Context, request *types.ExchangeWithTreasuryProposal) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) FundAccountProposal(ctx sdk.Context, request *types.FundAccountProposal) error
- func (k Keeper) FundTreasuryProposal(ctx sdk.Context, request *types.FundTreasuryProposal) error
- func (k Keeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
- func (k Keeper) GetDaoDelegationSupply(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) InflateDao(ctx sdk.Context) (err error)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MaxProposalRate(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) MaxValCommission(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) PoolRate(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) ReBalanceDelegation(ctx sdk.Context) error
- func (k Keeper) SendCoins(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) Treasury(ctx sdk.Context) sdk.Coins
- func (k Keeper) UndelegateAllValidators(ctx sdk.Context) (err error)
- func (k Keeper) VoteAbstain(ctx sdk.Context) (err error)
- func (k Keeper) WithdrawReward(ctx sdk.Context) error
- func (k Keeper) WithdrawRewardPeriod(ctx sdk.Context) (res int64)
- type QueryServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper is a dao keeper struct.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, ps types.ParamSubspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, distributionKeeper types.DistributionKeeper, govKeeper types.GovKeeper, mintKeeper types.MintKeeper, stakingKeeper types.StakingKeeper, ) *Keeper
NewKeeper creates new dao keeper.
func (Keeper) ExchangeWithTreasuryProposal ¶
func (k Keeper) ExchangeWithTreasuryProposal(ctx sdk.Context, request *types.ExchangeWithTreasuryProposal) error
ExchangeWithTreasuryProposal submits the ExchangeWithTreasuryProposal.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func (Keeper) FundAccountProposal ¶
FundAccountProposal submits the FundAccountProposal.
func (Keeper) FundTreasuryProposal ¶
FundTreasuryProposal submits the FundTreasuryProposal.
func (Keeper) GetBalance ¶ added in v1.1.0
GetBalance returns account balance.
func (Keeper) GetDaoDelegationSupply ¶
GetDaoDelegationSupply returns total amount of the treasury bonded coins.
func (Keeper) InflateDao ¶ added in v1.1.0
InflateDao inflates treasury by APR from minter.
func (Keeper) InitGenesis ¶
InitGenesis sets dao module information from genesis.
func (Keeper) MaxProposalRate ¶
MaxProposalRate - the rate of max allowed proposal from the treasury amount.
func (Keeper) MaxValCommission ¶
MaxValCommission - the max validator's commission to be staked by the dao.
func (Keeper) ReBalanceDelegation ¶
ReBalanceDelegation re-balances the DAO staking among validators bases on the current validators self bond.
func (Keeper) UndelegateAllValidators ¶ added in v1.1.0
UndelegateAllValidators undelegate all validators.
func (Keeper) VoteAbstain ¶
VoteAbstain votes abstain on all the proposals from the DAO account.
func (Keeper) WithdrawReward ¶
WithdrawReward withdraw dao delegation reward.
type QueryServer ¶
type QueryServer struct {
// contains filtered or unexported fields
}
QueryServer is keep wrapper which provides query capabilities.
func NewQueryServer ¶
func NewQueryServer(keeper Keeper) *QueryServer
NewQueryServer creates a new instance of QueryServer.
func (QueryServer) Params ¶
func (q QueryServer) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params return dao module current params values.
func (QueryServer) Treasury ¶
func (q QueryServer) Treasury(c context.Context, _ *types.QueryTreasuryRequest) (*types.QueryTreasuryResponse, error)
Treasury returns the treasury balance.