common

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlertColor

func AlertColor(str string) string

func DisplayValues

func DisplayValues(values []Value) string

func InfoColor

func InfoColor(str string) string

func NameWithColor

func NameWithColor(name string) string

func PrintGnosis

func PrintGnosis(result *GnosisResult)

func PrintTxDetails

func PrintTxDetails(result *TxResult, writer io.Writer)

func ReadableNumber

func ReadableNumber(value string) string

func VerboseAddress

func VerboseAddress(addr Address) string

func VerboseValues

func VerboseValues(values []Value) []string

Types

type Address

type Address struct {
	Address string
	Desc    string
	Decimal int64
}

type GnosisResult

type GnosisResult struct {
	Contract   Address
	Network    string
	Method     string
	Params     []ParamResult
	GnosisInit *GnosisResult
	Error      string
}

type LogResult

type LogResult struct {
	Name   string
	Topics []TopicResult
	Data   []ParamResult
}

type ParamResult

type ParamResult struct {
	Name  string
	Type  string
	Value []Value
}

type TopicResult

type TopicResult struct {
	Name  string
	Value []Value
}

type TxResult

type TxResult struct {
	Hash     string
	Network  string
	Status   string
	From     Address
	Value    string
	To       Address
	Nonce    string
	GasPrice string
	GasLimit string
	GasUsed  string
	GasCost  string
	TxType   string

	Contract Address
	Method   string
	Params   []ParamResult
	Logs     []LogResult

	GnosisInit *GnosisResult

	Completed bool
	Error     string
}

func NewTxResult

func NewTxResult() *TxResult

type TxResults

type TxResults map[string]*TxResult

func (*TxResults) Write

func (tr *TxResults) Write(filepath string)

type Value

type Value struct {
	Value   string
	Type    string
	Address *Address
}

Jump to

Keyboard shortcuts

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