Documentation
¶
Overview ¶
Package rpctypes implement types commonly used in the Flashbots codebase for receiving and senging requests
Index ¶
Constants ¶
View Source
const ( BundleTxLimit = 100 MevBundleTxLimit = 50 MevBundleMaxDepth = 1 BundleVersionV1 = "v1" BundleVersionV2 = "v2" )
View Source
const ( RevertModeAllow = "allow" RevertModeDrop = "drop" RevertModeFail = "fail" )
Variables ¶
View Source
var ( ErrBundleNoTxs = errors.New("bundle with no txs") ErrBundleTooManyTxs = errors.New("too many txs in bundle") ErrMevBundleUnmatchedTx = errors.New("mev bundle with unmatched tx") ErrMevBundleTooDeep = errors.New("mev bundle too deep") ErrUnsupportedBundleVersion = errors.New("unsupported bundle version") )
Functions ¶
This section is empty.
Types ¶
type BidSubsisideBlockArgs ¶
type BidSubsisideBlockArgs uint64
func (*BidSubsisideBlockArgs) UniqueKey ¶
func (b *BidSubsisideBlockArgs) UniqueKey() uuid.UUID
type EthCancelBundleArgs ¶
type EthCancelBundleArgs struct {
ReplacementUUID uuid.UUID `json:"replacementUuid"`
SigningAddress *common.Address `json:"signingAddress"`
}
func (*EthCancelBundleArgs) UniqueKey ¶
func (b *EthCancelBundleArgs) UniqueKey() uuid.UUID
type EthSendBundleArgs ¶
type EthSendBundleArgs struct {
Txs []hexutil.Bytes `json:"txs"`
BlockNumber *hexutil.Uint64 `json:"blockNumber"`
MinTimestamp *uint64 `json:"minTimestamp,omitempty"`
MaxTimestamp *uint64 `json:"maxTimestamp,omitempty"`
RevertingTxHashes []common.Hash `json:"revertingTxHashes,omitempty"`
ReplacementUUID *uuid.UUID `json:"replacementUuid,omitempty"`
Version *string `json:"version,omitempty"`
ReplacementNonce *uint64 `json:"replacementNonce,omitempty"`
SigningAddress *common.Address `json:"signingAddress,omitempty"` // may or may not be respected depending on the context
RefundIdentity *common.Address `json:"refundIdentity,omitempty"` // metadata field to improve redistribution ux
DroppingTxHashes []common.Hash `json:"droppingTxHashes,omitempty"`
UUID *uuid.UUID `json:"uuid,omitempty"`
RefundPercent *uint64 `json:"refundPercent,omitempty"`
RefundRecipient *common.Address `json:"refundRecipient,omitempty"`
RefundTxHashes []string `json:"refundTxHashes,omitempty"`
DelayedRefund *bool `json:"delayedRefund,omitempty"` // if set to true refund will be paid out of block
}
func (*EthSendBundleArgs) UniqueKey ¶
func (b *EthSendBundleArgs) UniqueKey() uuid.UUID
type EthSendRawTransactionArgs ¶
func (EthSendRawTransactionArgs) MarshalText ¶
func (tx EthSendRawTransactionArgs) MarshalText() ([]byte, error)
func (*EthSendRawTransactionArgs) UniqueKey ¶
func (tx *EthSendRawTransactionArgs) UniqueKey() uuid.UUID
func (*EthSendRawTransactionArgs) UnmarshalJSON ¶
func (tx *EthSendRawTransactionArgs) UnmarshalJSON(input []byte) error
func (*EthSendRawTransactionArgs) UnmarshalText ¶
func (tx *EthSendRawTransactionArgs) UnmarshalText(input []byte) error
type MevBundleBody ¶
type MevBundleInclusion ¶
type MevBundleMetadata ¶
type MevBundleMetadata struct {
// Signer should be set by infra that verifies user signatures and not user
Signer *common.Address `json:"signer,omitempty"`
ReplacementNonce *int `json:"replacementNonce,omitempty"`
// Used for cancelling. When true the only thing we care about is signer,replacement_nonce and RawShareBundle::replacement_uuid
Cancelled *bool `json:"cancelled,omitempty"`
}
type MevBundleValidity ¶
type MevBundleValidity struct {
Refund []RefundConstraint `json:"refund,omitempty"`
RefundConfig []RefundConfig `json:"refundConfig,omitempty"`
}
type MevSendBundleArgs ¶
type MevSendBundleArgs struct {
Version string `json:"version"`
ReplacementUUID *uuid.UUID `json:"replacementUuid,omitempty"`
Inclusion MevBundleInclusion `json:"inclusion"`
// when empty its considered cancel
Body []MevBundleBody `json:"body"`
Validity MevBundleValidity `json:"validity"`
Metadata *MevBundleMetadata `json:"metadata,omitempty"`
// must be empty
Privacy *json.RawMessage `json:"privacy,omitempty"`
}
func (*MevSendBundleArgs) UniqueKey ¶
func (b *MevSendBundleArgs) UniqueKey() uuid.UUID
type RefundConfig ¶
type RefundConstraint ¶
Click to show internal directories.
Click to hide internal directories.