From 8d201f920e36d8756d4eecdb6db2388dabc63add Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 25 May 2021 15:16:59 +0300 Subject: [PATCH] [#496] morph/wrappers: Deprecate all notary-dedicated methods All client wrappers should use underlying static client with enabled notary work mode in order to produce invocations of notary contract. Signed-off-by: Leonard Lyubich --- pkg/morph/client/balance/transfer.go | 3 +++ pkg/morph/client/container/estimations.go | 4 ++++ pkg/morph/client/reputation/put.go | 3 +++ 3 files changed, 10 insertions(+) diff --git a/pkg/morph/client/balance/transfer.go b/pkg/morph/client/balance/transfer.go index c3273183..03bb9a97 100644 --- a/pkg/morph/client/balance/transfer.go +++ b/pkg/morph/client/balance/transfer.go @@ -48,6 +48,9 @@ func (c *Client) TransferX(args TransferXArgs) error { // TransferXNotary invokes the call of "transferX" method // of NeoFS Balance contract via notary contract. +// +// Deprecated: construct underlying StaticClient with TryNotary() option +// and use TransferX. func (c *Client) TransferXNotary(args TransferXArgs) error { return c.transferX(true, args) } diff --git a/pkg/morph/client/container/estimations.go b/pkg/morph/client/container/estimations.go index af29cf64..2214dd90 100644 --- a/pkg/morph/client/container/estimations.go +++ b/pkg/morph/client/container/estimations.go @@ -27,6 +27,8 @@ func (c *Client) StartEstimation(args StartEstimation) error { return nil } +// Deprecated: construct underlying StaticClient with TryNotary() option +// and use StartEstimation. func (c *Client) StartEstimationNotary(args StartEstimation) error { if err := c.client.NotaryInvoke(c.startEstimation, args.epoch); err != nil { return fmt.Errorf("could not invoke method (%s): %w", c.startEstimation, err) @@ -41,6 +43,8 @@ func (c *Client) StopEstimation(args StopEstimation) error { return nil } +// Deprecated: construct underlying StaticClient with TryNotary() option +// and use StopEstimation. func (c *Client) StopEstimationNotary(args StopEstimation) error { if err := c.client.NotaryInvoke(c.stopEstimation, args.epoch); err != nil { return fmt.Errorf("could not invoke method (%s): %w", c.stopEstimation, err) diff --git a/pkg/morph/client/reputation/put.go b/pkg/morph/client/reputation/put.go index 5ab19b60..814b107c 100644 --- a/pkg/morph/client/reputation/put.go +++ b/pkg/morph/client/reputation/put.go @@ -43,6 +43,9 @@ func (c *Client) Put(args PutArgs) error { // PutViaNotary invokes notary call of "put reputation value" method of // reputation contract. +// +// Deprecated: construct underlying StaticClient with TryNotary() option +// and use Put. func (c *Client) PutViaNotary(args PutArgs) error { err := c.client.NotaryInvoke( c.putMethod,