ante

package
v0.0.0-...-610a1d1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnteHandler

func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error)

func SetMinStakedTokens

func SetMinStakedTokens(tokens sdk.Dec)

SetMinStakedTokens sets the minimum amount of staked tokens required to vote Should only be used in testing

Types

type GovVoteDecorator

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

func NewGovVoteDecorator

func NewGovVoteDecorator(cdc codec.BinaryCodec, stakingKeeper *stakingkeeper.Keeper) GovVoteDecorator

func (GovVoteDecorator) AnteHandle

func (g GovVoteDecorator) AnteHandle(
	ctx sdk.Context, tx sdk.Tx,
	simulate bool, next sdk.AnteHandler,
) (newCtx sdk.Context, err error)

func (GovVoteDecorator) ValidateVoteMsgs

func (g GovVoteDecorator) ValidateVoteMsgs(ctx sdk.Context, msgs []sdk.Msg) error

ValidateVoteMsgs checks if a voter has enough stake to vote

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions
	Codec             codec.BinaryCodec
	IBCkeeper         *ibckeeper.Keeper
	GlobalFeeSubspace paramtypes.Subspace
	StakingKeeper     *stakingkeeper.Keeper
	TxFeeChecker      ante.TxFeeChecker
}

HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.

Jump to

Keyboard shortcuts

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