Revert "[#1141] morph/client: Allow to use more integer types as arguments"

This reverts commit 9349f422fd9a29ec529ef0648bbfabd1f9ff7651.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-05-20 15:35:13 +03:00 committed by LeL
parent 4761857fb3
commit df48ddcb3d
2 changed files with 3 additions and 10 deletions

View file

@ -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 {

View file

@ -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",