forked from TrueCloudLab/frostfs-node
[#932] adm: Refactor command morph
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
0bd030507e
commit
cda3a3d834
26 changed files with 324 additions and 290 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"os"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/config"
|
||||
morphUtil "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
|
||||
parseutil "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/modules/util"
|
||||
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
|
||||
apechain "git.frostfs.info/TrueCloudLab/policy-engine/pkg/chain"
|
||||
|
@ -77,17 +78,17 @@ func parseChain(cmd *cobra.Command) *apechain.Chain {
|
|||
|
||||
func newPolicyContractInterface(cmd *cobra.Command) (*morph.ContractStorage, *actor.Actor) {
|
||||
v := viper.GetViper()
|
||||
c, err := getN3Client(v)
|
||||
c, err := morphUtil.GetN3Client(v)
|
||||
commonCmd.ExitOnErr(cmd, "unable to create NEO rpc client: %w", err)
|
||||
|
||||
walletDir := config.ResolveHomePath(viper.GetString(alphabetWalletsFlag))
|
||||
wallets, err := getAlphabetWallets(v, walletDir)
|
||||
wallets, err := morphUtil.GetAlphabetWallets(v, walletDir)
|
||||
commonCmd.ExitOnErr(cmd, "unable to get alphabet wallets: %w", err)
|
||||
|
||||
committeeAcc, err := getWalletAccount(wallets[0], committeeAccountName)
|
||||
committeeAcc, err := morphUtil.GetWalletAccount(wallets[0], committeeAccountName)
|
||||
commonCmd.ExitOnErr(cmd, "can't find committee account: %w", err)
|
||||
|
||||
ac, err := newActor(c, committeeAcc)
|
||||
ac, err := morphUtil.NewActor(c, committeeAcc)
|
||||
commonCmd.ExitOnErr(cmd, "can't create actor: %w", err)
|
||||
|
||||
inv := &ac.Invoker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue