[#505] morph/client: Support boolean invocation argument
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f2778361c8
commit
fad477df2a
2 changed files with 26 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue