client

package
v0.0.0-...-93ae5c1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	EthClient *ethclient.Client
}

func NewClient

func NewClient(rpcEndpoint string) (*Client, error)

func (*Client) ChainID

func (c *Client) ChainID() (*big.Int, error)

func (*Client) CreateCallMessage

func (c *Client) CreateCallMessage(
	from common.Address,
	to common.Address,
	value *big.Int,
	data []byte,
) (*ethereum.CallMsg, error)

func (*Client) CreateTransaction

func (c *Client) CreateTransaction(msg ethereum.CallMsg, gasMultiplier float64) (*types.Transaction, error)

func (*Client) ReadLogs

func (c *Client) ReadLogs(
	fromBlock *big.Int,
	toBlock *big.Int,
	contractABI abi.ABI,
	contractAddress common.Address,
	topicFilters [][]string,
) ([]interface{}, error)

func (*Client) SendTransaction

func (c *Client) SendTransaction(tx *types.Transaction) (*string, error)

type ClientError

type ClientError uint
const (
	Unknown ClientError = common.ErrorDomainWallet + iota
	BadRPCConnection
	GasEstimateFailed
	TransactionFailed
)

func (ClientError) Error

func (e ClientError) Error() string

Jump to

Keyboard shortcuts

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