forked from TrueCloudLab/frostfs-node
[#932] adm: Rename util
to helper
To avoid conflicts with `util` packages in other imports. Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
e2cee4cf09
commit
802192cfef
34 changed files with 144 additions and 144 deletions
|
@ -4,13 +4,13 @@ import (
|
|||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||
morphUtil "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/helper"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpcclient/actor"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpcclient/management"
|
||||
)
|
||||
|
||||
func deployContracts(c *morphUtil.InitializeContext) error {
|
||||
func deployContracts(c *helper.InitializeContext) error {
|
||||
alphaCs := c.GetContract(constants.AlphabetContract)
|
||||
|
||||
var keysParam []any
|
||||
|
@ -26,13 +26,13 @@ func deployContracts(c *morphUtil.InitializeContext) error {
|
|||
}
|
||||
|
||||
alphaCs.Manifest.Groups = baseGroups
|
||||
err := morphUtil.AddManifestGroup(c.ContractWallet, ctrHash, alphaCs)
|
||||
err := helper.AddManifestGroup(c.ContractWallet, ctrHash, alphaCs)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't sign manifest group: %v", err)
|
||||
}
|
||||
|
||||
keysParam = append(keysParam, acc.PrivateKey().PublicKey().Bytes())
|
||||
params := morphUtil.GetContractDeployParameters(alphaCs, c.GetAlphabetDeployItems(i, len(c.Wallets)))
|
||||
params := helper.GetContractDeployParameters(alphaCs, c.GetAlphabetDeployItems(i, len(c.Wallets)))
|
||||
|
||||
act, err := actor.NewSimple(c.Client, acc)
|
||||
if err != nil {
|
||||
|
@ -44,7 +44,7 @@ func deployContracts(c *morphUtil.InitializeContext) error {
|
|||
return fmt.Errorf("can't deploy alphabet #%d contract: %w", i, err)
|
||||
}
|
||||
|
||||
c.SentTxs = append(c.SentTxs, morphUtil.HashVUBPair{Hash: txHash, Vub: vub})
|
||||
c.SentTxs = append(c.SentTxs, helper.HashVUBPair{Hash: txHash, Vub: vub})
|
||||
}
|
||||
|
||||
for _, ctrName := range constants.ContractList {
|
||||
|
@ -56,16 +56,16 @@ func deployContracts(c *morphUtil.InitializeContext) error {
|
|||
continue
|
||||
}
|
||||
|
||||
err := morphUtil.AddManifestGroup(c.ContractWallet, ctrHash, cs)
|
||||
err := helper.AddManifestGroup(c.ContractWallet, ctrHash, cs)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't sign manifest group: %v", err)
|
||||
}
|
||||
|
||||
args, err := morphUtil.GetContractDeployData(c, ctrName, keysParam, constants.DeployMethodName)
|
||||
args, err := helper.GetContractDeployData(c, ctrName, keysParam, constants.DeployMethodName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: getting deploy params: %v", ctrName, err)
|
||||
}
|
||||
params := morphUtil.GetContractDeployParameters(cs, args)
|
||||
params := helper.GetContractDeployParameters(cs, args)
|
||||
res, err := c.CommitteeAct.MakeCall(management.Hash, constants.DeployMethodName, params...)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't deploy %s contract: %w", ctrName, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue