From df48ddcb3df4f053835ed706ba780491a0bc161f Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 20 May 2022 15:35:13 +0300 Subject: [PATCH] Revert "[#1141] morph/client: Allow to use more integer types as arguments" This reverts commit 9349f422fd9a29ec529ef0648bbfabd1f9ff7651. Signed-off-by: Evgenii Stratonikov --- pkg/morph/client/client.go | 6 +++--- pkg/morph/client/client_test.go | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/pkg/morph/client/client.go b/pkg/morph/client/client.go index ef81c0175..ad3dae21c 100644 --- a/pkg/morph/client/client.go +++ b/pkg/morph/client/client.go @@ -451,13 +451,13 @@ func toStackParameter(value interface{}) (sc.Parameter, error) { result.Type = sc.ByteArrayType case int: result.Type = sc.IntegerType - result.Value = big.NewInt(int64(v)) + result.Value = int64(v) case int64: result.Type = sc.IntegerType - result.Value = big.NewInt(v) + result.Value = v case uint64: result.Type = sc.IntegerType - result.Value = new(big.Int).SetUint64(v) + result.Value = int64(v) case [][]byte: arr := make([]sc.Parameter, 0, len(v)) for i := range v { diff --git a/pkg/morph/client/client_test.go b/pkg/morph/client/client_test.go index 5239ffa12..f977d935f 100644 --- a/pkg/morph/client/client_test.go +++ b/pkg/morph/client/client_test.go @@ -1,7 +1,6 @@ package client import ( - "math/big" "testing" sc "github.com/nspcc-dev/neo-go/pkg/smartcontract" @@ -21,12 +20,6 @@ func TestToStackParameter(t *testing.T) { { value: int64(100), expType: sc.IntegerType, - expVal: big.NewInt(100), - }, - { - value: uint64(100), - expType: sc.IntegerType, - expVal: big.NewInt(100), }, { value: "hello world",