2022-04-20 18:30:09 +00:00
|
|
|
// invalid is an example of a contract which doesn't pass event check.
|
2020-11-24 13:36:35 +00:00
|
|
|
package invalid2
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
|
|
|
)
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// Notify1 emits a correctly typed event.
|
2020-11-24 13:36:35 +00:00
|
|
|
func Notify1() bool {
|
|
|
|
runtime.Notify("Event", interop.Hash160{1, 2, 3})
|
|
|
|
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// Notify2 emits an invalid event (extra parameter).
|
2020-11-24 13:36:35 +00:00
|
|
|
func Notify2() bool {
|
|
|
|
runtime.Notify("Event", interop.Hash160{1, 2, 3}, "extra parameter")
|
|
|
|
|
|
|
|
return true
|
|
|
|
}
|