events

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventStringAccountCall

func EventStringAccountCall(addr acm.Address) string

func EventStringLogEvent

func EventStringLogEvent(addr acm.Address) string

func PublishAccountCall

func PublishAccountCall(publisher event.Publisher, address acm.Address, eventDataCall *EventDataCall) error

func PublishLogEvent

func PublishLogEvent(publisher event.Publisher, address acm.Address, eventDataLog *EventDataLog) error

func SubscribeAccountCall

func SubscribeAccountCall(ctx context.Context, subscribable event.Subscribable, subscriber string, address acm.Address,
	txHash []byte, stackDepth int, ch chan<- *EventDataCall) error

Subscribe to account call event - if TxHash is provided listens for a specifc Tx otherwise captures all, if stackDepth is greater than or equal to 0 captures calls at a specific stack depth (useful for capturing the return of the root call over recursive calls

func SubscribeLogEvent

func SubscribeLogEvent(ctx context.Context, subscribable event.Subscribable, subscriber string, address acm.Address,
	ch chan<- *EventDataLog) error

Types

type CallData

type CallData struct {
	Caller acm.Address
	Callee acm.Address
	Data   []byte
	Value  uint64
	Gas    uint64
}

type EventDataCall

type EventDataCall struct {
	CallData   *CallData
	Origin     acm.Address
	TxHash     []byte
	StackDepth int
	Return     []byte
	Exception  string
}

EventDataCall fires when we call a contract, and when a contract calls another contract

type EventDataLog

type EventDataLog struct {
	Address acm.Address
	Topics  []Word256
	Data    []byte
	Height  uint64
}

EventDataLog fires when a contract executes the LOG opcode

Jump to

Keyboard shortcuts

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