vm: make NewBigInteger accept *big.Int

It creates big.Int internally anyway, so this is the most flexible way.
This commit is contained in:
Evgenii Stratonikov 2020-04-16 15:28:34 +03:00
parent 9586af32f2
commit 3831aec53f
7 changed files with 45 additions and 43 deletions

View file

@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io/ioutil"
"math/big"
"os"
"strconv"
"strings"
@ -438,7 +439,7 @@ func parseArgs(args []string) ([]vm.StackItem, error) {
if err != nil {
return nil, err
}
items[i] = vm.NewBigIntegerItem(val)
items[i] = vm.NewBigIntegerItem(big.NewInt(val))
case stringType:
items[i] = vm.NewByteArrayItem([]byte(value))
}