forked from TrueCloudLab/frostfs-node
[#932] adm: Move const
to package constants
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
814c411f4a
commit
e2cee4cf09
29 changed files with 140 additions and 114 deletions
|
@ -1,57 +0,0 @@
|
|||
package util
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
ConsensusAccountName = "consensus"
|
||||
ProtoConfigPath = "protocol"
|
||||
|
||||
// MaxAlphabetNodes is the maximum number of candidates allowed, which is currently limited by the size
|
||||
// of the invocation script.
|
||||
// See: https://github.com/nspcc-dev/neo-go/blob/740488f7f35e367eaa99a71c0a609c315fe2b0fc/pkg/core/transaction/witness.go#L10
|
||||
MaxAlphabetNodes = 22
|
||||
|
||||
SingleAccountName = "single"
|
||||
CommitteeAccountName = "committee"
|
||||
|
||||
NNSContract = "nns"
|
||||
FrostfsContract = "frostfs" // not deployed in side-chain.
|
||||
ProcessingContract = "processing" // not deployed in side-chain.
|
||||
AlphabetContract = "alphabet"
|
||||
BalanceContract = "balance"
|
||||
ContainerContract = "container"
|
||||
FrostfsIDContract = "frostfsid"
|
||||
NetmapContract = "netmap"
|
||||
PolicyContract = "policy"
|
||||
ProxyContract = "proxy"
|
||||
|
||||
ContractWalletFilename = "contract.json"
|
||||
ContractWalletPasswordKey = "contract"
|
||||
|
||||
FrostfsOpsEmail = "ops@frostfs.info"
|
||||
|
||||
DefaultExpirationTime = 10 * 365 * 24 * time.Hour / time.Second
|
||||
|
||||
DeployMethodName = "deploy"
|
||||
UpdateMethodName = "update"
|
||||
|
||||
TestContractPassword = "grouppass"
|
||||
)
|
||||
|
||||
var (
|
||||
ContractList = []string{
|
||||
BalanceContract,
|
||||
ContainerContract,
|
||||
FrostfsIDContract,
|
||||
NetmapContract,
|
||||
PolicyContract,
|
||||
ProxyContract,
|
||||
}
|
||||
|
||||
FullContractList = append([]string{
|
||||
FrostfsContract,
|
||||
ProcessingContract,
|
||||
NNSContract,
|
||||
AlphabetContract,
|
||||
}, ContractList...)
|
||||
)
|
|
@ -3,6 +3,7 @@ package util
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpcclient/invoker"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpcclient/management"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpcclient/unwrap"
|
||||
|
@ -18,7 +19,7 @@ func getFrostfsIDAdminFromContract(roInvoker *invoker.Invoker) (util.Uint160, bo
|
|||
if err != nil {
|
||||
return util.Uint160{}, false, fmt.Errorf("get nns contract: %w", err)
|
||||
}
|
||||
fidHash, err := NNSResolveHash(roInvoker, cs.Hash, DomainOf(FrostfsIDContract))
|
||||
fidHash, err := NNSResolveHash(roInvoker, cs.Hash, DomainOf(constants.FrostfsIDContract))
|
||||
if err != nil {
|
||||
return util.Uint160{}, false, fmt.Errorf("resolve frostfsid contract hash: %w", err)
|
||||
}
|
||||
|
@ -45,19 +46,19 @@ func GetContractDeployData(c *InitializeContext, ctrName string, keysParam []any
|
|||
items := make([]any, 0, 6)
|
||||
|
||||
switch ctrName {
|
||||
case FrostfsContract:
|
||||
case constants.FrostfsContract:
|
||||
items = append(items,
|
||||
c.Contracts[ProcessingContract].Hash,
|
||||
c.Contracts[constants.ProcessingContract].Hash,
|
||||
keysParam,
|
||||
smartcontract.Parameter{})
|
||||
case ProcessingContract:
|
||||
items = append(items, c.Contracts[FrostfsContract].Hash)
|
||||
case constants.ProcessingContract:
|
||||
items = append(items, c.Contracts[constants.FrostfsContract].Hash)
|
||||
return items[1:], nil // no notary info
|
||||
case BalanceContract:
|
||||
case constants.BalanceContract:
|
||||
items = append(items,
|
||||
c.Contracts[NetmapContract].Hash,
|
||||
c.Contracts[ContainerContract].Hash)
|
||||
case ContainerContract:
|
||||
c.Contracts[constants.NetmapContract].Hash,
|
||||
c.Contracts[constants.ContainerContract].Hash)
|
||||
case constants.ContainerContract:
|
||||
// In case if NNS is updated multiple times, we can't calculate
|
||||
// it's actual hash based on local data, thus query chain.
|
||||
r := management.NewReader(c.ReadOnlyInvoker)
|
||||
|
@ -66,21 +67,21 @@ func GetContractDeployData(c *InitializeContext, ctrName string, keysParam []any
|
|||
return nil, fmt.Errorf("get nns contract: %w", err)
|
||||
}
|
||||
items = append(items,
|
||||
c.Contracts[NetmapContract].Hash,
|
||||
c.Contracts[BalanceContract].Hash,
|
||||
c.Contracts[FrostfsIDContract].Hash,
|
||||
c.Contracts[constants.NetmapContract].Hash,
|
||||
c.Contracts[constants.BalanceContract].Hash,
|
||||
c.Contracts[constants.FrostfsIDContract].Hash,
|
||||
nnsCs.Hash,
|
||||
"container")
|
||||
case FrostfsIDContract:
|
||||
case constants.FrostfsIDContract:
|
||||
var (
|
||||
h util.Uint160
|
||||
found bool
|
||||
err error
|
||||
)
|
||||
if method == UpdateMethodName {
|
||||
if method == constants.UpdateMethodName {
|
||||
h, found, err = getFrostfsIDAdminFromContract(c.ReadOnlyInvoker)
|
||||
}
|
||||
if method != UpdateMethodName || err == nil && !found {
|
||||
if method != constants.UpdateMethodName || err == nil && !found {
|
||||
h, found, err = GetFrostfsIDAdmin(viper.GetViper())
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -90,11 +91,11 @@ func GetContractDeployData(c *InitializeContext, ctrName string, keysParam []any
|
|||
if found {
|
||||
items = append(items, h)
|
||||
} else {
|
||||
items = append(items, c.Contracts[ProxyContract].Hash)
|
||||
items = append(items, c.Contracts[constants.ProxyContract].Hash)
|
||||
}
|
||||
case NetmapContract:
|
||||
case constants.NetmapContract:
|
||||
md := GetDefaultNetmapContractConfigMap()
|
||||
if method == UpdateMethodName {
|
||||
if method == constants.UpdateMethodName {
|
||||
if err := MergeNetmapConfig(c.ReadOnlyInvoker, md); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -106,14 +107,14 @@ func GetContractDeployData(c *InitializeContext, ctrName string, keysParam []any
|
|||
}
|
||||
|
||||
items = append(items,
|
||||
c.Contracts[BalanceContract].Hash,
|
||||
c.Contracts[ContainerContract].Hash,
|
||||
c.Contracts[constants.BalanceContract].Hash,
|
||||
c.Contracts[constants.ContainerContract].Hash,
|
||||
keysParam,
|
||||
configParam)
|
||||
case ProxyContract:
|
||||
case constants.ProxyContract:
|
||||
items = nil
|
||||
case PolicyContract:
|
||||
items = append(items, c.Contracts[ProxyContract].Hash)
|
||||
case constants.PolicyContract:
|
||||
items = append(items, c.Contracts[constants.ProxyContract].Hash)
|
||||
default:
|
||||
panic(fmt.Sprintf("invalid contract name: %s", ctrName))
|
||||
}
|
||||
|
@ -125,7 +126,7 @@ func GetContractDeployParameters(cs *ContractState, deployData []any) []any {
|
|||
}
|
||||
|
||||
func DeployNNS(c *InitializeContext, method string) error {
|
||||
cs := c.GetContract(NNSContract)
|
||||
cs := c.GetContract(constants.NNSContract)
|
||||
h := cs.Hash
|
||||
|
||||
nnsCs, err := c.NNSContractState()
|
||||
|
@ -134,7 +135,7 @@ func DeployNNS(c *InitializeContext, method string) error {
|
|||
}
|
||||
if nnsCs != nil {
|
||||
if nnsCs.NEF.Checksum == cs.NEF.Checksum {
|
||||
if method == DeployMethodName {
|
||||
if method == constants.DeployMethodName {
|
||||
c.Command.Println("NNS contract is already deployed.")
|
||||
} else {
|
||||
c.Command.Println("NNS contract is already updated.")
|
||||
|
@ -152,16 +153,16 @@ func DeployNNS(c *InitializeContext, method string) error {
|
|||
params := GetContractDeployParameters(cs, nil)
|
||||
|
||||
invokeHash := management.Hash
|
||||
if method == UpdateMethodName {
|
||||
if method == constants.UpdateMethodName {
|
||||
invokeHash = nnsCs.Hash
|
||||
}
|
||||
|
||||
tx, err := c.CommitteeAct.MakeCall(invokeHash, method, params...)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create deploy tx for %s: %w", NNSContract, err)
|
||||
return fmt.Errorf("failed to create deploy tx for %s: %w", constants.NNSContract, err)
|
||||
}
|
||||
|
||||
if err := c.MultiSignAndSend(tx, CommitteeAccountName); err != nil {
|
||||
if err := c.MultiSignAndSend(tx, constants.CommitteeAccountName); err != nil {
|
||||
return fmt.Errorf("can't send deploy transaction: %w", err)
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,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"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/native/nativenames"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
|
||||
|
@ -23,7 +24,7 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var ErrTooManyAlphabetNodes = fmt.Errorf("too many alphabet nodes (maximum allowed is %d)", MaxAlphabetNodes)
|
||||
var ErrTooManyAlphabetNodes = fmt.Errorf("too many alphabet nodes (maximum allowed is %d)", constants.MaxAlphabetNodes)
|
||||
|
||||
func AwaitTx(cmd *cobra.Command, c Client, txs []HashVUBPair) error {
|
||||
cmd.Println("Waiting for transactions to persist...")
|
||||
|
|
|
@ -11,6 +11,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/config"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
||||
|
@ -99,12 +100,12 @@ func NewInitializeContext(cmd *cobra.Command, v *viper.Viper) (*InitializeContex
|
|||
return nil, err
|
||||
}
|
||||
|
||||
committeeAcc, err := GetWalletAccount(wallets[0], CommitteeAccountName)
|
||||
committeeAcc, err := GetWalletAccount(wallets[0], constants.CommitteeAccountName)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("can't find committee account: %w", err)
|
||||
}
|
||||
|
||||
consensusAcc, err := GetWalletAccount(wallets[0], ConsensusAccountName)
|
||||
consensusAcc, err := GetWalletAccount(wallets[0], constants.ConsensusAccountName)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("can't find consensus account: %w", err)
|
||||
}
|
||||
|
@ -151,7 +152,7 @@ func NewInitializeContext(cmd *cobra.Command, v *viper.Viper) (*InitializeContex
|
|||
}
|
||||
|
||||
if needContracts {
|
||||
err := readContracts(initCtx, FullContractList)
|
||||
err := readContracts(initCtx, constants.FullContractList)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -207,7 +208,7 @@ func getContractsPath(cmd *cobra.Command, needContracts bool) (string, error) {
|
|||
func createWalletAccounts(wallets []*wallet.Wallet) ([]*wallet.Account, error) {
|
||||
accounts := make([]*wallet.Account, len(wallets))
|
||||
for i, w := range wallets {
|
||||
acc, err := GetWalletAccount(w, SingleAccountName)
|
||||
acc, err := GetWalletAccount(w, constants.SingleAccountName)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("wallet %s is invalid (no single account): %w", w.Path(), err)
|
||||
}
|
||||
|
@ -263,7 +264,7 @@ func readContracts(c *InitializeContext, names []string) error {
|
|||
}
|
||||
|
||||
for _, ctrName := range names {
|
||||
if ctrName != AlphabetContract {
|
||||
if ctrName != constants.AlphabetContract {
|
||||
cs := c.Contracts[ctrName]
|
||||
cs.Hash = state.CreateContractHash(c.CommitteeAcc.Contract.ScriptHash(),
|
||||
cs.NEF.Checksum, cs.Manifest.Name)
|
||||
|
@ -382,11 +383,11 @@ func (c *InitializeContext) sendMultiTx(script []byte, tryGroup bool, withConsen
|
|||
return fmt.Errorf("could not perform test invocation: %w", err)
|
||||
}
|
||||
|
||||
if err := c.MultiSign(tx, CommitteeAccountName); err != nil {
|
||||
if err := c.MultiSign(tx, constants.CommitteeAccountName); err != nil {
|
||||
return err
|
||||
}
|
||||
if withConsensus {
|
||||
if err := c.MultiSign(tx, ConsensusAccountName); err != nil {
|
||||
if err := c.MultiSign(tx, constants.ConsensusAccountName); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
@ -414,7 +415,7 @@ func (c *InitializeContext) MultiSign(tx *transaction.Transaction, accType strin
|
|||
// Use parameter context to avoid dealing with signature order.
|
||||
pc := context.NewParameterContext("", network, tx)
|
||||
h := c.CommitteeAcc.Contract.ScriptHash()
|
||||
if accType == ConsensusAccountName {
|
||||
if accType == constants.ConsensusAccountName {
|
||||
h = c.ConsensusAcc.Contract.ScriptHash()
|
||||
}
|
||||
for _, w := range c.Wallets {
|
||||
|
@ -477,7 +478,7 @@ func (c *InitializeContext) EmitUpdateNNSGroupScript(bw *io.BufBinWriter, nnsHas
|
|||
if isAvail {
|
||||
emit.AppCall(bw.BinWriter, nnsHash, "register", callflag.All,
|
||||
client.NNSGroupKeyName, c.CommitteeAcc.Contract.ScriptHash(),
|
||||
FrostfsOpsEmail, int64(3600), int64(600), int64(DefaultExpirationTime), int64(3600))
|
||||
constants.FrostfsOpsEmail, int64(3600), int64(600), int64(constants.DefaultExpirationTime), int64(3600))
|
||||
emit.Opcodes(bw.BinWriter, opcode.ASSERT)
|
||||
}
|
||||
|
||||
|
@ -498,7 +499,7 @@ func (c *InitializeContext) NNSRegisterDomainScript(nnsHash, expectedHash util.U
|
|||
bw := io.NewBufBinWriter()
|
||||
emit.AppCall(bw.BinWriter, nnsHash, "register", callflag.All,
|
||||
domain, c.CommitteeAcc.Contract.ScriptHash(),
|
||||
FrostfsOpsEmail, int64(3600), int64(600), int64(DefaultExpirationTime), int64(3600))
|
||||
constants.FrostfsOpsEmail, int64(3600), int64(600), int64(constants.DefaultExpirationTime), int64(3600))
|
||||
emit.Opcodes(bw.BinWriter, opcode.ASSERT)
|
||||
|
||||
if bw.Err != nil {
|
||||
|
@ -535,8 +536,8 @@ func (c *InitializeContext) GetContract(ctrName string) *ContractState {
|
|||
|
||||
func (c *InitializeContext) GetAlphabetDeployItems(i, n int) []any {
|
||||
items := make([]any, 5)
|
||||
items[0] = c.Contracts[NetmapContract].Hash
|
||||
items[1] = c.Contracts[ProxyContract].Hash
|
||||
items[0] = c.Contracts[constants.NetmapContract].Hash
|
||||
items[1] = c.Contracts[constants.ProxyContract].Hash
|
||||
items[2] = innerring.GlagoliticLetter(i).String()
|
||||
items[3] = int64(i)
|
||||
items[4] = int64(n)
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
"sort"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||
"github.com/google/uuid"
|
||||
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core"
|
||||
|
@ -47,7 +48,7 @@ type LocalClient struct {
|
|||
}
|
||||
|
||||
func NewLocalClient(cmd *cobra.Command, v *viper.Viper, wallets []*wallet.Wallet, dumpPath string) (*LocalClient, error) {
|
||||
cfg, err := config.LoadFile(v.GetString(ProtoConfigPath))
|
||||
cfg, err := config.LoadFile(v.GetString(constants.ProtoConfigPath))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -60,7 +61,7 @@ func NewLocalClient(cmd *cobra.Command, v *viper.Viper, wallets []*wallet.Wallet
|
|||
m := smartcontract.GetDefaultHonestNodeCount(int(cfg.ProtocolConfiguration.ValidatorsCount))
|
||||
accounts := make([]*wallet.Account, len(wallets))
|
||||
for i := range accounts {
|
||||
accounts[i], err = GetWalletAccount(wallets[i], ConsensusAccountName)
|
||||
accounts[i], err = GetWalletAccount(wallets[i], constants.ConsensusAccountName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"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/pkg/morph/client/netmap"
|
||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpcclient/invoker"
|
||||
|
@ -88,7 +89,7 @@ func GetNetConfigFromNetmapContract(roInvoker *invoker.Invoker) ([]stackitem.Ite
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("get nns contract: %w", err)
|
||||
}
|
||||
nmHash, err := NNSResolveHash(roInvoker, cs.Hash, DomainOf(NetmapContract))
|
||||
nmHash, err := NNSResolveHash(roInvoker, cs.Hash, DomainOf(constants.NetmapContract))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("can't get netmap contract hash: %w", err)
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/config"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
|
@ -27,7 +28,7 @@ func GetAlphabetWallets(v *viper.Viper, walletDir string) ([]*wallet.Wallet, err
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if len(wallets) > MaxAlphabetNodes {
|
||||
if len(wallets) > constants.MaxAlphabetNodes {
|
||||
return nil, ErrTooManyAlphabetNodes
|
||||
}
|
||||
return wallets, nil
|
||||
|
@ -161,7 +162,7 @@ func readContractsFromArchive(file io.Reader, names []string) (map[string]*Contr
|
|||
}
|
||||
|
||||
func GetAlphabetNNSDomain(i int) string {
|
||||
return AlphabetContract + strconv.FormatUint(uint64(i), 10) + ".frostfs"
|
||||
return constants.AlphabetContract + strconv.FormatUint(uint64(i), 10) + ".frostfs"
|
||||
}
|
||||
|
||||
func ParseGASAmount(s string) (fixedn.Fixed8, error) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"path/filepath"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/config"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -13,12 +14,12 @@ import (
|
|||
)
|
||||
|
||||
func InitializeContractWallet(v *viper.Viper, walletDir string) (*wallet.Wallet, error) {
|
||||
password, err := config.GetPassword(v, ContractWalletPasswordKey)
|
||||
password, err := config.GetPassword(v, constants.ContractWalletPasswordKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
w, err := wallet.NewWallet(filepath.Join(walletDir, ContractWalletFilename))
|
||||
w, err := wallet.NewWallet(filepath.Join(walletDir, constants.ContractWalletFilename))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -42,7 +43,7 @@ func InitializeContractWallet(v *viper.Viper, walletDir string) (*wallet.Wallet,
|
|||
}
|
||||
|
||||
func openContractWallet(v *viper.Viper, cmd *cobra.Command, walletDir string) (*wallet.Wallet, error) {
|
||||
p := filepath.Join(walletDir, ContractWalletFilename)
|
||||
p := filepath.Join(walletDir, constants.ContractWalletFilename)
|
||||
w, err := wallet.NewWalletFromFile(p)
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
|
@ -53,7 +54,7 @@ func openContractWallet(v *viper.Viper, cmd *cobra.Command, walletDir string) (*
|
|||
return InitializeContractWallet(v, walletDir)
|
||||
}
|
||||
|
||||
password, err := config.GetPassword(v, ContractWalletPasswordKey)
|
||||
password, err := config.GetPassword(v, constants.ContractWalletPasswordKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue