broadcaster

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GasPadFactor = 1.2
)

Variables

This section is empty.

Functions

func DeployerGasPriceEstimator

func DeployerGasPriceEstimator(ctx context.Context, client txmgr.ETHBackend) (*big.Int, *big.Int, *big.Int, error)

DeployerGasPriceEstimator is a custom gas price estimator for use with op-deployer. It pads the base fee by 50% and multiplies the suggested tip by 5 up to a max of 50 gwei.

Types

type BroadcastResult

type BroadcastResult struct {
	Broadcast script.Broadcast `json:"broadcast"`
	TxHash    common.Hash      `json:"txHash"`
	Receipt   *types.Receipt   `json:"receipt"`
	Err       error            `json:"-"`
}

type Broadcaster

type Broadcaster interface {
	Broadcast(ctx context.Context) ([]BroadcastResult, error)
	Hook(bcast script.Broadcast)
}

func NoopBroadcaster

func NoopBroadcaster() Broadcaster

type CalldataBroadcaster added in v1.11.0

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

func (*CalldataBroadcaster) Broadcast added in v1.11.0

func (d *CalldataBroadcaster) Broadcast(ctx context.Context) ([]BroadcastResult, error)

func (*CalldataBroadcaster) Dump added in v1.11.0

func (d *CalldataBroadcaster) Dump() ([]CalldataDump, error)

func (*CalldataBroadcaster) Hook added in v1.11.0

func (d *CalldataBroadcaster) Hook(bcast script.Broadcast)

type CalldataDump added in v1.11.0

type CalldataDump struct {
	To    *common.Address `json:"to"`
	Data  hexutil.Bytes   `json:"data"`
	Value *hexutil.Big    `json:"value"`
}

type KeyedBroadcaster

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

func NewKeyedBroadcaster

func NewKeyedBroadcaster(cfg KeyedBroadcasterOpts) (*KeyedBroadcaster, error)

func (*KeyedBroadcaster) Broadcast

func (t *KeyedBroadcaster) Broadcast(ctx context.Context) ([]BroadcastResult, error)

func (*KeyedBroadcaster) Hook

func (t *KeyedBroadcaster) Hook(bcast script.Broadcast)

type KeyedBroadcasterOpts

type KeyedBroadcasterOpts struct {
	Logger  log.Logger
	ChainID *big.Int
	Client  *ethclient.Client
	Signer  opcrypto.SignerFn
	From    common.Address
}

Jump to

Keyboard shortcuts

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