rpc: allow to pass null parameter to invoke* calls

This commit is contained in:
Anna Shaleva 2021-11-09 10:37:22 +03:00
parent 2e8bbf2a87
commit 2fd04fbb35

View file

@ -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)
}