mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 23:33:37 +00:00
28908aa3cf
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
21 lines
474 B
Go
21 lines
474 B
Go
// invalid is an example of a contract which doesn't pass event check.
|
|
package invalid1
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/interop"
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
|
)
|
|
|
|
// Notify1 emits a correctly typed event.
|
|
func Notify1() bool {
|
|
runtime.Notify("Event", interop.Hash160{1, 2, 3})
|
|
|
|
return true
|
|
}
|
|
|
|
// Notify2 emits an invalid event (ByteString instead of Hash160).
|
|
func Notify2() bool {
|
|
runtime.Notify("Event", []byte{1, 2, 3})
|
|
|
|
return true
|
|
}
|