ante

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnteHandler

func NewAnteHandler(channelKeeper *ibckeeper.Keeper, options ante.HandlerOptions, addressFetchers []AddressFetcher) (sdk.AnteHandler, error)

NewAnteHandler returns an 'AnteHandler' that will run actions before a tx is sent to a module's handler.

Types

type ActivateAfterDecorator

type ActivateAfterDecorator struct {
	WrappedDecorator sdk.AnteDecorator
	// contains filtered or unexported fields
}

ActivateAfterDecorator wraps a ante decorator, disabling it before a block height. It can be used to modify the antehandler in asynchronous chain upgrades.

func ActivateAfter

func ActivateAfter(decorator sdk.AnteDecorator, upgradeHeight int64) ActivateAfterDecorator

func (ActivateAfterDecorator) AnteHandle

func (aad ActivateAfterDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

type AddressFetcher

type AddressFetcher func(sdk.Context) []sdk.AccAddress

AddressFetcher is a type signature for functions used by the AuthenticatedMempoolDecorator to get authorized addresses.

type AuthenticatedMempoolDecorator

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

AuthenticatedMempoolDecorator blocks all txs from reaching the mempool unless they're signed by one of the authorzed addresses. It only runs before entry to mempool (CheckTx), and not in consensus (DeliverTx)

func NewAuthenticatedMempoolDecorator

func NewAuthenticatedMempoolDecorator(fetchers ...AddressFetcher) AuthenticatedMempoolDecorator

func (AuthenticatedMempoolDecorator) AnteHandle

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

type AuthzLimiterDecorator

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

AuthzLimiterDecorator blocks certain msg types from being granted or executed within authz.

func NewAuthzLimiterDecorator

func NewAuthzLimiterDecorator(disabledMsgTypes ...string) AuthzLimiterDecorator

NewAuthzLimiterDecorator creates a decorator to block certain msg types from being granted or executed within authz.

func (AuthzLimiterDecorator) AnteHandle

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

type VestingAccountDecorator

type VestingAccountDecorator struct{}

VestingAccountDecorator blocks MsgCreateVestingAccount from reaching the mempool

func NewVestingAccountDecorator

func NewVestingAccountDecorator() VestingAccountDecorator

func (VestingAccountDecorator) AnteHandle

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

Jump to

Keyboard shortcuts

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