ante

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnteHandler

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

func NewZeroGasMeter added in v1.2.0

func NewZeroGasMeter() storetypes.GasMeter

NewZeroGasMeter returns a reference to a new basicGasMeter.

Types

type AccountKeeper

type AccountKeeper interface {
	ante.AccountKeeper

	HasAccount(ctx context.Context, addr sdk.AccAddress) bool
}

type BankKeeper

type BankKeeper interface {
	authtypes.BankKeeper

	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
}

type CheckAddressesDecorator

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

CheckAddressesDecorator checks if all addresses are registered

func NewCheckAddressesDecorator

func NewCheckAddressesDecorator(ak AccountKeeper, sk ScorumKeeper) CheckAddressesDecorator

func (CheckAddressesDecorator) AnteHandle

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

type DeductFeeDecorator

type DeductFeeDecorator struct {
	ante.DeductFeeDecorator
}

DeductFeeDecorator deducts fees from the first signer of the tx This decorator ALLOWS zero fees CONTRACT: Tx must implement FeeTx interface to use DeductFeeDecorator

func (DeductFeeDecorator) AnteHandle

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

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions

	ScorumKeeper  ScorumKeeper
	AccountKeeper AccountKeeper
	BankKeeper    BankKeeper
	CircuitKeeper circuitante.CircuitBreaker
}

type ScorumKeeper

type ScorumKeeper interface {
	GetParams(ctx sdk.Context) (params types.Params)
	IsSupervisor(ctx sdk.Context, addr string) bool

	SetAddressToRestoreGas(ctx sdk.Context, addr sdk.AccAddress)

	Mint(ctx sdk.Context, addr sdk.AccAddress, coin sdk.Coin) error
}

type SigVerificationDecorator added in v0.0.4

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

SigVerificationDecorator is a copy of cosmos original SigVerificationDecorator Own implementation is needed to skip signature checking for supervisors to allow use the same key from many integrated services in parallel.

func NewSigVerificationDecorator added in v0.0.4

func NewSigVerificationDecorator(ak AccountKeeper, sk ScorumKeeper, signModeHandler *txsigning.HandlerMap) SigVerificationDecorator

func (SigVerificationDecorator) AnteHandle added in v0.0.4

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

type TrackGasConsumedDecorator

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

func (TrackGasConsumedDecorator) AnteHandle

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

type ZeroGasTxDecorator

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

func NewZeroGasTxDecorator

func NewZeroGasTxDecorator(ak AccountKeeper, sk ScorumKeeper) ZeroGasTxDecorator

func (ZeroGasTxDecorator) AnteHandle

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

Jump to

Keyboard shortcuts

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