wrappers

package
v0.0.0-...-d50936c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WrappedContractBackend

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

WrappedContractBackend is a wrapper around the go-ethereum ContractBackend interface. It's a thin wrapper around the go-ethereum/ethclient.Client, which replaces only CallContract and PendingCallContract calls with methods that send data both in "input" and "data" field for backwards compatibility with older clients. Other methods are passed through to the underlying client.

func MustNewWrappedContractBackend

func MustNewWrappedContractBackend(evmClient blockchain.EVMClient, sethClient *seth.Client) *WrappedContractBackend

MustNewWrappedContractBackend creates a new WrappedContractBackend with the given clients

func (*WrappedContractBackend) CallContract

func (w *WrappedContractBackend) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)

func (*WrappedContractBackend) CallContractAtHash

func (w *WrappedContractBackend) CallContractAtHash(ctx context.Context, call ethereum.CallMsg, blockHash common.Hash) ([]byte, error)

func (*WrappedContractBackend) CodeAt

func (w *WrappedContractBackend) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)

func (*WrappedContractBackend) CodeAtHash

func (w *WrappedContractBackend) CodeAtHash(ctx context.Context, contract common.Address, blockHash common.Hash) ([]byte, error)

func (*WrappedContractBackend) EstimateGas

func (w *WrappedContractBackend) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)

func (*WrappedContractBackend) FilterLogs

func (w *WrappedContractBackend) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)

func (*WrappedContractBackend) HeaderByNumber

func (w *WrappedContractBackend) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

func (*WrappedContractBackend) PendingCallContract

func (w *WrappedContractBackend) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error)

func (*WrappedContractBackend) PendingCodeAt

func (w *WrappedContractBackend) PendingCodeAt(ctx context.Context, contract common.Address) ([]byte, error)

func (*WrappedContractBackend) PendingNonceAt

func (w *WrappedContractBackend) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)

func (*WrappedContractBackend) SendTransaction

func (w *WrappedContractBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error

func (*WrappedContractBackend) SubscribeFilterLogs

func (w *WrappedContractBackend) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)

func (*WrappedContractBackend) SuggestGasPrice

func (w *WrappedContractBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error)

func (*WrappedContractBackend) SuggestGasTipCap

func (w *WrappedContractBackend) SuggestGasTipCap(ctx context.Context) (*big.Int, error)

Jump to

Keyboard shortcuts

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