diff --git a/cli/smartcontract/smart_contract.go b/cli/smartcontract/smart_contract.go index dffb75829..14ddf157b 100644 --- a/cli/smartcontract/smart_contract.go +++ b/cli/smartcontract/smart_contract.go @@ -500,9 +500,6 @@ func invokeInternal(ctx *cli.Context, signAndPush bool) error { if err != nil { return err } - if err = c.Init(); err != nil { - return err - } resp, err = c.InvokeFunction(script, operation, params, cosigners) if err != nil { diff --git a/cli/wallet/nep17.go b/cli/wallet/nep17.go index 27eab4ee5..40f32d560 100644 --- a/cli/wallet/nep17.go +++ b/cli/wallet/nep17.go @@ -158,10 +158,6 @@ func getNEP17Balance(ctx *cli.Context) error { if err != nil { return cli.NewExitError(err, 1) } - err = c.Init() - if err != nil { - return cli.NewExitError(fmt.Errorf("failed to init RPC client: %w", err), 1) - } name := ctx.String("token") @@ -366,10 +362,6 @@ func multiTransferNEP17(ctx *cli.Context) error { if err != nil { return cli.NewExitError(err, 1) } - err = c.Init() - if err != nil { - return cli.NewExitError(fmt.Errorf("failed to init RPC client: %w", err), 1) - } if ctx.NArg() == 0 { return cli.NewExitError("empty recipients list", 1) @@ -433,10 +425,6 @@ func transferNEP17(ctx *cli.Context) error { if err != nil { return cli.NewExitError(err, 1) } - err = c.Init() - if err != nil { - return cli.NewExitError(fmt.Errorf("failed to init RPC client: %w", err), 1) - } toFlag := ctx.Generic("to").(*flags.Address) to := toFlag.Uint160()