From 527daec69a5baf2fd115936ef366793a39118275 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 23 Mar 2021 13:06:00 +0300 Subject: [PATCH] [#421] morph/client: Support keys.PublicKeys type as contract argument Signed-off-by: Alex Vanin --- pkg/morph/client/client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/morph/client/client.go b/pkg/morph/client/client.go index 0d80778ec..660c3411a 100644 --- a/pkg/morph/client/client.go +++ b/pkg/morph/client/client.go @@ -223,6 +223,13 @@ func toStackParameter(value interface{}) (sc.Parameter, error) { case native.Role: result.Type = sc.IntegerType 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: return result, errors.Errorf("chain/client: unsupported parameter %v", value) }