keeper

package
v0.46.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, k Keeper)

BeginBlocker withdraws rewards from fee-collector before the distribution module's withdraw.

func EndBlocker

func EndBlocker(ctx sdk.Context, k Keeper)

func NewMsgServer

func NewMsgServer(keeper Keeper) foundation.MsgServer

NewMsgServer returns an implementation of the token MsgServer interface for the provided Keeper.

func NewProposalHandler

func NewProposalHandler(k Keeper) govtypes.Handler

func NewQueryServer

func NewQueryServer(keeper Keeper) foundation.QueryServer

func Uint64FromBytes

func Uint64FromBytes(bz []byte) uint64

Uint64FromBytes converts a byte array to uint64

func Uint64ToBytes

func Uint64ToBytes(number uint64) []byte

Uint64ToBytes converts a number in uint64 to a byte array

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper defines the foundation module Keeper

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	key sdk.StoreKey,
	router *baseapp.MsgServiceRouter,
	authKeeper foundation.AuthKeeper,
	bankKeeper foundation.BankKeeper,
	stakingKeeper foundation.StakingKeeper,
	feeCollectorName string,
	config foundation.Config,
) Keeper

NewKeeper returns a foundation keeper. It handles: - updating validator auths.

CONTRACT: the parameter Subspace must have the param key table already initialized

func (Keeper) Accept

func (k Keeper) Accept(ctx sdk.Context, granter string, grantee sdk.AccAddress, msg sdk.Msg) error

func (Keeper) Cleanup

func (k Keeper) Cleanup(ctx sdk.Context)

Cleaning up the states

func (Keeper) CollectFoundationTax

func (k Keeper) CollectFoundationTax(ctx sdk.Context) error

func (Keeper) Exec

func (k Keeper) Exec(ctx sdk.Context, proposalID uint64) error

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *foundation.GenesisState

func (Keeper) FundTreasury

func (k Keeper) FundTreasury(ctx sdk.Context, from sdk.AccAddress, amt sdk.Coins) error

func (Keeper) GetAdmin

func (k Keeper) GetAdmin(ctx sdk.Context) sdk.AccAddress

func (Keeper) GetAuthorization

func (k Keeper) GetAuthorization(ctx sdk.Context, granter string, grantee sdk.AccAddress, msgTypeURL string) (foundation.Authorization, error)

func (Keeper) GetEnabled

func (k Keeper) GetEnabled(ctx sdk.Context) bool

aliases

func (Keeper) GetFoundationInfo

func (k Keeper) GetFoundationInfo(ctx sdk.Context) foundation.FoundationInfo

func (Keeper) GetFoundationTax

func (k Keeper) GetFoundationTax(ctx sdk.Context) sdk.Dec

func (Keeper) GetGrants

func (k Keeper) GetGrants(ctx sdk.Context) []foundation.GrantAuthorization

func (Keeper) GetMember

func (k Keeper) GetMember(ctx sdk.Context, address sdk.AccAddress) (*foundation.Member, error)

func (Keeper) GetMembers

func (k Keeper) GetMembers(ctx sdk.Context) []foundation.Member

func (Keeper) GetOperator

func (k Keeper) GetOperator(ctx sdk.Context) sdk.AccAddress

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) *foundation.Params

func (Keeper) GetProposal

func (k Keeper) GetProposal(ctx sdk.Context, id uint64) (*foundation.Proposal, error)

func (Keeper) GetProposals

func (k Keeper) GetProposals(ctx sdk.Context) []foundation.Proposal

func (Keeper) GetTreasury

func (k Keeper) GetTreasury(ctx sdk.Context) sdk.Coins

func (Keeper) GetVote

func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress) (*foundation.Vote, error)

func (Keeper) GetVotes

func (k Keeper) GetVotes(ctx sdk.Context, proposalID uint64) []foundation.Vote

func (Keeper) Grant

func (k Keeper) Grant(ctx sdk.Context, granter string, grantee sdk.AccAddress, authorization foundation.Authorization) error

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, sk foundation.StakingKeeper, data *foundation.GenesisState) error

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) PruneExpiredProposals

func (k Keeper) PruneExpiredProposals(ctx sdk.Context)

PruneExpiredProposals prunes all proposals which are expired, i.e. whose `submit_time + voting_period + max_execution_period` is smaller than (or equal to) now.

func (Keeper) ResetState

func (k Keeper) ResetState(ctx sdk.Context)

func (Keeper) Revoke

func (k Keeper) Revoke(ctx sdk.Context, granter string, grantee sdk.AccAddress, msgTypeURL string) error

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params *foundation.Params)

func (Keeper) SubmitProposal

func (k Keeper) SubmitProposal(ctx sdk.Context, proposers []string, metadata string, msgs []sdk.Msg) (uint64, error)

func (Keeper) UpdateDecisionPolicy

func (k Keeper) UpdateDecisionPolicy(ctx sdk.Context, policy foundation.DecisionPolicy) error

func (Keeper) UpdateMembers

func (k Keeper) UpdateMembers(ctx sdk.Context, members []foundation.Member) error

func (Keeper) UpdateOperator

func (k Keeper) UpdateOperator(ctx sdk.Context, operator sdk.AccAddress) error

func (Keeper) UpdateTallyOfVPEndProposals

func (k Keeper) UpdateTallyOfVPEndProposals(ctx sdk.Context)

func (Keeper) Vote

func (k Keeper) Vote(ctx sdk.Context, vote foundation.Vote) error

func (Keeper) WithdrawFromTreasury

func (k Keeper) WithdrawFromTreasury(ctx sdk.Context, to sdk.AccAddress, amt sdk.Coins) error

func (Keeper) WithdrawProposal

func (k Keeper) WithdrawProposal(ctx sdk.Context, proposalID uint64) error

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates from version 1 to 2.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL