Add Inner Ring code
This commit is contained in:
parent
dadfd90dcd
commit
b7b5079934
400 changed files with 11420 additions and 8690 deletions
23
pkg/morph/event/handler.go
Normal file
23
pkg/morph/event/handler.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package event
|
||||
|
||||
// Handler is an Event processing function.
|
||||
type Handler func(Event)
|
||||
|
||||
// HandlerInfo is a structure that groups
|
||||
// the parameters of the handler of particular
|
||||
// contract event.
|
||||
type HandlerInfo struct {
|
||||
scriptHashWithType
|
||||
|
||||
h Handler
|
||||
}
|
||||
|
||||
// SetHandler is an event handler setter.
|
||||
func (s *HandlerInfo) SetHandler(v Handler) {
|
||||
s.h = v
|
||||
}
|
||||
|
||||
// Handler returns an event handler.
|
||||
func (s HandlerInfo) Handler() Handler {
|
||||
return s.h
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue