github.com/iotexproject/iotex-core@v1.14.1-rc1/ioctl/newcmd/contract/contractdeploy.go (about) 1 // Copyright (c) 2022 IoTeX Foundation 2 // This source code is provided 'as is' and no warranties are given as to title or non-infringement, 3 // merchantability or fitness for purpose and, to the extent permitted by law, 4 // all liability for your use of the code is disclaimed. This source code is governed by Apache 5 // License 2.0 that can be found in the LICENSE file. 6 7 package contract 8 9 import ( 10 "github.com/spf13/cobra" 11 12 "github.com/iotexproject/iotex-core/ioctl" 13 "github.com/iotexproject/iotex-core/ioctl/config" 14 ) 15 16 // Multi-language support 17 var ( 18 _deployCmdShorts = map[config.Language]string{ 19 config.English: "Deploy smart contract of IoTeX blockchain", 20 config.Chinese: "在IoTeX区块链部署智能合约", 21 } 22 ) 23 24 // NewContractDeployCmd represents the contract deploy command 25 func NewContractDeployCmd(client ioctl.Client) *cobra.Command { 26 short, _ := client.SelectTranslation(_deployCmdShorts) 27 cmd := &cobra.Command{ 28 Use: "deploy", 29 Short: short, 30 } 31 32 // TODO add sub commands 33 // cmd.AddCommand(NewcontractDeployBytecodeCmd) 34 // cmd.AddCommand(NewContractDeployBinCmd) 35 // cmd.AddCommand(NewContractDeploySolCmd) 36 // action.RegisterWriteCommand(NewContractDeployBytecodeCmd) 37 // action.RegisterWriteCommand(NewContractDeployBinCmd) 38 // action.RegisterWriteCommand(NewContractDeploySolCmd) 39 return cmd 40 }