ante

package
v2.0.0-rc.14 Latest Latest
Warning

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

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

Documentation

Overview

Copyright (c) 2023-2024 Nibi, Inc.

Copyright (c) 2023-2024 Nibi, Inc.

Copyright (c) 2023-2024 Nibi, Inc.

Index

Constants

View Source
const OracleMessageGas = 500

Variables

View Source
var (
	ErrOracleAnte             = registerError("oracle ante error")
	ErrMaxValidatorCommission = registerError("validator commission rate is above max")
)

app/ante "sentinel" errors

Functions

func AnteHandlerError

func AnteHandlerError(shortDesc string) error

func MAX_COMMISSION

func MAX_COMMISSION() sdk.Dec

func NewErrMaxValidatorCommission

func NewErrMaxValidatorCommission(gotCommission sdk.Dec) error

func NewFixedGasMeter

func NewFixedGasMeter(fixedGas types.Gas) types.GasMeter

NewFixedGasMeter returns a reference to a new fixedGasMeter.

Types

type AnteDecoratorAuthzGuard

type AnteDecoratorAuthzGuard struct{}

AnteDecoratorAuthzGuard filters autz messages

func (AnteDecoratorAuthzGuard) AnteHandle

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

AnteHandle rejects "authz grant generic --msg-type '/eth.evm.v1.MsgEthereumTx'" Also rejects authz exec tx.json with any MsgEthereumTx inside

type AnteDecoratorEnsureSinglePostPriceMessage

type AnteDecoratorEnsureSinglePostPriceMessage struct{}

AnteDecoratorEnsureSinglePostPriceMessage ensures that there is only one oracle vote message in the transaction and sets the gas meter to a fixed value.

func (AnteDecoratorEnsureSinglePostPriceMessage) AnteHandle

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

type AnteDecoratorGasWanted

type AnteDecoratorGasWanted struct{}

AnteDecoratorGasWanted keeps track of the gasWanted amount on the current block in transient store for BaseFee calculation.

func (AnteDecoratorGasWanted) AnteHandle

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

type AnteDecoratorPreventEtheruemTxMsgs

type AnteDecoratorPreventEtheruemTxMsgs struct{}

AnteDecoratorPreventEtheruemTxMsgs prevents invalid msg types from being executed

func (AnteDecoratorPreventEtheruemTxMsgs) AnteHandle

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

AnteHandle rejects messages that requires ethereum-specific authentication. For example `MsgEthereumTx` requires fee to be deducted in the antehandler in order to perform the refund.

type AnteDecoratorStakingCommission

type AnteDecoratorStakingCommission struct{}

AnteDecoratorStakingCommission: Implements sdk.AnteDecorator, enforcing the maximum staking commission for validators on the network.

func (AnteDecoratorStakingCommission) AnteHandle

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

type AnteHandlerOptions

type AnteHandlerOptions struct {
	sdkante.HandlerOptions
	IBCKeeper        *ibckeeper.Keeper
	DevGasKeeper     *devgaskeeper.Keeper
	DevGasBankKeeper devgasante.BankKeeper
	EvmKeeper        *evmkeeper.Keeper
	AccountKeeper    authkeeper.AccountKeeper

	TxCounterStoreKey types.StoreKey
	WasmConfig        *wasmtypes.WasmConfig
	MaxTxGasWanted    uint64
}

func (*AnteHandlerOptions) ValidateAndClean

func (opts *AnteHandlerOptions) ValidateAndClean() error

type TxFeeChecker

type TxFeeChecker func(ctx sdk.Context, feeTx sdk.FeeTx) (sdk.Coins, int64, error)

Jump to

Keyboard shortcuts

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