ante

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CorrectBeaconFeeDecorator

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

CorrectBeaconFeeDecorator checks if the correct fees have been sent to pay for a BEACON register/record hash Tx, and if the fee paying account has sufficient funds to pay. It first checks if the Tx contains any BEACON Msgs, and if not, continues on to the next AnteHandler in the chain. If a BEACON Msg is detected, it then:

1. Checks sufficient fees have been included in the Tx, via the --fees flag 2. Checks the fee payer is the BEACON owner 3. Checks if the fee payer has sufficient funds in their account to pay for it, including any locked enterprise und

If any of the checks fail, a suitable error is returned.

func NewCorrectBeaconFeeDecorator

func NewCorrectBeaconFeeDecorator(ak auth.AccountKeeper, beaconKeeper keeper.Keeper, enterpriseKeeper types.EnterpriseKeeper) CorrectBeaconFeeDecorator

func (CorrectBeaconFeeDecorator) AnteHandle

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

type FeeTx

type FeeTx interface {
	sdk.Tx
	GetGas() uint64
	GetFee() sdk.Coins
	FeePayer() sdk.AccAddress
}

FeeTx defines the interface to be implemented by Tx to use the FeeDecorators

Jump to

Keyboard shortcuts

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