[#505] morph/client: Support boolean invocation argument

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-25 12:24:03 +03:00 committed by Alex Vanin
parent f2778361c8
commit fad477df2a
2 changed files with 26 additions and 1 deletions

View file

@ -289,6 +289,16 @@ func toStackParameter(value interface{}) (sc.Parameter, error) {
}
return toStackParameter(arr)
case bool:
// FIXME: there are some problems with BoolType in neo-go,
// so we use compatible type
result.Type = sc.IntegerType
if v {
result.Value = int64(1)
} else {
result.Value = int64(0)
}
default:
return result, fmt.Errorf("chain/client: unsupported parameter %v", value)
}