ante

package
v0.0.0-...-78bc507 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSignerAcc

func GetSignerAcc(ctx sdk.Context, ak cosmosante.AccountKeeper, addr sdk.AccAddress) (types.AccountI, error)

GetSignerAcc returns an account for a given address that is expected to sign a transaction.

func NewAnteHandler

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

NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.

func OnlyLegacyAminoSigners

func OnlyLegacyAminoSigners(sigData signing.SignatureData) bool

OnlyLegacyAminoSigners checks SignatureData to see if all signers are using SIGN_MODE_LEGACY_AMINO_JSON. If this is the case then the corresponding SignatureV2 struct will not have account sequence explicitly set, and we should skip the explicit verification of sig.Sequence in the SigVerificationDecorator's AnteHandler function.

Types

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions

	IBCkeeper         *ibckeeper.Keeper
	TxCounterStoreKey sdk.StoreKey
	WasmConfig        wasmTypes.WasmConfig
}

HandlerOptions extends the SDK's AnteHandler options by requiring the IBC channel keeper.

type SigVerificationDecorator

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

SigVerificationDecorator Verify all signatures for a tx and return an error if any are invalid. Note, the SigVerificationDecorator will not check signatures on ReCheck.

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

func NewSigVerificationDecorator

func NewSigVerificationDecorator(ak cosmosante.AccountKeeper, signModeHandler authsigning.SignModeHandler) SigVerificationDecorator

NewSigVerificationDecorator return new SigVerificationDecorator instance

func (SigVerificationDecorator) AnteHandle

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

AnteHandle nolint

Jump to

Keyboard shortcuts

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