forked from TrueCloudLab/frostfs-node
[#932] adm: Move deploy
to package contract
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
76343f19e5
commit
b8cf0a6b88
2 changed files with 6 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
package morph
|
package contract
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
@ -26,7 +26,7 @@ const (
|
||||||
updateFlag = "update"
|
updateFlag = "update"
|
||||||
)
|
)
|
||||||
|
|
||||||
var deployCmd = &cobra.Command{
|
var DeployCmd = &cobra.Command{
|
||||||
Use: "deploy",
|
Use: "deploy",
|
||||||
Short: "Deploy additional smart-contracts",
|
Short: "Deploy additional smart-contracts",
|
||||||
Long: `Deploy additional smart-contract which are not related to core.
|
Long: `Deploy additional smart-contract which are not related to core.
|
||||||
|
@ -44,14 +44,14 @@ NNS name is taken by stripping '_contract.nef' from the NEF file (similar to fro
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
ff := deployCmd.Flags()
|
ff := DeployCmd.Flags()
|
||||||
|
|
||||||
ff.String(util.AlphabetWalletsFlag, "", util.AlphabetWalletsFlagDesc)
|
ff.String(util.AlphabetWalletsFlag, "", util.AlphabetWalletsFlagDesc)
|
||||||
_ = deployCmd.MarkFlagFilename(util.AlphabetWalletsFlag)
|
_ = DeployCmd.MarkFlagFilename(util.AlphabetWalletsFlag)
|
||||||
|
|
||||||
ff.StringP(util.EndpointFlag, "r", "", util.EndpointFlagDesc)
|
ff.StringP(util.EndpointFlag, "r", "", util.EndpointFlagDesc)
|
||||||
ff.String(contractPathFlag, "", "Path to the contract directory")
|
ff.String(contractPathFlag, "", "Path to the contract directory")
|
||||||
_ = deployCmd.MarkFlagFilename(contractPathFlag)
|
_ = DeployCmd.MarkFlagFilename(contractPathFlag)
|
||||||
|
|
||||||
ff.Bool(updateFlag, false, "Update an existing contract")
|
ff.Bool(updateFlag, false, "Update an existing contract")
|
||||||
ff.String(util.CustomZoneFlag, "frostfs", "Custom zone for NNS")
|
ff.String(util.CustomZoneFlag, "frostfs", "Custom zone for NNS")
|
|
@ -103,7 +103,7 @@ var (
|
||||||
func init() {
|
func init() {
|
||||||
initGenerateAlphabetCmd()
|
initGenerateAlphabetCmd()
|
||||||
initInitCmd()
|
initInitCmd()
|
||||||
initDeployCmd()
|
RootCmd.AddCommand(contract.DeployCmd)
|
||||||
initGenerateStorageCmd()
|
initGenerateStorageCmd()
|
||||||
RootCmd.AddCommand(netmap.ForceNewEpoch)
|
RootCmd.AddCommand(netmap.ForceNewEpoch)
|
||||||
RootCmd.AddCommand(node.RemoveCmd)
|
RootCmd.AddCommand(node.RemoveCmd)
|
||||||
|
@ -169,7 +169,3 @@ func initGenerateAlphabetCmd() {
|
||||||
generateAlphabetCmd.Flags().String(util.AlphabetWalletsFlag, "", util.AlphabetWalletsFlagDesc)
|
generateAlphabetCmd.Flags().String(util.AlphabetWalletsFlag, "", util.AlphabetWalletsFlagDesc)
|
||||||
generateAlphabetCmd.Flags().Uint(alphabetSizeFlag, 7, "Amount of alphabet wallets to generate")
|
generateAlphabetCmd.Flags().Uint(alphabetSizeFlag, 7, "Amount of alphabet wallets to generate")
|
||||||
}
|
}
|
||||||
|
|
||||||
func initDeployCmd() {
|
|
||||||
RootCmd.AddCommand(deployCmd)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue