ante

package
v18.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UseFeeMarketDecorator = true

UseFeeMarketDecorator to make the integration testing easier: we can switch off its ante and post decorators with this flag

Functions

func NewAnteHandler

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

func SetExpeditedProposalsEnabled

func SetExpeditedProposalsEnabled(val bool)

SetExpeditedProposalsEnabled toggles the expedited proposals decorator on/off. Should only be used in testing - this is to allow simtests to pass.

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 GovExpeditedProposalsDecorator

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

Check if the proposal is whitelisted for expedited voting.

func NewGovExpeditedProposalsDecorator

func NewGovExpeditedProposalsDecorator(cdc codec.BinaryCodec) GovExpeditedProposalsDecorator

func (GovExpeditedProposalsDecorator) AnteHandle

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

AnteHandle checks if the proposal is whitelisted for expedited voting. Only proposals submitted using "gaiad tx gov submit-proposal" can be expedited. Legacy proposals submitted using "gaiad tx gov submit-legacy-proposal" cannot be marked as expedited.

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
	StakingKeeper     *stakingkeeper.Keeper
	FeeMarketKeeper   *feemarketkeeper.Keeper
	TxFeeChecker      ante.TxFeeChecker
	TxCounterStoreKey storetypes.StoreKey
	WasmConfig        *wasmtypes.WasmConfig
}

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