[#971] morph/client: Adapt signature changes in wrappers

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-11-09 23:52:29 +03:00 committed by Alex Vanin
parent 3849d13e0b
commit 1db6d316c2
28 changed files with 301 additions and 193 deletions

View file

@ -2,6 +2,8 @@ package netmap
import (
"fmt"
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
)
// UpdateStateArgs groups the arguments
@ -26,11 +28,12 @@ func (u *UpdateStateArgs) SetState(v int64) {
// UpdateState invokes the call of update state method
// of NeoFS Netmap contract.
func (c *Client) UpdateState(args UpdateStateArgs) error {
err := c.client.Invoke(
c.updateStateMethod,
args.state,
args.key,
)
prm := client.InvokePrm{}
prm.SetMethod(c.updateStateMethod)
prm.SetArgs(args.state, args.key)
err := c.client.Invoke(prm)
if err != nil {
return fmt.Errorf("could not invoke method (%s): %w", c.updateStateMethod, err)