[#722] neofs-adm: Hide N3 client behind an interface

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-04-07 11:10:35 +03:00 committed by LeL
parent 57200e18cd
commit 37f9d083fb
9 changed files with 126 additions and 46 deletions

View file

@ -25,10 +25,7 @@ func setPolicyCmd(cmd *cobra.Command, args []string) error {
return fmt.Errorf("can't to initialize context: %w", err)
}
policyHash, err := wCtx.Client.GetNativeContractHash(nativenames.Policy)
if err != nil {
return fmt.Errorf("can't get policy contract hash: %w", err)
}
policyHash := wCtx.nativeHash(nativenames.Policy)
bw := io.NewBufBinWriter()
for i := range args {