[#932] adm: Rename util
to helper
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 1m57s
DCO action / DCO (pull_request) Successful in 3m3s
Build / Build Components (1.21) (pull_request) Successful in 5m0s
Build / Build Components (1.20) (pull_request) Successful in 5m6s
Tests and linters / Tests (1.20) (pull_request) Successful in 7m1s
Tests and linters / Staticcheck (pull_request) Successful in 6m55s
Tests and linters / Lint (pull_request) Successful in 7m30s
Tests and linters / Tests (1.21) (pull_request) Successful in 7m53s
Tests and linters / Tests with -race (pull_request) Successful in 8m21s
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 1m57s
DCO action / DCO (pull_request) Successful in 3m3s
Build / Build Components (1.21) (pull_request) Successful in 5m0s
Build / Build Components (1.20) (pull_request) Successful in 5m6s
Tests and linters / Tests (1.20) (pull_request) Successful in 7m1s
Tests and linters / Staticcheck (pull_request) Successful in 6m55s
Tests and linters / Lint (pull_request) Successful in 7m30s
Tests and linters / Tests (1.21) (pull_request) Successful in 7m53s
Tests and linters / Tests with -race (pull_request) Successful in 8m21s
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
|
@ -9,7 +9,7 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-contract/nns"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/commonflags"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||
"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/cli/cmdargs"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
|
||||
|
@ -61,7 +61,7 @@ func init() {
|
|||
|
||||
func deployContractCmd(cmd *cobra.Command, args []string) error {
|
||||
v := viper.GetViper()
|
||||
c, err := util.NewInitializeContext(cmd, v)
|
||||
c, err := helper.NewInitializeContext(cmd, v)
|
||||
if err != nil {
|
||||
return fmt.Errorf("initialization error: %w", err)
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ func deployContractCmd(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
cs, err := util.ReadContract(ctrPath, ctrName)
|
||||
cs, err := helper.ReadContract(ctrPath, ctrName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ func deployContractCmd(cmd *cobra.Command, args []string) error {
|
|||
domain := ctrName + "." + zone
|
||||
isUpdate, _ := cmd.Flags().GetBool(updateFlag)
|
||||
if isUpdate {
|
||||
cs.Hash, err = util.NNSResolveHash(c.ReadOnlyInvoker, nnsCs.Hash, domain)
|
||||
cs.Hash, err = helper.NNSResolveHash(c.ReadOnlyInvoker, nnsCs.Hash, domain)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't fetch contract hash from NNS: %w", err)
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ func deployContractCmd(cmd *cobra.Command, args []string) error {
|
|||
return c.AwaitTx()
|
||||
}
|
||||
|
||||
func registerNNS(nnsCs *state.Contract, c *util.InitializeContext, zone string, domain string, cs *util.ContractState, writer *io.BufBinWriter) error {
|
||||
func registerNNS(nnsCs *state.Contract, c *helper.InitializeContext, zone string, domain string, cs *helper.ContractState, writer *io.BufBinWriter) error {
|
||||
bw := io.NewBufBinWriter()
|
||||
emit.Instruction(bw.BinWriter, opcode.INITSSLOT, []byte{1})
|
||||
emit.AppCall(bw.BinWriter, nnsCs.Hash, "getPrice", callflag.All)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue