ante

package
v26.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCircuitBreakActive

func IsCircuitBreakActive(
	ctx sdk.Context,
	tx sdk.Tx,
	smartAccountKeeper *smartaccountkeeper.Keeper,
) (bool, smartaccounttypes.AuthenticatorTxOptions)

IsCircuitBreakActive checks if smart account are active and if there is a selected authenticator, the function will return true is the circuit breaker is active.

func IsSelectedAuthenticatorTxExtensionMissing

func IsSelectedAuthenticatorTxExtensionMissing(
	tx sdk.Tx,
	smartAccountKeeper *smartaccountkeeper.Keeper,
) (bool, smartaccounttypes.AuthenticatorTxOptions)

IsSelectedAuthenticatorTxExtensionMissing checks to see if the transaction has the correct extension, it returns false if we continue to the authenticator flow.

Types

type AuthenticatorDecorator

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

AuthenticatorDecorator is responsible for processing authentication logic before transaction execution.

func NewAuthenticatorDecorator

func NewAuthenticatorDecorator(
	cdc codec.Codec,
	smartAccountKeeper *smartaccountkeeper.Keeper,
	accountKeeper authante.AccountKeeper,
	sigModeHandler *txsigning.HandlerMap,
	deductFeeDecorator txfeeskeeper.DeductFeeDecorator,
) AuthenticatorDecorator

NewAuthenticatorDecorator creates a new instance of AuthenticatorDecorator with the provided parameters.

func (AuthenticatorDecorator) AnteHandle

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

AnteHandle is the authenticator ante handler responsible for processing authentication logic before transaction execution.

func (AuthenticatorDecorator) GetSelectedAuthenticators

func (ad AuthenticatorDecorator) GetSelectedAuthenticators(
	tx sdk.Tx,
	msgCount int,
) ([]uint64, error)

GetSelectedAuthenticators retrieves the selected authenticators for the provided transaction extension and matches them with the number of messages in the transaction. If no selected authenticators are found in the extension, the function initializes the list with -1 values. It returns an array of selected authenticators or an error if the number of selected authenticators does not match the number of messages in the transaction.

func (AuthenticatorDecorator) ValidateAuthenticatorFeePayer

func (ad AuthenticatorDecorator) ValidateAuthenticatorFeePayer(tx sdk.Tx) error

ValidateAuthenticatorFeePayer enforces that the tx fee payer has not been set manually to an account different to the signer of the first message. This is a requirement for the authenticator module. The only user of a manually set fee payer is with fee grants, which are not available on osmosis

type CircuitBreakerDecorator

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

CircuitBreakerDecorator routes transactions through appropriate ante handlers based on the IsCircuitBreakActive function.

func NewCircuitBreakerDecorator

func NewCircuitBreakerDecorator(
	smartAccountKeeper *smartaccountkeeper.Keeper,
	auth sdk.AnteHandler,
	classic sdk.AnteHandler,
) CircuitBreakerDecorator

NewCircuitBreakerDecorator creates a new instance of CircuitBreakerDecorator with the provided parameters.

func (CircuitBreakerDecorator) AnteHandle

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

AnteHandle checks if a tx is a smart account tx and routes it through the correct series of ante handlers.

type EmitPubKeyDecoratorEvents

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

EmitPubKeyDecoratorEvents emits the events that the SetPubKeyDecorator would emit. This is needed for backwards compatibility with the legacy account system even if the SetPubKeyDecorator is not used (as pubkeys should be set on the account before using authenticators).

func (EmitPubKeyDecoratorEvents) AnteHandle

func (spkd EmitPubKeyDecoratorEvents) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

Jump to

Keyboard shortcuts

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