ethclient

package
v0.0.0-...-575f8db Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bin

func Bin(content []byte) ([]byte, error)

func BinFile

func BinFile(binFile string) ([]byte, error)

Types

type Config

type Config struct {
	Price    *big.Int
	GasLimit uint64
	ChainID  int64
	Url      string
}

func NewConfig

func NewConfig(price *big.Int, cID int64, url string) *Config

func (*Config) NewExt

func (config *Config) NewExt(key *ecdsa.PrivateKey) (*Ext, error)

type Contract

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

func (*Contract) Address

func (contract *Contract) Address() common.Address

func (*Contract) Call

func (contract *Contract) Call(v interface{}, from common.Address,
	functionName string, args ...interface{}) (interface{}, error)

func (*Contract) CallEx

func (contract *Contract) CallEx(nonce uint64, functionName string, args ...interface{}) (*common.Hash, error)

func (*Contract) Close

func (contract *Contract) Close()

func (*Contract) Deploy

func (contract *Contract) Deploy(nonce uint64, code []byte, args ...interface{}) (*common.Hash, error)

type Ext

type Ext struct {
	Config
	// contains filtered or unexported fields
}

func (*Ext) FillTx

func (ext *Ext) FillTx(nonce *uint64, amount *big.Int) (*eip155.Transaction, error)

func (*Ext) NewContract

func (ext *Ext) NewContract(abiJson []byte, addr common.Address) (*Contract, error)

func (*Ext) Nonce

func (ext *Ext) Nonce() uint64

func (*Ext) SendTx

func (ext *Ext) SendTx(nonce uint64, to *common.Address, data []byte, value *big.Int) (*common.Hash, error)

Jump to

Keyboard shortcuts

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