From 02079a4f8957c8f73d65b055c843432df260db60 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 19 May 2021 14:55:37 +0300 Subject: [PATCH] [#505] morph/container: Add public key argument to set eACL operation Add `SetEACLArgs.SetPublicKey` method which sets binary public key argument of the "set eACL" contract call. Attach key to the `Invoke` call. Signed-off-by: Leonard Lyubich --- pkg/morph/client/container/eacl_set.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/morph/client/container/eacl_set.go b/pkg/morph/client/container/eacl_set.go index efedd8f9e..23ea73614 100644 --- a/pkg/morph/client/container/eacl_set.go +++ b/pkg/morph/client/container/eacl_set.go @@ -10,6 +10,8 @@ type SetEACLArgs struct { eacl []byte // extended ACL table sig []byte // eACL table signature + + pubkey []byte // binary public key } // SetEACL sets the extended ACL table @@ -24,6 +26,12 @@ func (p *SetEACLArgs) SetSignature(v []byte) { p.sig = v } +// SetPublicKey sets public key related to +// table signature. +func (p *SetEACLArgs) SetPublicKey(v []byte) { + p.pubkey = v +} + // SetEACL invokes the call of set eACL method // of NeoFS Container contract. func (c *Client) SetEACL(args SetEACLArgs) error { @@ -31,6 +39,7 @@ func (c *Client) SetEACL(args SetEACLArgs) error { c.setEACLMethod, args.eacl, args.sig, + args.pubkey, ) if err != nil {