ethrequest

package
v0.0.0-...-7a1e3be Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ETHEstimateGas        = "eth_estimateGas"
	ETHSendRawTransaction = "eth_sendRawTransaction"
	ETHSign               = "eth_sign"
	ETHChainID            = "eth_chainId"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EthBlock

type EthBlock struct {
	Number    string `json:"number"`
	Timestamp string `json:"timestamp"`
}

type EthService

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

func NewEthService

func NewEthService(ctx context.Context, endpoint string) (*EthService, error)

func (*EthService) Backend

func (e *EthService) Backend() bind.ContractBackend

func (*EthService) BaseFee

func (e *EthService) BaseFee() (*big.Int, error)

func (*EthService) BlockTime

func (e *EthService) BlockTime(number *big.Int) (uint64, error)

func (*EthService) Call

func (e *EthService) Call(method string, result any, params json.RawMessage) error

func (*EthService) CallContract

func (e *EthService) CallContract(call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)

func (*EthService) ChainID

func (e *EthService) ChainID() (*big.Int, error)

func (*EthService) Close

func (e *EthService) Close()

func (*EthService) CodeAt

func (e *EthService) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)

func (*EthService) Context

func (e *EthService) Context() context.Context

func (*EthService) EstimateFullGas

func (e *EthService) EstimateFullGas(from common.Address, tx *types.Transaction) (uint64, error)

func (*EthService) EstimateGasLimit

func (e *EthService) EstimateGasLimit(msg ethereum.CallMsg) (uint64, error)

func (*EthService) EstimateGasPrice

func (e *EthService) EstimateGasPrice() (*big.Int, error)

func (*EthService) FilterLogs

func (e *EthService) FilterLogs(q ethereum.FilterQuery) ([]types.Log, error)

func (*EthService) LatestBlock

func (e *EthService) LatestBlock() (*big.Int, error)

func (*EthService) ListenForLogs

func (e *EthService) ListenForLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) error

func (*EthService) MaxPriorityFeePerGas

func (e *EthService) MaxPriorityFeePerGas() (*big.Int, error)

func (*EthService) NewTx

func (e *EthService) NewTx(nonce uint64, from, to common.Address, data []byte, extraGas bool) (*types.Transaction, error)

func (*EthService) NonceAt

func (e *EthService) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)

func (*EthService) SendTransaction

func (e *EthService) SendTransaction(tx *types.Transaction) error

func (*EthService) StorageAt

func (e *EthService) StorageAt(addr common.Address, slot common.Hash) ([]byte, error)

func (*EthService) WaitForTx

func (e *EthService) WaitForTx(tx *types.Transaction, timeout int) error

Jump to

Keyboard shortcuts

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