forked from TrueCloudLab/neoneo-go
rpc: allow to pass null parameter to invoke* calls
This commit is contained in:
parent
2e8bbf2a87
commit
2fd04fbb35
1 changed files with 4 additions and 0 deletions
|
@ -90,6 +90,10 @@ func ExpandArrayIntoScript(script *io.BinWriter, slice []Param) error {
|
|||
}
|
||||
emit.Int(script, int64(len(val)))
|
||||
emit.Opcodes(script, opcode.PACK)
|
||||
case smartcontract.AnyType:
|
||||
if fp.Value.IsNull() {
|
||||
emit.Opcodes(script, opcode.PUSHNULL)
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("parameter type %v is not supported", fp.Type)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue