set default native staking address for ioctl
@@ -22,6 +22,9 @@ import (
"github.com/iotexproject/iotex-core/pkg/log"
)
+// NativeStakingAddress stores native staking address as string
+const NativeStakingAddress = "io1xpq62aw85uqzrccg9y5hnryv8ld2nkpycc3gza"
+
var autoRestake bool
var stakingContractAddress string
var stakeABI abi.ABI
@@ -37,9 +40,8 @@ func init() {
StakeCmd.AddCommand(stakeRestakeCmd)
StakeCmd.AddCommand(stakeStoreCmd)
- //TODO: initialize stakingContractAddress by setting default value for `--staking-contract-address` flag
StakeCmd.PersistentFlags().StringVarP(&stakingContractAddress, "staking-contract-address", "c",
- "", "set staking contract address")
+ NativeStakingAddress, "set staking contract address")
StakeCmd.PersistentFlags().StringVar(&config.ReadConfig.Endpoint, "endpoint",
config.ReadConfig.Endpoint, "set endpoint for once")
StakeCmd.PersistentFlags().BoolVar(&config.Insecure, "insecure", config.Insecure,
