mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: check emitted event names
Check that all `Notify` invocations in source correspond to some event in manifest. Helpful for typos such as `transfer` instead of `Transfer`.
This commit is contained in:
parent
25f1db6de0
commit
75a9a42403
15 changed files with 172 additions and 7 deletions
|
@ -24,6 +24,8 @@ type DebugInfo struct {
|
|||
Documents []string `json:"documents"`
|
||||
Methods []MethodDebugInfo `json:"methods"`
|
||||
Events []EventDebugInfo `json:"events"`
|
||||
// EmittedEvents contains events occuring in code.
|
||||
EmittedEvents map[string][][]string `json:"-"`
|
||||
}
|
||||
|
||||
// MethodDebugInfo represents smart-contract's method debug information.
|
||||
|
@ -162,6 +164,7 @@ func (c *codegen) emitDebugInfo(contract []byte) *DebugInfo {
|
|||
}
|
||||
d.Methods = append(d.Methods, *m)
|
||||
}
|
||||
d.EmittedEvents = c.emittedEvents
|
||||
return d
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue