client

package
v0.3.36 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOption added in v0.2.0

func DefaultOption() *option

Types

type ETHClient

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

func NewETHClient

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

func (*ETHClient) DetectBesuConsensusType added in v0.3.29

func (cl *ETHClient) DetectBesuConsensusType() (chains.ConsensusType, error)

func (ETHClient) GetProof added in v0.3.0

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

func (*ETHClient) GetTransactionReceipt added in v0.2.0

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

func (*ETHClient) WaitForReceiptAndGet added in v0.2.0

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

type ErrorsRepository added in v0.3.25

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

func NewErrorsRepository added in v0.3.25

func NewErrorsRepository() ErrorsRepository

func (*ErrorsRepository) Add added in v0.3.25

func (r *ErrorsRepository) Add(e0 abi.Error) error

func (*ErrorsRepository) GetError added in v0.3.25

func (r *ErrorsRepository) GetError(sel [4]byte) (abi.Error, bool)

func (*ErrorsRepository) ParseError added in v0.3.25

func (r *ErrorsRepository) ParseError(bz []byte) (abi.Error, interface{}, error)

type Option added in v0.2.0

type Option func(*option)

func WithRetryOption added in v0.2.0

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

type Receipt

type Receipt struct {
	// Consensus fields: These fields are defined by the Yellow Paper
	Type              uint8            `json:"type,omitempty"`
	PostState         []byte           `json:"root"`
	Status            uint64           `json:"status"`
	CumulativeGasUsed uint64           `json:"cumulativeGasUsed" gencodec:"required"`
	Bloom             gethtypes.Bloom  `json:"logsBloom"         gencodec:"required"`
	Logs              []*gethtypes.Log `json:"logs"              gencodec:"required"`

	// Implementation fields: These fields are added by geth when processing a transaction.
	TxHash            common.Hash    `json:"transactionHash" gencodec:"required"`
	ContractAddress   common.Address `json:"contractAddress"`
	GasUsed           uint64         `json:"gasUsed" gencodec:"required"`
	EffectiveGasPrice *big.Int       `json:"effectiveGasPrice"`

	// Inclusion information: These fields provide information about the inclusion of the
	// transaction corresponding to this receipt.
	BlockHash        common.Hash `json:"blockHash,omitempty"`
	BlockNumber      *big.Int    `json:"blockNumber,omitempty"`
	TransactionIndex uint        `json:"transactionIndex"`

	RevertReason hexutil.Bytes `json:"revertReason,omitempty"`
}

Receipt definition from geth v1.11.6 Modified to add RevertReason field Receipt represents the results of a transaction.

func (Receipt) GetGethReceipt added in v0.3.12

func (rc Receipt) GetGethReceipt() *gethtypes.Receipt

func (Receipt) HasRevertReason added in v0.2.0

func (rc Receipt) HasRevertReason() bool

func (*Receipt) UnmarshalJSON added in v0.3.12

func (r *Receipt) UnmarshalJSON(input []byte) error

UnmarshalJSON unmarshals from JSON.

type StateProof added in v0.2.0

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