rpcclient

package
v0.0.0-...-9f09256 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRpcClient

func NewRpcClient(ws []string) *manage

Types

type RpcClient

type RpcClient interface {
	ChainID(ctx context.Context) uint64
	GetLatestBlockNumber(ctx context.Context) <-chan uint64
	GetClient() *ethclient.Client
	Close()

	GetBlockByNumber(ctx context.Context, blockNumber string) (*types.Block, error)
	GetTransactionsByHash(ctx context.Context, transactionHash []common.Hash) ([]*types.Tx, error)
	GetTransactionReceiptsByHash(ctx context.Context, transactionHash []common.Hash) ([]*types.Rt, error)
	GetTransactionByHash(ctx context.Context, transactionHash common.Hash) (*types.Tx, error)
	GetTransactionReceiptByHash(ctx context.Context, transactionHash common.Hash) (*types.Rt, error)
	GetCode(ctx context.Context, address common.Address, blockNumber string) (string, error)
	GetBalance(ctx context.Context, address common.Address, blockNumber string) (*field.BigInt, error)
	GetBalances(ctx context.Context, addresses []common.Address, blockNumber string) (map[common.Address]*field.BigInt, error)
	GetTracerCall(ctx context.Context, txhash common.Hash) (*types.CallFrame, error)
	GetTracerLog(ctx context.Context, txHash common.Hash) (*types.ExecutionResult, error)
}

type TracerConfig

type TracerConfig struct {
	EnableMemory     bool   `json:"enableMemory"`     // enable memory capture
	DisableStack     bool   `json:"disableStack"`     // disable stack capture
	DisableStorage   bool   `json:"disableStorage"`   // disable storage capture
	EnableReturnData bool   `json:"enableReturnData"` // enable return data capture
	Tracer           string `json:"tracer,omitempty"` //
	Timeout          string `json:"timeout,omitempty"`
}

Config are the configuration options for structured logger the EVM

Jump to

Keyboard shortcuts

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