web3ext

package
v0.0.0-...-ad1a03f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UNPARSEABLEINTERFACE = errors.New("Unparseable Interface")
	WEBSOCKETNOTDENIFIED = errors.New("Websocket connection dont exist")
)

Functions

This section is empty.

Types

type ContractExt

type ContractExt struct {
	Abi  *abi.ABI
	Web3 *Web3Ext
}

func (*ContractExt) Call

func (contract *ContractExt) Call(v interface{}, tx *dto.TransactionParameters, functionName string, args ...interface{}) (interface{}, error)

func (*ContractExt) Deploy

func (contract *ContractExt) Deploy(tx *dto.TransactionParameters, bytecode string, args ...interface{}) (string, error)

func (*ContractExt) Do

func (contract *ContractExt) Do(tx *dto.TransactionParameters, functionName string, args ...interface{}) (string, error)

type Web3Config

type Web3Config struct {
	Price    *big.Int
	GasLimit uint64
	ChainID  int64
}

func NewConfig

func NewConfig(price *big.Int, gasLimit uint64, cID int64) *Web3Config

type Web3Ext

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

func NewWeb3Ext

func NewWeb3Ext(provider providers.ProviderInterface) *Web3Ext

func (*Web3Ext) DBGetString

func (ext *Web3Ext) DBGetString(k string) (string, error)

func (*Web3Ext) GetRawTransactionByHash

func (ext *Web3Ext) GetRawTransactionByHash(hash string) (string, error)

func (*Web3Ext) GetTransactionByHash

func (ext *Web3Ext) GetTransactionByHash(hash string) (*types.Transaction, error)

func (*Web3Ext) NewContract

func (ext *Web3Ext) NewContract(abiJson []byte) (*ContractExt, error)

func (*Web3Ext) SendCoin

func (ext *Web3Ext) SendCoin(txC uint64, toString string, value *big.Int, keyString string, data []byte, config *Web3Config) (uint64, error)

func (*Web3Ext) SendRawTransaction

func (ext *Web3Ext) SendRawTransaction(raw string) (string, error)

func (*Web3Ext) SendTransaction

func (ext *Web3Ext) SendTransaction(tx *eip155.Transaction, si eip155.Signer, config *Web3Config) error

Jump to

Keyboard shortcuts

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