MCPcopy Create free account
hub / github.com/DNAProject/DNA / PushSmartCodeEvent

Function PushSmartCodeEvent

smartcontract/event/event.go:37–48  ·  view source on GitHub ↗

PushSmartCodeEvent push event content to socket.io

(txHash common.Uint256, errcode int64, action string, result interface{})

Source from the content-addressed store, hash-verified

35
36// PushSmartCodeEvent push event content to socket.io
37func PushSmartCodeEvent(txHash common.Uint256, errcode int64, action string, result interface{}) {
38 if events.DefActorPublisher == nil {
39 return
40 }
41 smartCodeEvt := &types.SmartCodeEvent{
42 TxHash: txHash,
43 Action: action,
44 Result: result,
45 Error: errcode,
46 }
47 events.DefActorPublisher.Publish(message.TOPIC_SMART_CODE_EVENT, &message.SmartCodeEventMsg{smartCodeEvt})
48}

Callers 2

SaveNotifyFunction · 0.92
RuntimeLogFunction · 0.92

Calls 1

PublishMethod · 0.80

Tested by

no test coverage detected