MEVless

package
v1.2.21 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

README

MEVless

Overall Flow

image

Documentation

Index

Constants

View Source
const Prefix = "MEVless_"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PackNumber uint64 `toml:"pack_number"`
	Addr       string `toml:"addr"`
	Charge     uint64 `toml:"charge"`
	DbPath     string `toml:"db_path"`
}

func DefaultCfg

func DefaultCfg() *Config

type MEVless

type MEVless struct {
	*tripod.Tripod
	// contains filtered or unexported fields
}

func NewMEVless

func NewMEVless(cfg *Config) (*MEVless, error)

func (*MEVless) Charge

func (m *MEVless) Charge() uint64

func (*MEVless) CheckTxn

func (m *MEVless) CheckTxn(stxn *types.SignedTxn) error

func (*MEVless) HandleSubscribe

func (m *MEVless) HandleSubscribe()

func (*MEVless) OrderCommitment

func (m *MEVless) OrderCommitment(blockNum common.BlockNum) error

wrCall.params = "MEVless_(TxnHash)"

func (*MEVless) OrderTx

func (m *MEVless) OrderTx(ctx *context.WriteContext) error

func (*MEVless) Pack

func (m *MEVless) Pack(blockNum common.BlockNum, numLimit uint64) ([]*types.SignedTxn, error)

func (*MEVless) PackFor

func (m *MEVless) PackFor(blockNum common.BlockNum, numLimit uint64, filter func(*types.SignedTxn) bool) ([]*types.SignedTxn, error)

func (*MEVless) StartBroadcasting

func (m *MEVless) StartBroadcasting()

func (*MEVless) SubscribeOrderCommitment

func (m *MEVless) SubscribeOrderCommitment(w http.ResponseWriter, r *http.Request)

func (*MEVless) VerifyBlock

func (m *MEVless) VerifyBlock(block *types.Block) error

type OrderCommitment

type OrderCommitment struct {
	BlockNumber common.BlockNum     `json:"block_number"`
	Sequences   map[int]common.Hash `json:"sequences"`
}

type TxOrder

type TxOrder struct {
	BlockNumber common.BlockNum `json:"block_number"`
	Sequence    int             `json:"sequence"`
}

Jump to

Keyboard shortcuts

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