mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-02 19:45:50 +00:00
22 lines
481 B
Go
22 lines
481 B
Go
|
// invalid is an example of contract which doesn't pass event check.
|
||
|
package invalid2
|
||
|
|
||
|
import (
|
||
|
"github.com/nspcc-dev/neo-go/pkg/interop"
|
||
|
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
||
|
)
|
||
|
|
||
|
// Notify1 emits correctly typed event.
|
||
|
func Notify1() bool {
|
||
|
runtime.Notify("Event", interop.Hash160{1, 2, 3})
|
||
|
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// Notify2 emits invalid event (extra parameter).
|
||
|
func Notify2() bool {
|
||
|
runtime.Notify("Event", interop.Hash160{1, 2, 3}, "extra parameter")
|
||
|
|
||
|
return true
|
||
|
}
|