github.com/iotexproject/iotex-core@v1.14.1-rc1/ioctl/cmd/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, merchantability 3 // or fitness for purpose and, to the extent permitted by law, all liability for your use of the code is disclaimed. 4 // This source code is governed by Apache License 2.0 that can be found in the LICENSE file. 5 6 package contract 7 8 import ( 9 "github.com/spf13/cobra" 10 11 "github.com/iotexproject/iotex-core/ioctl/cmd/action" 12 "github.com/iotexproject/iotex-core/ioctl/config" 13 ) 14 15 // Multi-language support 16 var ( 17 _deployCmdShorts = map[config.Language]string{ 18 config.English: "Deploy smart contract of IoTeX blockchain", 19 config.Chinese: "在IoTeX区块链部署智能合约", 20 } 21 ) 22 23 // _contractDeployCmd represents the contract deploy command 24 var _contractDeployCmd = &cobra.Command{ 25 Use: "deploy", 26 Short: config.TranslateInLang(_deployCmdShorts, config.UILanguage), 27 } 28 29 func init() { 30 _contractDeployCmd.AddCommand(_contractDeployBytecodeCmd) 31 _contractDeployCmd.AddCommand(_contractDeployBinCmd) 32 _contractDeployCmd.AddCommand(_contractDeploySolCmd) 33 action.RegisterWriteCommand(_contractDeployBytecodeCmd) 34 action.RegisterWriteCommand(_contractDeployBinCmd) 35 action.RegisterWriteCommand(_contractDeploySolCmd) 36 }