[#304] go.mod: Update neo-go to v0.99.1
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
90255e9efa
commit
7de66159d4
4 changed files with 9 additions and 9 deletions
2
go.mod
2
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
|
||||
|
|
BIN
go.sum
BIN
go.sum
Binary file not shown.
14
ns/nns.go
14
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)
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue