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 Binary files a/go.sum and b/go.sum differ 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"