ante

package
v3.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnteHandler

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

NewAnteHandler returns an ante handler responsible for attempting to route an Ethereum or SDK transaction to an internal ante handler for performing transaction-level processing (e.g. fee payment, signature verification) before being passed onto it's respective handler.

func Recover

func Recover(logger tmlog.Logger, err *error)

func VerifySignature

func VerifySignature(
	pubKey cryptotypes.PubKey,
	signerData authsigning.SignerData,
	sigData signing.SignatureData,
	_ authsigning.SignModeHandler,
	tx authsigning.Tx,
) error

VerifySignature verifies a transaction signature contained in SignatureData abstracting over different signing modes and single vs multi-signatures.

Types

type HandlerOptions

type HandlerOptions struct {
	AccountKeeper          *authkeeper.AccountKeeper
	BankKeeper             bankkeeper.Keeper
	IBCKeeper              *ibckeeper.Keeper
	FeeMarketKeeper        ethante.FeeMarketKeeper
	EvmKeeper              ethante.EVMKeeper
	FeegrantKeeper         ante.FeegrantKeeper
	TxFeesKeeper           *txfeeskeeper.Keeper
	SignModeHandler        authsigning.SignModeHandler
	MaxTxGasWanted         uint64
	ExtensionOptionChecker ante.ExtensionOptionChecker
}

type LegacyEip712SigVerificationDecorator

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

LegacyEip712SigVerificationDecorator Verify all signatures for a tx and return an error if any are invalid. Note, the LegacyEip712SigVerificationDecorator decorator will not get executed on ReCheck.

CONTRACT: Pubkeys are set in context for all signers before this decorator runs CONTRACT: Tx must implement SigVerifiableTx interface

func NewLegacyEip712SigVerificationDecorator

func NewLegacyEip712SigVerificationDecorator(
	ak evmtypes.AccountKeeper,
	signModeHandler authsigning.SignModeHandler,
) LegacyEip712SigVerificationDecorator

NewLegacyEip712SigVerificationDecorator creates a new LegacyEip712SigVerificationDecorator

func (LegacyEip712SigVerificationDecorator) AnteHandle

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

AnteHandle handles validation of EIP712 signed cosmos txs. it is not run on RecheckTx

type RejectMessagesDecorator

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

RejectMessagesDecorator prevents invalid msg types from being executed

func NewRejectMessagesDecorator

func NewRejectMessagesDecorator() RejectMessagesDecorator

NewRejectMessagesDecorator creates a decorator to block vesting messages from reaching the mempool

func (RejectMessagesDecorator) AnteHandle

func (rmd RejectMessagesDecorator) 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.

Jump to

Keyboard shortcuts

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