ante

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuilderDecorator

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

BuilderDecorator is an AnteDecorator that validates the auction bid and bundled transactions.

func NewBuilderDecorator

func NewBuilderDecorator(ak keeper.Keeper, txEncoder sdk.TxEncoder, mempool Mempool) BuilderDecorator

func (BuilderDecorator) AnteHandle

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

AnteHandle validates that the auction bid is valid if one exists. If valid it will deduct the entrance fee from the bidder's account.

func (BuilderDecorator) ValidateTimeout added in v1.0.1

func (bd BuilderDecorator) ValidateTimeout(ctx sdk.Context, timeout int64) error

ValidateTimeout validates that the timeout is greater than or equal to the expected block height the bid transaction will be executed in.

TODO: This will be deprecated in favor of the pre-commit hook once this available on the SDK https://github.com/skip-mev/pob/issues/147

type Mempool

type Mempool interface {
	Contains(tx sdk.Tx) (bool, error)
	GetAuctionBidInfo(tx sdk.Tx) (*mempool.AuctionBidInfo, error)
	GetTopAuctionTx(ctx context.Context) sdk.Tx
}

Mempool is an interface that defines the methods required to interact with the application-side mempool.

Jump to

Keyboard shortcuts

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