execution

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The address of the Execution node to connect to
	NodeAddress string `yaml:"nodeAddress"`
	// NodeHeaders is a map of headers to send to the execution node.
	NodeHeaders map[string]string `yaml:"nodeHeaders"`
	// Name is the name of the execution node
	Name string `yaml:"name"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Node

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

func NewNode

func NewNode(log logrus.FieldLogger, name string, conf *Config) *Node

func (*Node) BalanceAt

func (n *Node) BalanceAt(ctx context.Context, address string) (*big.Int, error)

func (*Node) BlockNumber

func (n *Node) BlockNumber(ctx context.Context) (*uint64, error)

func (*Node) ChainID

func (n *Node) ChainID(ctx context.Context) (*big.Int, error)

func (*Node) DeployContract

func (n *Node) DeployContract(ctx context.Context, contract *[]byte, from string, key *ecdsa.PrivateKey, gasLimit uint64) (*string, error)

func (*Node) FeeHistory

func (n *Node) FeeHistory(ctx context.Context, blockCount uint64, lastBlock *big.Int, rewardPercentiles []float64) (*ethereum.FeeHistory, error)

func (*Node) Metadata

func (n *Node) Metadata() *services.MetadataService

func (*Node) Name

func (n *Node) Name() string

func (*Node) NonceAt

func (n *Node) NonceAt(ctx context.Context, address string) (*uint64, error)

func (*Node) OnReady

func (n *Node) OnReady(_ context.Context, callback func(ctx context.Context) error)

func (*Node) ReadContract

func (n *Node) ReadContract(ctx context.Context, contractAddress string, callData []byte, blockNumber *big.Int) ([]byte, error)

func (*Node) SendTransaction

func (n *Node) SendTransaction(ctx context.Context, tx *types.Transaction) error

func (*Node) SignTransaction

func (n *Node) SignTransaction(ctx context.Context, tx *types.Transaction, key *ecdsa.PrivateKey) (*types.Transaction, error)

func (*Node) Start

func (n *Node) Start(ctx context.Context) error

func (*Node) Stop

func (n *Node) Stop() error

func (*Node) SuggestFees

func (n *Node) SuggestFees(ctx context.Context) (gasTipCap, gasFeeCap *big.Int, err error)

func (*Node) TransactionByHash

func (n *Node) TransactionByHash(ctx context.Context, hash string) (*types.Transaction, bool, error)

func (*Node) TransactionReceipt

func (n *Node) TransactionReceipt(ctx context.Context, hash string) (*types.Receipt, error)

func (*Node) WriteContract

func (n *Node) WriteContract(ctx context.Context, contractAddress string, callData []byte, from string, key *ecdsa.PrivateKey, value *big.Int, gasLimit uint64) (*string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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