From 7de66159d45048cae6d379a945eccb07043f5f1b Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 29 Jul 2022 11:01:10 +0300 Subject: [PATCH] [#304] go.mod: Update neo-go to v0.99.1 Signed-off-by: Evgenii Stratonikov --- go.mod | 2 +- go.sum | 6 ++++-- ns/nns.go | 14 +++++++------- ns/nns_test.go | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index b630f8c..0df69d4 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/hashicorp/golang-lru v0.5.4 github.com/mr-tron/base58 v1.2.0 github.com/nspcc-dev/hrw v1.0.9 - github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220714084516-54849ef3e58e + github.com/nspcc-dev/neo-go v0.99.1 github.com/nspcc-dev/neofs-api-go/v2 v2.13.0 github.com/nspcc-dev/neofs-contract v0.15.3 github.com/nspcc-dev/tzhash v1.6.1 diff --git a/go.sum b/go.sum index 314d8c3..2800e7b 100644 --- a/go.sum +++ b/go.sum @@ -174,10 +174,12 @@ github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU= github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:pPYwPZ2ks+uMnlRLUyXOpLieaDQSEaf4NM3zHVbRjmg= github.com/nspcc-dev/neo-go v0.98.0/go.mod h1:E3cc1x6RXSXrJb2nDWXTXjnXk3rIqVN8YdFyWv+FrqM= -github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220714084516-54849ef3e58e h1:sjl8sniYkjoOsD8F+wzkpRfm9RzZSLQlh5Z/SMyf4A8= github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220714084516-54849ef3e58e/go.mod h1:/y5Sl8p3YheTygriBtCCMWKkDOek8HcvSo5ds2rJtKI= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220713145417-4f184498bc42 h1:Krhg2cD5mqvC+lin7irw6hj0M+x4ZOZrRGzrZQB+wcQ= +github.com/nspcc-dev/neo-go v0.99.1 h1:/dlDVVCqlmazusIu+Emd4TlwxjIOpNNU5ob7bwUH6Qk= +github.com/nspcc-dev/neo-go v0.99.1/go.mod h1:wvKMQXlE/M3eqtN0KIi1MjkEVTvYIJRrOMnJtqEkCxs= github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220713145417-4f184498bc42/go.mod h1:QBE0I30F2kOAISNpT5oks82yF4wkkUq3SCfI3Hqgx/Y= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220727202624-6c7a401f776a h1:ND5lYt9/cybrbS6/DVX0398a4ilt4/xE/QtEaOzJSGY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220727202624-6c7a401f776a/go.mod h1:QBE0I30F2kOAISNpT5oks82yF4wkkUq3SCfI3Hqgx/Y= github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= github.com/nspcc-dev/neofs-api-go/v2 v2.11.1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= github.com/nspcc-dev/neofs-api-go/v2 v2.13.0 h1:7BcBiSjmWqJx0SPFlGRYt9ZFbMjucRIz9+Mv8UBLeq8= diff --git a/ns/nns.go b/ns/nns.go index f867b73..02daa6a 100644 --- a/ns/nns.go +++ b/ns/nns.go @@ -8,8 +8,8 @@ import ( "net/url" "github.com/nspcc-dev/neo-go/pkg/core/state" - neoclient "github.com/nspcc-dev/neo-go/pkg/rpc/client" - "github.com/nspcc-dev/neo-go/pkg/rpc/response/result" + "github.com/nspcc-dev/neo-go/pkg/neorpc/result" + "github.com/nspcc-dev/neo-go/pkg/rpcclient" "github.com/nspcc-dev/neo-go/pkg/smartcontract" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" @@ -38,7 +38,7 @@ type neoClient interface { // // note: see NNS.Dial to realize why this isn't defined as type wrapper like neoWebSocket. type neoHTTP struct { - *neoclient.Client + *rpcclient.Client } func (x *neoHTTP) call(contract util.Uint160, method string, prm []smartcontract.Parameter) (*result.Invoke, error) { @@ -46,10 +46,10 @@ func (x *neoHTTP) call(contract util.Uint160, method string, prm []smartcontract } // implements neoClient using Neo WebSocket client. -type neoWebSocket neoclient.WSClient +type neoWebSocket rpcclient.WSClient func (x *neoWebSocket) call(contract util.Uint160, method string, prm []smartcontract.Parameter) (*result.Invoke, error) { - return (*neoclient.WSClient)(x).InvokeFunction(contract, method, prm, nil) + return (*rpcclient.WSClient)(x).InvokeFunction(contract, method, prm, nil) } // Dial connects to the address of the NNS server. If fails, the instance @@ -72,14 +72,14 @@ func (n *NNS) Dial(address string) error { uri, err := url.Parse(address) if err == nil && (uri.Scheme == "ws" || uri.Scheme == "wss") { - cWebSocket, err := neoclient.NewWS(context.Background(), address, neoclient.Options{}) + cWebSocket, err := rpcclient.NewWS(context.Background(), address, rpcclient.Options{}) if err != nil { return fmt.Errorf("create Neo WebSocket client: %w", err) } multiSchemeClient = (*neoWebSocket)(cWebSocket) } else { - cHTTP, err := neoclient.New(context.Background(), address, neoclient.Options{}) + cHTTP, err := rpcclient.New(context.Background(), address, rpcclient.Options{}) if err != nil { return fmt.Errorf("create Neo HTTP client: %w", err) } diff --git a/ns/nns_test.go b/ns/nns_test.go index e777b7c..c541093 100644 --- a/ns/nns_test.go +++ b/ns/nns_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/nspcc-dev/neo-go/pkg/rpc/response/result" + "github.com/nspcc-dev/neo-go/pkg/neorpc/result" "github.com/nspcc-dev/neo-go/pkg/smartcontract" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem"