tutus-chain/cli/smartcontract/testdata/invalid3/invalid.go

22 lines
508 B
Go
Executable File

// invalid is an example of a contract which doesn't pass event check.
package invalid3
import (
"git.marketally.com/tutus-one/tutus-chain/pkg/interop"
"git.marketally.com/tutus-one/tutus-chain/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 (missing from manifest).
func Notify2() bool {
runtime.Notify("AnotherEvent", interop.Hash160{1, 2, 3})
return true
}