forked from TrueCloudLab/frostfs-node
[#421] morph/client: Support keys.PublicKeys type as contract argument
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
b6ca7f1f87
commit
527daec69a
1 changed files with 7 additions and 0 deletions
|
@ -223,6 +223,13 @@ func toStackParameter(value interface{}) (sc.Parameter, error) {
|
||||||
case native.Role:
|
case native.Role:
|
||||||
result.Type = sc.IntegerType
|
result.Type = sc.IntegerType
|
||||||
result.Value = int64(v)
|
result.Value = int64(v)
|
||||||
|
case keys.PublicKeys:
|
||||||
|
arr := make([][]byte, 0, len(v))
|
||||||
|
for i := range v {
|
||||||
|
arr = append(arr, v[i].Bytes())
|
||||||
|
}
|
||||||
|
|
||||||
|
return toStackParameter(arr)
|
||||||
default:
|
default:
|
||||||
return result, errors.Errorf("chain/client: unsupported parameter %v", value)
|
return result, errors.Errorf("chain/client: unsupported parameter %v", value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue