github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/cli/smartcontract/testdata/invalid2/invalid.go (about)

     1  // invalid is an example of a contract which doesn't pass event check.
     2  package invalid2
     3  
     4  import (
     5  	"github.com/nspcc-dev/neo-go/pkg/interop"
     6  	"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
     7  )
     8  
     9  // Notify1 emits a correctly typed event.
    10  func Notify1() bool {
    11  	runtime.Notify("Event", interop.Hash160{1, 2, 3})
    12  
    13  	return true
    14  }
    15  
    16  // Notify2 emits an invalid event (extra parameter).
    17  func Notify2() bool {
    18  	runtime.Notify("Event", interop.Hash160{1, 2, 3}, "extra parameter")
    19  
    20  	return true
    21  }