From b6ca7f1f873d05b2d60647bf36588b63960ef769 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 9 Mar 2021 17:47:13 +0300 Subject: [PATCH] [#421] morph/client: Support native.Role type as contract argument Signed-off-by: Alex Vanin --- pkg/morph/client/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/morph/client/client.go b/pkg/morph/client/client.go index 61407c2c..0d80778e 100644 --- a/pkg/morph/client/client.go +++ b/pkg/morph/client/client.go @@ -4,6 +4,7 @@ import ( "context" "time" + "github.com/nspcc-dev/neo-go/pkg/core/native" "github.com/nspcc-dev/neo-go/pkg/core/transaction" "github.com/nspcc-dev/neo-go/pkg/encoding/fixedn" "github.com/nspcc-dev/neo-go/pkg/rpc/client" @@ -219,6 +220,9 @@ func toStackParameter(value interface{}) (sc.Parameter, error) { case util.Uint160: result.Type = sc.ByteArrayType result.Value = v.BytesBE() + case native.Role: + result.Type = sc.IntegerType + result.Value = int64(v) default: return result, errors.Errorf("chain/client: unsupported parameter %v", value) }