mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
cli: add tests for contract
command
This commit is contained in:
parent
bb316f4652
commit
573d1d10c0
4 changed files with 167 additions and 11 deletions
|
@ -879,8 +879,12 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
for _, p := range n.Args[1:] {
|
||||
params = append(params, c.scTypeFromExpr(p))
|
||||
}
|
||||
name := constant.StringVal(tv.Value)
|
||||
c.emittedEvents[name] = append(c.emittedEvents[name], params)
|
||||
// Sometimes event name is stored in a var.
|
||||
// Skip in this case.
|
||||
if tv.Value != nil {
|
||||
name := constant.StringVal(tv.Value)
|
||||
c.emittedEvents[name] = append(c.emittedEvents[name], params)
|
||||
}
|
||||
}
|
||||
c.convertSyscall(n, f.pkg.Name(), f.name)
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue