exec

package
v0.0.0-...-24d451d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CallTypeCall     = CallType(0x00)
	CallTypeCode     = CallType(0x01)
	CallTypeDelegate = CallType(0x02)
	CallTypeStatic   = CallType(0x03)
	CallTypeSNative  = CallType(0x04)
)
View Source
const LogNKeyPrefix = "Log"
View Source
const (
	TransferTypeCall = TransferType(0x00)
)

Variables

View Source
var TransferTypeFromName = make(map[string]TransferType)

Functions

func LogNKey

func LogNKey(topic int) string

func LogNTextKey

func LogNTextKey(topic int) string

Types

type CallData

type CallData struct {
	Caller crypto2.Address `json:"Caller"`
	Callee crypto2.Address `json:"Callee"`
	Data   binary.HexBytes `json:"Data"`
	Value  bn.Number       `json:"Value,omitempty"`
	Gas    uint64          `json:"Gas,omitempty"`
}

func (*CallData) GetGas

func (m *CallData) GetGas() uint64

func (*CallData) GetValue

func (m *CallData) GetValue() bn.Number

func (*CallData) String

func (m *CallData) String() string

type CallEvent

type CallEvent struct {
	CallType   CallType        `json:"CallType,omitempty"`
	CallData   *CallData       `json:"CallData,omitempty"`
	Origin     crypto2.Address `json:"Origin"`
	StackDepth uint64          `json:"StackDepth,omitempty"`
	Return     binary.HexBytes `json:"Return"`
}

func (*CallEvent) GetCallData

func (m *CallEvent) GetCallData() *CallData

func (*CallEvent) GetCallType

func (m *CallEvent) GetCallType() CallType

func (*CallEvent) GetStackDepth

func (m *CallEvent) GetStackDepth() uint64

func (*CallEvent) String

func (m *CallEvent) String() string

type CallType

type CallType uint32

func CallTypeFromString

func CallTypeFromString(name string) CallType

func (CallType) MarshalText

func (ct CallType) MarshalText() ([]byte, error)

func (CallType) String

func (ct CallType) String() string

func (*CallType) UnmarshalText

func (ct *CallType) UnmarshalText(data []byte) error

type EventType

type EventType uint32
const (
	TypeUnknown EventType = iota
	TypeCall
	TypeLog
	TypeAccountInput
	TypeAccountOutput
	TypeTxExecution
	TypeBlockExecution
	TypeGovernAccount
	TypeBeginBlock
	TypeBeginTx
	TypeEnvelope
	TypeEndTx
	TypeEndBlock
)

Execution event types

func EventTypeFromString

func EventTypeFromString(name string) EventType

func (EventType) MarshalText

func (typ EventType) MarshalText() ([]byte, error)

func (EventType) String

func (typ EventType) String() string

func (*EventType) UnmarshalText

func (typ *EventType) UnmarshalText(data []byte) error

type LogEvent

type LogEvent struct {
	Address crypto2.Address `json:"Address"`
	Data    HexBytes        `json:"Data"`
	Topics  []Word256       `json:"Topics"`
}

func (*LogEvent) Get

func (l *LogEvent) Get(key string) (string, bool)

func (*LogEvent) GetTopic

func (l *LogEvent) GetTopic(i int) Word256

func (*LogEvent) Keys

func (l *LogEvent) Keys() []string

func (*LogEvent) Len

func (l *LogEvent) Len() int

func (*LogEvent) String

func (l *LogEvent) String() string

type TaggedEvent

type TaggedEvent struct {
	query.Tagged
}

Tags

type TaggedEvents

type TaggedEvents []*TaggedEvent

func (TaggedEvents) Filter

func (tes TaggedEvents) Filter(qry query.Query) TaggedEvents

type TransferData

type TransferData struct {
	Token crypto2.Address `json:"token"`          // Token types.Address
	From  crypto2.Address `json:"from"`           // Account address of Sender
	To    crypto2.Address `json:"to"`             // Account address of Receiver
	Value bn.Number       `json:"value"`          // Transfer value
	Note  string          `json:"note,omitempty"` // Transfer note
}

func (*TransferData) GetNote

func (m *TransferData) GetNote() string

func (*TransferData) GetValue

func (m *TransferData) GetValue() bn.Number

func (*TransferData) String

func (m *TransferData) String() string

type TransferEvent

type TransferEvent struct {
	TransferData *TransferData `json:"TransferData,omitempty"`
}

func (*TransferEvent) GetTransferData

func (m *TransferEvent) GetTransferData() *TransferData

func (*TransferEvent) String

func (m *TransferEvent) String() string

type TransferType

type TransferType uint32

func TransferTypeFromString

func TransferTypeFromString(name string) TransferType

func (TransferType) MarshalText

func (tt TransferType) MarshalText() ([]byte, error)

func (TransferType) String

func (tt TransferType) String() string

func (*TransferType) UnmarshalText

func (tt *TransferType) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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