Versions in this module Expand all Collapse all v1 v1.0.0 Jan 6, 2023 Changes in this version + var Addrs = createTestAddrs(500) + var DefaultMSD = sdk.NewDecWithPrec(1, 3) + func CreateValidators(t *testing.T, stakingHandler sdk.Handler, ctx sdk.Context, ...) + func MakeTestCodec() *codec.Codec + func NewQuerier(keeper Keeper) sdk.Querier + func Tally(ctx sdk.Context, keeper Keeper, proposal types.Proposal, ...) (types.ProposalStatus, bool, types.TallyResult) + type BankKeeper interface + GetCoins func(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SendCoins func(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error + SetSendEnabled func(ctx sdk.Context, enabled bool) + SubtractCoins func(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Error) + type Keeper struct + func CreateTestInput(t *testing.T, isCheckTx bool, initBalance int64) (sdk.Context, auth.AccountKeeper, Keeper, staking.Keeper, crisis.Keeper) + func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramsKeeper params.Keeper, ...) Keeper + func (keeper Keeper) ActiveProposalQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator + func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress, ...) sdk.Error + func (keeper Keeper) AddVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress, ...) (sdk.Error, string) + func (keeper Keeper) AfterDepositPeriodPassed(ctx sdk.Context, proposal types.Proposal) + func (keeper Keeper) AfterSubmitProposalHandler(ctx sdk.Context, proposal types.Proposal) + func (keeper Keeper) BankKeeper() BankKeeper + func (keeper Keeper) Cdc() *codec.Codec + func (keeper Keeper) CheckMsgSubmitProposal(ctx sdk.Context, msg types.MsgSubmitProposal) sdk.Error + func (keeper Keeper) DeleteDeposits(ctx sdk.Context, proposalID uint64) + func (keeper Keeper) DeleteProposal(ctx sdk.Context, proposalID uint64) + func (keeper Keeper) DeleteVotes(ctx sdk.Context, proposalID uint64) + func (keeper Keeper) DistributeDeposits(ctx sdk.Context, proposalID uint64) + func (keeper Keeper) GetAllDeposits(ctx sdk.Context) (deposits types.Deposits) + func (keeper Keeper) GetAllVotes(ctx sdk.Context) (votes types.Votes) + func (keeper Keeper) GetDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) (deposit types.Deposit, found bool) + func (keeper Keeper) GetDepositParams(ctx sdk.Context) types.DepositParams + func (keeper Keeper) GetDeposits(ctx sdk.Context, proposalID uint64) (deposits types.Deposits) + func (keeper Keeper) GetDepositsIterator(ctx sdk.Context, proposalID uint64) sdk.Iterator + func (keeper Keeper) GetGovernanceAccount(ctx sdk.Context) supplyexported.ModuleAccountI + func (keeper Keeper) GetMaxDepositPeriod(ctx sdk.Context, content types.Content) time.Duration + func (keeper Keeper) GetMinDeposit(ctx sdk.Context, content types.Content) sdk.SysCoins + func (keeper Keeper) GetProposal(ctx sdk.Context, proposalID uint64) (proposal types.Proposal, ok bool) + func (keeper Keeper) GetProposalID(ctx sdk.Context) (proposalID uint64, err sdk.Error) + func (keeper Keeper) GetProposals(ctx sdk.Context) (proposals types.Proposals) + func (keeper Keeper) GetProposalsFiltered(ctx sdk.Context, voterAddr sdk.AccAddress, depositorAddr sdk.AccAddress, ...) []types.Proposal + func (keeper Keeper) GetTallyParams(ctx sdk.Context) types.TallyParams + func (keeper Keeper) GetVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) (vote types.Vote, found bool) + func (keeper Keeper) GetVotes(ctx sdk.Context, proposalID uint64) (votes types.Votes) + func (keeper Keeper) GetVotesIterator(ctx sdk.Context, proposalID uint64) sdk.Iterator + func (keeper Keeper) GetVotingParams(ctx sdk.Context) types.VotingParams + func (keeper Keeper) GetVotingPeriod(ctx sdk.Context, content types.Content) time.Duration + func (keeper Keeper) InactiveProposalQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator + func (keeper Keeper) InsertActiveProposalQueue(ctx sdk.Context, proposalID uint64, endTime time.Time) + func (keeper Keeper) InsertInactiveProposalQueue(ctx sdk.Context, proposalID uint64, endTime time.Time) + func (keeper Keeper) InsertWaitingProposalQueue(ctx sdk.Context, blockHeight, proposalID uint64) + func (keeper Keeper) IterateActiveProposalsQueue(ctx sdk.Context, endTime time.Time, ...) + func (keeper Keeper) IterateAllDeposits(ctx sdk.Context, cb func(deposit types.Deposit) (stop bool)) + func (keeper Keeper) IterateAllVotes(ctx sdk.Context, cb func(vote types.Vote) (stop bool)) + func (keeper Keeper) IterateAllWaitingProposals(ctx sdk.Context, ...) + func (keeper Keeper) IterateDeposits(ctx sdk.Context, proposalID uint64, cb func(deposit types.Deposit) (stop bool)) + func (keeper Keeper) IterateInactiveProposalsQueue(ctx sdk.Context, endTime time.Time, ...) + func (keeper Keeper) IterateProposals(ctx sdk.Context, cb func(proposal types.Proposal) (stop bool)) + func (keeper Keeper) IterateVotes(ctx sdk.Context, proposalID uint64, cb func(vote types.Vote) (stop bool)) + func (keeper Keeper) IterateWaitingProposalsQueue(ctx sdk.Context, height uint64, cb func(proposal types.Proposal) (stop bool)) + func (keeper Keeper) Logger(ctx sdk.Context) log.Logger + func (keeper Keeper) ProposalHandlerRouter() ProposalHandlerRouter + func (keeper Keeper) RefundDeposits(ctx sdk.Context, proposalID uint64) + func (keeper Keeper) RejectedHandler(ctx sdk.Context, content types.Content) + func (keeper Keeper) RemoveFromActiveProposalQueue(ctx sdk.Context, proposalID uint64, endTime time.Time) + func (keeper Keeper) RemoveFromInactiveProposalQueue(ctx sdk.Context, proposalID uint64, endTime time.Time) + func (keeper Keeper) RemoveFromWaitingProposalQueue(ctx sdk.Context, blockHeight, proposalID uint64) + func (keeper Keeper) Router() Router + func (keeper Keeper) SetDeposit(ctx sdk.Context, deposit types.Deposit) + func (keeper Keeper) SetDepositParams(ctx sdk.Context, depositParams types.DepositParams) + func (keeper Keeper) SetProposal(ctx sdk.Context, proposal types.Proposal) + func (keeper Keeper) SetProposalID(ctx sdk.Context, proposalID uint64) + func (keeper Keeper) SetTallyParams(ctx sdk.Context, tallyParams types.TallyParams) + func (keeper Keeper) SetVote(ctx sdk.Context, proposalID uint64, vote types.Vote) + func (keeper Keeper) SetVotingParams(ctx sdk.Context, votingParams types.VotingParams) + func (keeper Keeper) SubmitProposal(ctx sdk.Context, content types.Content) (types.Proposal, sdk.Error) + func (keeper Keeper) SupplyKeeper() SupplyKeeper + func (keeper Keeper) VoteHandler(ctx sdk.Context, proposal types.Proposal, vote types.Vote) (string, sdk.Error) + func (keeper Keeper) WaitingProposalQueueIterator(ctx sdk.Context, blockHeight uint64) sdk.Iterator + type ProposalHandler interface + AfterDepositPeriodPassed func(ctx sdk.Context, proposal types.Proposal) + AfterSubmitProposalHandler func(ctx sdk.Context, proposal types.Proposal) + CheckMsgSubmitProposal func(ctx sdk.Context, msg types.MsgSubmitProposal) sdk.Error + GetMaxDepositPeriod func(ctx sdk.Context, content types.Content) time.Duration + GetMinDeposit func(ctx sdk.Context, content types.Content) sdk.SysCoins + GetVotingPeriod func(ctx sdk.Context, content types.Content) time.Duration + RejectedHandler func(ctx sdk.Context, content types.Content) + VoteHandler func(ctx sdk.Context, proposal types.Proposal, vote types.Vote) (string, sdk.Error) + type ProposalHandlerRouter interface + AddRoute func(r string, mp ProposalHandler) (mpr ProposalHandlerRouter) + GetRoute func(path string) (h ProposalHandler) + HasRoute func(r string) bool + Seal func() + func NewProposalHandlerRouter() ProposalHandlerRouter + type Router interface + AddRoute func(r string, h types.Handler) (rtr Router) + GetRoute func(path string) (h types.Handler) + HasRoute func(r string) bool + Seal func() + func NewRouter() Router + type StakingKeeper interface + Delegator func(ctx sdk.Context, delAddr sdk.AccAddress) stakingexported.DelegatorI + IterateBondedValidatorsByPower func(sdk.Context, ...) + type SupplyKeeper interface + BurnCoins func(ctx sdk.Context, name string, amt sdk.Coins) sdk.Error + GetModuleAccount func(ctx sdk.Context, name string) supplyexported.ModuleAccountI + GetModuleAddress func(name string) sdk.AccAddress + SendCoinsFromAccountToModule func(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, ...) sdk.Error + SendCoinsFromModuleToAccount func(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, ...) sdk.Error + SendCoinsFromModuleToModule func(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) sdk.Error + SetModuleAccount func(sdk.Context, supplyexported.ModuleAccountI)