ante

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSignerAcc added in v0.1.0

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 added in v0.1.0

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 added in v0.1.0

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 added in v0.1.0

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

NewSigVerificationDecorator return new SigVerificationDecorator instance

func (SigVerificationDecorator) AnteHandle added in v0.1.0

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