common

package
v0.0.0-...-c2a49b7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf formats a message to standard error and exits the program. The message is also printed to standard output if standard error is redirected to a different file.

func GetAccountNonde

func GetAccountNonde(account, endpoint string) (uint64, error)

GetAccountNonde get account nonce

func GetContractAddress

func GetContractAddress(txHash, endpoint string) (string, error)

GetContractAddress get contract address by tx hash.

func GetPassPhrase

func GetPassPhrase(prompt string, confirmation bool) string

GetPassPhrase retrieves the password associated with an account, either fetched from a list of preloaded passphrases, or requested interactively from the user.

func SendRawTX

func SendRawTX(rawTx []byte, endpoint string) (string, error)

SendRawTX send raw transaction to endpoint.

Types

type RPCError

type RPCError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    string `json:"data,omitempty"`
}

type RPCResponse

type RPCResponse struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      interface{}     `json:"id"`
	Result  json.RawMessage `json:"result,omitempty"`
	Error   *RPCError       `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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