cosmos

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRejectMessagesDecorator

func NewRejectMessagesDecorator() sdk.AnteDecorator

NewRejectMessagesDecorator creates a new RejectMessagesDecorator.

func VerifySignature

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

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

Types

type AuthzLimiterDecorator

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

AuthzLimiterDecorator blocks certain msg types from being granted or executed within the authorization module.

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 LegacyEip712SigVerificationDecorator deprecated

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

Deprecated: 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. NOTE: As of v10, EIP-712 signature verification is handled by the ethsecp256k1 public key (see ethsecp256k1.go)

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

func NewLegacyEip712SigVerificationDecorator deprecated

func NewLegacyEip712SigVerificationDecorator(
	ak anteinterfaces.AccountKeeper,
) LegacyEip712SigVerificationDecorator

Deprecated: 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 MinGasPriceDecorator

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

MinGasPriceDecorator will check if the transaction's fee is at least as large as the MinGasPrices param. If fee is too low, decorator returns error and tx is rejected. This applies for both CheckTx and DeliverTx If fee is high enough, then call next AnteHandler CONTRACT: Tx must implement FeeTx to use MinGasPriceDecorator

func NewMinGasPriceDecorator

NewMinGasPriceDecorator creates a new MinGasPriceDecorator instance used only for Cosmos transactions.

func (MinGasPriceDecorator) AnteHandle

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

type RejectMessagesDecorator

type RejectMessagesDecorator struct{}

RejectMessagesDecorator prevents invalid msg types from being executed.

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