forked from TrueCloudLab/frostfs-node
[#1606] go.mod: Update neo-go
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
cb0bb7207c
commit
6cc180391e
13 changed files with 35 additions and 35 deletions
|
@ -15,9 +15,9 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neofs-contract/nns"
|
"github.com/nspcc-dev/neofs-contract/nns"
|
||||||
"github.com/nspcc-dev/neofs-sdk-go/netmap"
|
"github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
@ -94,7 +94,7 @@ func dumpBalances(cmd *cobra.Command, _ []string) error {
|
||||||
|
|
||||||
if dumpStorage {
|
if dumpStorage {
|
||||||
res, err := invokeFunction(c, nmHash, "netmap", []interface{}{}, nil)
|
res, err := invokeFunction(c, nmHash, "netmap", []interface{}{}, nil)
|
||||||
if err != nil || res.State != vm.HaltState.String() || len(res.Stack) == 0 {
|
if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) == 0 {
|
||||||
return errors.New("can't fetch the list of storage nodes")
|
return errors.New("can't fetch the list of storage nodes")
|
||||||
}
|
}
|
||||||
arr, ok := res.Stack[0].Value().([]stackitem.Item)
|
arr, ok := res.Stack[0].Value().([]stackitem.Item)
|
||||||
|
@ -197,7 +197,7 @@ func fetchIRNodes(c Client, nmHash, desigHash util.Uint160) ([]accBalancePair, e
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
res, err := invokeFunction(c, nmHash, "innerRingList", []interface{}{}, nil)
|
res, err := invokeFunction(c, nmHash, "innerRingList", []interface{}{}, nil)
|
||||||
if err != nil || res.State != vm.HaltState.String() || len(res.Stack) == 0 {
|
if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) == 0 {
|
||||||
return nil, errors.New("can't fetch list of IR nodes from the netmap contract")
|
return nil, errors.New("can't fetch list of IR nodes from the netmap contract")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ func fetchBalances(c Client, gasHash util.Uint160, accounts []accBalancePair) er
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err := c.InvokeScript(w.Bytes(), nil)
|
res, err := c.InvokeScript(w.Bytes(), nil)
|
||||||
if err != nil || res.State != vm.HaltState.String() || len(res.Stack) != len(accounts) {
|
if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) != len(accounts) {
|
||||||
return errors.New("can't fetch account balances")
|
return errors.New("can't fetch account balances")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neofs-contract/nns"
|
"github.com/nspcc-dev/neofs-contract/nns"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
@ -112,7 +112,7 @@ func dumpContractHashes(cmd *cobra.Command, _ []string) error {
|
||||||
return fmt.Errorf("can't fetch info from NNS: %w", err)
|
return fmt.Errorf("can't fetch info from NNS: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.State == vm.HaltState.String() {
|
if res.State == vmstate.Halt.String() {
|
||||||
for i := range res.Stack {
|
for i := range res.Stack {
|
||||||
infos[i].version = parseContractVersion(res.Stack[i])
|
infos[i].version = parseContractVersion(res.Stack[i])
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ func dumpNetworkConfig(cmd *cobra.Command, _ []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err := invokeFunction(c, nmHash, "listConfig", nil, nil)
|
res, err := invokeFunction(c, nmHash, "listConfig", nil, nil)
|
||||||
if err != nil || res.State != vm.HaltState.String() || len(res.Stack) == 0 {
|
if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) == 0 {
|
||||||
return errors.New("can't fetch list of network config keys from the netmap contract")
|
return errors.New("can't fetch list of network config keys from the netmap contract")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,7 @@ func forceNewEpochCmd(cmd *cobra.Command, args []string) error {
|
||||||
|
|
||||||
func emitNewEpochCall(bw *io.BufBinWriter, wCtx *initializeContext, nmHash util.Uint160) error {
|
func emitNewEpochCall(bw *io.BufBinWriter, wCtx *initializeContext, nmHash util.Uint160) error {
|
||||||
res, err := invokeFunction(wCtx.Client, nmHash, "epoch", nil, nil)
|
res, err := invokeFunction(wCtx.Client, nmHash, "epoch", nil, nil)
|
||||||
if err != nil || res.State != vm.HaltState.String() || len(res.Stack) == 0 {
|
if err != nil || res.State != vmstate.Halt.String() || len(res.Stack) == 0 {
|
||||||
return errors.New("can't fetch current epoch from the netmap contract")
|
return errors.New("can't fetch current epoch from the netmap contract")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
||||||
"github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/config"
|
"github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/config"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/innerring"
|
"github.com/nspcc-dev/neofs-node/pkg/innerring"
|
||||||
|
@ -333,7 +333,7 @@ loop:
|
||||||
for i := range c.Hashes {
|
for i := range c.Hashes {
|
||||||
res, err := c.Client.GetApplicationLog(c.Hashes[i], &at)
|
res, err := c.Client.GetApplicationLog(c.Hashes[i], &at)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if retErr == nil && len(res.Executions) > 0 && res.Executions[0].VMState != vm.HaltState {
|
if retErr == nil && len(res.Executions) > 0 && res.Executions[0].VMState != vmstate.Halt {
|
||||||
retErr = fmt.Errorf("tx %d persisted in %s state: %s",
|
retErr = fmt.Errorf("tx %d persisted in %s state: %s",
|
||||||
i, res.Executions[0].VMState, res.Executions[0].FaultException)
|
i, res.Executions[0].VMState, res.Executions[0].FaultException)
|
||||||
}
|
}
|
||||||
|
@ -344,7 +344,7 @@ loop:
|
||||||
case <-tick.C:
|
case <-tick.C:
|
||||||
res, err := c.Client.GetApplicationLog(c.Hashes[i], &at)
|
res, err := c.Client.GetApplicationLog(c.Hashes[i], &at)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if retErr == nil && len(res.Executions) > 0 && res.Executions[0].VMState != vm.HaltState {
|
if retErr == nil && len(res.Executions) > 0 && res.Executions[0].VMState != vmstate.Halt {
|
||||||
retErr = fmt.Errorf("tx %d persisted in %s state: %s",
|
retErr = fmt.Errorf("tx %d persisted in %s state: %s",
|
||||||
i, res.Executions[0].VMState, res.Executions[0].FaultException)
|
i, res.Executions[0].VMState, res.Executions[0].FaultException)
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,9 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/nef"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/nef"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/innerring"
|
"github.com/nspcc-dev/neofs-node/pkg/innerring"
|
||||||
morphClient "github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
morphClient "github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
@ -129,7 +129,7 @@ func (c *initializeContext) deployNNS(method string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("can't deploy NNS contract: %w", err)
|
return fmt.Errorf("can't deploy NNS contract: %w", err)
|
||||||
}
|
}
|
||||||
if res.State != vm.HaltState.String() {
|
if res.State != vmstate.Halt.String() {
|
||||||
return fmt.Errorf("can't deploy NNS contract: %s", res.FaultException)
|
return fmt.Errorf("can't deploy NNS contract: %s", res.FaultException)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ func (c *initializeContext) updateContracts() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("can't update alphabet contracts: %w", err)
|
return fmt.Errorf("can't update alphabet contracts: %w", err)
|
||||||
}
|
}
|
||||||
if res.State != vm.HaltState.String() {
|
if res.State != vmstate.Halt.String() {
|
||||||
return fmt.Errorf("can't update alphabet contracts: %s", res.FaultException)
|
return fmt.Errorf("can't update alphabet contracts: %s", res.FaultException)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ func (c *initializeContext) updateContracts() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("can't deploy %s contract: %w", ctrName, err)
|
return fmt.Errorf("can't deploy %s contract: %w", ctrName, err)
|
||||||
}
|
}
|
||||||
if res.State != vm.HaltState.String() {
|
if res.State != vmstate.Halt.String() {
|
||||||
return fmt.Errorf("can't deploy %s contract: %s", ctrName, res.FaultException)
|
return fmt.Errorf("can't deploy %s contract: %s", ctrName, res.FaultException)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ func (c *initializeContext) deployContracts() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("can't deploy alphabet #%d contract: %w", i, err)
|
return fmt.Errorf("can't deploy alphabet #%d contract: %w", i, err)
|
||||||
}
|
}
|
||||||
if res.State != vm.HaltState.String() {
|
if res.State != vmstate.Halt.String() {
|
||||||
return fmt.Errorf("can't deploy alpabet #%d contract: %s", i, res.FaultException)
|
return fmt.Errorf("can't deploy alpabet #%d contract: %s", i, res.FaultException)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ func (c *initializeContext) deployContracts() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("can't deploy %s contract: %w", ctrName, err)
|
return fmt.Errorf("can't deploy %s contract: %w", ctrName, err)
|
||||||
}
|
}
|
||||||
if res.State != vm.HaltState.String() {
|
if res.State != vmstate.Halt.String() {
|
||||||
return fmt.Errorf("can't deploy %s contract: %s", ctrName, res.FaultException)
|
return fmt.Errorf("can't deploy %s contract: %s", ctrName, res.FaultException)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,10 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neofs-contract/nns"
|
"github.com/nspcc-dev/neofs-contract/nns"
|
||||||
morphClient "github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
morphClient "github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||||
)
|
)
|
||||||
|
@ -169,7 +169,7 @@ func (c *initializeContext) nnsRootRegistered(nnsHash util.Uint160) (bool, error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
return res.State == vm.HaltState.String(), nil
|
return res.State == vmstate.Halt.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var errMissingNNSRecord = errors.New("missing NNS record")
|
var errMissingNNSRecord = errors.New("missing NNS record")
|
||||||
|
@ -188,7 +188,7 @@ func nnsResolve(c Client, nnsHash util.Uint160, domain string) (stackitem.Item,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("`resolve`: %w", err)
|
return nil, fmt.Errorf("`resolve`: %w", err)
|
||||||
}
|
}
|
||||||
if result.State != vm.HaltState.String() {
|
if result.State != vmstate.Halt.String() {
|
||||||
if strings.Contains(result.FaultException, "token not found") {
|
if strings.Contains(result.FaultException, "token not found") {
|
||||||
return nil, errMissingNNSRecord
|
return nil, errMissingNNSRecord
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,10 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
)
|
)
|
||||||
|
|
||||||
// initialAlphabetNEOAmount represents the total amount of GAS distributed between alphabet nodes.
|
// initialAlphabetNEOAmount represents the total amount of GAS distributed between alphabet nodes.
|
||||||
|
@ -27,7 +27,7 @@ func (c *initializeContext) registerCandidates() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if res.State == vm.HaltState.String() && len(res.Stack) > 0 {
|
if res.State == vmstate.Halt.String() && len(res.Stack) > 0 {
|
||||||
arr, ok := res.Stack[0].Value().([]stackitem.Item)
|
arr, ok := res.Stack[0].Value().([]stackitem.Item)
|
||||||
if ok && len(arr) > 0 {
|
if ok && len(arr) > 0 {
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -28,10 +28,10 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -233,7 +233,7 @@ func (l *localClient) NEP17BalanceOf(h util.Uint160, acc util.Uint160) (int64, e
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
if res.State != vm.HaltState.String() || len(res.Stack) == 0 {
|
if res.State != vmstate.Halt.String() || len(res.Stack) == 0 {
|
||||||
return 0, fmt.Errorf("`balance`: invalid response (empty: %t): %s",
|
return 0, fmt.Errorf("`balance`: invalid response (empty: %t): %s",
|
||||||
len(res.Stack) == 0, res.FaultException)
|
len(res.Stack) == 0, res.FaultException)
|
||||||
}
|
}
|
||||||
|
@ -341,7 +341,7 @@ func getDesignatedByRole(c Client, h util.Uint160, role noderoles.Role, u uint32
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if res.State != vm.HaltState.String() || len(res.Stack) == 0 {
|
if res.State != vmstate.Halt.String() || len(res.Stack) == 0 {
|
||||||
return nil, errGetDesignatedByRoleResponse
|
return nil, errGetDesignatedByRoleResponse
|
||||||
}
|
}
|
||||||
arr, ok := res.Stack[0].Value().([]stackitem.Item)
|
arr, ok := res.Stack[0].Value().([]stackitem.Item)
|
||||||
|
|
|
@ -28,7 +28,7 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
||||||
netutil "github.com/nspcc-dev/neofs-node/pkg/network"
|
netutil "github.com/nspcc-dev/neofs-node/pkg/network"
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ func depositGas(cmd *cobra.Command, acc *wallet.Account, network string) {
|
||||||
}}, nil)
|
}}, nil)
|
||||||
fatalOnErr(err)
|
fatalOnErr(err)
|
||||||
|
|
||||||
if res.State != vm.HaltState.String() {
|
if res.State != vmstate.Halt.String() {
|
||||||
fatalOnErr(fmt.Errorf("invalid response from balance contract: %s", res.FaultException))
|
fatalOnErr(fmt.Errorf("invalid response from balance contract: %s", res.FaultException))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
go.mod
4
go.mod
|
@ -15,8 +15,8 @@ require (
|
||||||
github.com/multiformats/go-multiaddr v0.4.0
|
github.com/multiformats/go-multiaddr v0.4.0
|
||||||
github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d
|
github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d
|
||||||
github.com/nspcc-dev/hrw v1.0.9
|
github.com/nspcc-dev/hrw v1.0.9
|
||||||
github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220609082921-2c9fb2044242
|
github.com/nspcc-dev/neo-go v0.99.1-pre.0.20220714084516-54849ef3e58e
|
||||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220601120906-3bec6657f5c5 // indirect
|
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220713145417-4f184498bc42 // indirect
|
||||||
github.com/nspcc-dev/neofs-api-go/v2 v2.13.0
|
github.com/nspcc-dev/neofs-api-go/v2 v2.13.0
|
||||||
github.com/nspcc-dev/neofs-contract v0.15.1
|
github.com/nspcc-dev/neofs-contract v0.15.1
|
||||||
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.5.0.20220706151041-0d862d8568a4
|
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.5.0.20220706151041-0d862d8568a4
|
||||||
|
|
BIN
go.sum
BIN
go.sum
Binary file not shown.
|
@ -18,8 +18,8 @@ import (
|
||||||
sc "github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
sc "github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -385,7 +385,7 @@ func (c *Client) TxHalt(h util.Uint256) (res bool, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
return len(aer.Executions) > 0 && aer.Executions[0].VMState.HasFlag(vm.HaltState), nil
|
return len(aer.Executions) > 0 && aer.Executions[0].VMState.HasFlag(vmstate.Halt), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TxHeight returns true if transaction has been successfully executed and persisted.
|
// TxHeight returns true if transaction has been successfully executed and persisted.
|
||||||
|
@ -562,7 +562,7 @@ func (c *Client) IsValidScript(script []byte, signers []transaction.Signer) (res
|
||||||
return false, fmt.Errorf("invokeScript: %w", err)
|
return false, fmt.Errorf("invokeScript: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.State == vm.HaltState.String(), nil
|
return result.State == vmstate.Halt.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotificationChannel returns channel than receives subscribed
|
// NotificationChannel returns channel than receives subscribed
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||||
"github.com/nspcc-dev/neofs-contract/nns"
|
"github.com/nspcc-dev/neofs-contract/nns"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ func nnsResolveItem(c *client.WSClient, nnsHash util.Uint160, domain string) (st
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if result.State != vm.HaltState.String() {
|
if result.State != vmstate.Halt.String() {
|
||||||
return nil, fmt.Errorf("invocation failed: %s", result.FaultException)
|
return nil, fmt.Errorf("invocation failed: %s", result.FaultException)
|
||||||
}
|
}
|
||||||
if len(result.Stack) == 0 {
|
if len(result.Stack) == 0 {
|
||||||
|
|
Loading…
Reference in a new issue