[#732] neofs-adm: fetch native hashes once

Retrieve list of native contracts during initialization
in a single query.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-07-29 16:35:57 +03:00 committed by Alex Vanin
parent 6a40adcfca
commit c81008764a
6 changed files with 26 additions and 37 deletions

View file

@ -159,10 +159,7 @@ func generateStorageCreds(cmd *cobra.Command, args []string) error {
return err
}
gasHash, err := wCtx.Client.GetNativeContractHash(nativenames.Gas)
if err != nil {
return err
}
gasHash := wCtx.nativeHash(nativenames.Gas)
bw := io.NewBufBinWriter()
emit.AppCall(bw.BinWriter, gasHash, "transfer", callflag.All,