common

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlertColor

func AlertColor(str string) string

func InfoColor

func InfoColor(str string) string

func NameWithColor

func NameWithColor(name string) string

func PrintFunctionCall added in v0.0.20

func PrintFunctionCall(fc *FunctionCall)

func PrintTxDetails

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

func PrintVerboseValueToWriter added in v0.0.20

func PrintVerboseValueToWriter(writer io.Writer, values []Value)

func ReadableNumber

func ReadableNumber(value string) string

func VerboseAddress

func VerboseAddress(addr Address) string

func VerboseValues

func VerboseValues(values []Value) []string

Types

type ABIDatabase added in v0.0.20

type ABIDatabase func(address string, network Network) (*abi.ABI, error)

type Address

type Address struct {
	Address string
	Desc    string
	Decimal int64
}

type FunctionCall added in v0.0.20

type FunctionCall struct {
	Destination          Address
	Value                *big.Int
	Method               string
	Params               []ParamResult
	DecodedFunctionCalls []*FunctionCall
	Error                string
}

type LogResult

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

type ParamResult

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

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
	Timestamp string
	TxType    string

	FunctionCall *FunctionCall
	Logs         []LogResult

	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