client

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOption

func DefaultOption() *option

Types

type ETHClient

type ETHClient struct {
	*ethclient.Client
	// contains filtered or unexported fields
}

func NewETHClient

func NewETHClient(endpoint string, opts ...Option) (*ETHClient, error)

func (*ETHClient) DebugTraceTransaction

func (cl *ETHClient) DebugTraceTransaction(ctx context.Context, txHash common.Hash) (string, string, error)

func (ETHClient) GetProof

func (cl ETHClient) GetProof(address common.Address, storageKeys [][]byte, blockNumber *big.Int) (*StateProof, error)

func (*ETHClient) GetTransactionReceipt

func (cl *ETHClient) GetTransactionReceipt(ctx context.Context, txHash common.Hash, enableDebugTrace bool) (rc *gethtypes.Receipt, recoverable bool, err error)

func (*ETHClient) WaitForReceiptAndGet

func (cl *ETHClient) WaitForReceiptAndGet(ctx context.Context, tx *gethtypes.Transaction, enableDebugTrace bool) (*gethtypes.Receipt, error)

type Option

type Option func(*option)

func WithRetryOption

func WithRetryOption(rops ...retry.Option) Option

type Receipt

type Receipt struct {
	gethtypes.Receipt
	RevertReason []byte `json:"revertReason,omitempty"`
}

func (Receipt) GetRevertReason

func (rc Receipt) GetRevertReason() (string, error)

func (Receipt) HasRevertReason

func (rc Receipt) HasRevertReason() bool

type Result

type Result struct {
	Type         *string  `json:"type"`
	From         *string  `json:"from"`
	To           *string  `json:"to"`
	Value        *string  `json:"value"`
	Gas          *string  `json:"gas"`
	GasUsed      *string  `json:"gasUsed"`
	Input        *string  `json:"input"`
	Output       *string  `json:"output"`
	Error        *string  `json:"error"`
	RevertReason *string  `json:"revertReason"`
	Calls        []Result `json:"calls"`
}

type StateProof

type StateProof struct {
	Balance     big.Int
	CodeHash    [32]byte
	Nonce       uint64
	StorageHash [32]byte

	AccountProofRLP []byte
	StorageProofRLP [][]byte
}

Jump to

Keyboard shortcuts

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