[#301] ns: Adopt neo-go int parameter
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
3a95686aab
commit
90f1cc7a1a
2 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math/big"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
||||||
|
@ -122,7 +123,7 @@ func (n *NNS) ResolveContainerName(name string) (cid.ID, error) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: smartcontract.IntegerType,
|
Type: smartcontract.IntegerType,
|
||||||
Value: int64(nns.TXT),
|
Value: big.NewInt(int64(nns.TXT)),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -36,7 +36,7 @@ func (x *testNeoClient) call(contract util.Uint160, method string, prm []smartco
|
||||||
require.Len(x.t, prm, 2)
|
require.Len(x.t, prm, 2)
|
||||||
require.Equal(x.t, smartcontract.StringType, prm[0].Type)
|
require.Equal(x.t, smartcontract.StringType, prm[0].Type)
|
||||||
require.Equal(x.t, smartcontract.IntegerType, prm[1].Type)
|
require.Equal(x.t, smartcontract.IntegerType, prm[1].Type)
|
||||||
require.EqualValues(x.t, nns.TXT, prm[1].Value)
|
require.EqualValues(x.t, big.NewInt(int64(nns.TXT)), prm[1].Value)
|
||||||
|
|
||||||
val, ok := prm[0].Value.(string)
|
val, ok := prm[0].Value.(string)
|
||||||
require.True(x.t, ok)
|
require.True(x.t, ok)
|
||||||
|
|
Loading…
Reference in a new issue