flots

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MevSendBundle added in v0.7.0

SendBundle sends the bundle to the client's endpoint.

Types

type Client

type Client struct {
	PlusBlocks *big.Int

	SignerPublicKey *ecdsa.PublicKey
	// contains filtered or unexported fields
}

func New

func New() *Client

func (*Client) CallBundle

func (c *Client) CallBundle(rawTxs [][]byte) *flashbots.CallBundleResponse

func (*Client) GetBundleStats

func (c *Client) GetBundleStats(bundleHash common.Hash) *flashbots.BundleStatsV2Response

func (*Client) GetUserStats

func (c *Client) GetUserStats() *flashbots.UserStatsV2Response

func (*Client) LatestBlock

func (c *Client) LatestBlock() *big.Int

LatestBlock gets the latest block number.

func (*Client) LatestBlockPlus

func (c *Client) LatestBlockPlus() *big.Int

LatestBlockPlus gets the latest block number plus the configured offset.

func (*Client) MevSendBundle added in v0.7.0

func (c *Client) MevSendBundle(rawTxs [][]byte) common.Hash

func (*Client) SendBundleWithRawTxs

func (c *Client) SendBundleWithRawTxs(rawTxs [][]byte) common.Hash

func (*Client) UserAddress added in v0.5.1

func (c *Client) UserAddress() common.Address

type MevBundleTx added in v0.7.0

type MevBundleTx struct {
	Hash      common.Hash `json:"hash"      mapstructure:"hash"`
	Tx        string      `json:"tx"        mapstructure:"tx"`
	CanRevert bool        `json:"canRevert" mapstructure:"canRevert"`
}

type MevParamInclusion added in v0.7.0

type MevParamInclusion struct {
	Block    string `json:"block,omitempty"    mapstructure:"block"`    // hex-encoded number
	MaxBlock string `json:"maxBlock,omitempty" mapstructure:"maxBlock"` // hex-encoded number
}

type MevParamPrivacy added in v0.7.0

type MevParamPrivacy struct {
	Hints []string `json:"hints,omitempty" mapstructure:"hints"`
}

type MevParamValidity added in v0.7.0

type MevParamValidity struct {
	Refund []struct {
		BodyIdx int64 `json:"bodyIdx" mapstructure:"bodyIdx"`
		Percent int64 `json:"percent" mapstructure:"percent"`
	} `json:"refund,omitempty" mapstructure:"refund"`
	RefundConfig []struct {
		Address string `json:"address" mapstructure:"address"`
		Percent int64  `json:"percent" mapstructure:"percent"`
	} `json:"refundConfig,omitempty" mapstructure:"refundConfig"`
}

type MevSendBundleRequest added in v0.7.0

type MevSendBundleRequest struct {
	Version   string             `json:"version,omitempty"   mapstructure:"version"`
	Inclusion MevParamInclusion  `json:"inclusion,omitempty" mapstructure:"inclusion"`
	Body      []MevBundleTx      `json:"body"                mapstructure:"body"`
	Privacy   MevParamPrivacy    `json:"privacy,omitempty"`
	Validity  []MevParamValidity `json:"validity,omitempty"  mapstructure:"validity"`
}

Jump to

Keyboard shortcuts

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