ante

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateTimeout added in v1.1.0

func ValidateTimeout(ctx sdk.Context, timeout int64, simulate bool) error

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

Types

type AuctionDecorator

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

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

func NewAuctionDecorator

func NewAuctionDecorator(ak AuctionKeeper, txEncoder sdk.TxEncoder, lane MEVLane) AuctionDecorator

NewAuctionDecorator returns a new AuctionDecorator.

func (AuctionDecorator) AnteHandle

func (ad AuctionDecorator) 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.

type AuctionKeeper added in v1.1.0

type AuctionKeeper interface {
	ValidateBidInfo(ctx sdk.Context, highestBid sdk.Coin, bidInfo *types.BidInfo) error
}

AuctionKeeper is an interface that defines the methods required to interact with the auction keeper.

type MEVLane

type MEVLane interface {
	GetAuctionBidInfo(tx sdk.Tx) (*types.BidInfo, error)
	GetTopAuctionTx(ctx context.Context) sdk.Tx
}

MEVLane is an interface that defines the methods required to interact with the MEV lane.

Jump to

Keyboard shortcuts

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