Skip to content

Commit

Permalink
[ioctl] set default endpoint to iotex mainnet (#4050)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinxie committed Jan 29, 2024
1 parent e1daa59 commit 46b9e75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ioctl/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ func init() {
}
if ReadConfig.Nsv2height == 0 {
ReadConfig.Nsv2height = genesis.Default.FairbankBlockHeight
completeness = false
}
if ReadConfig.Endpoint == "" {
ReadConfig.Endpoint = _defaultEndpoint
ReadConfig.SecureConnect = true
completeness = false
}
if ReadConfig.AnalyserEndpoint == "" {
ReadConfig.AnalyserEndpoint = _defaultAnalyserEndpoint
Expand Down
1 change: 1 addition & 0 deletions ioctl/config/configsetget.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
_urlPattern = `[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)`
_localPattern = "localhost"
_endpointPattern = "(" + _ipPattern + "|(" + _domainPattern + ")" + "|(" + _localPattern + "))" + `(:\d{1,5})?`
_defaultEndpoint = "api.iotex.one:443"
_defaultAnalyserEndpoint = "https://iotex-analyser-api-mainnet.chainanalytics.org"
// _defaultWsEndpoint default w3bstream endpoint
_defaultWsEndpoint = "sprout-staging.w3bstream.com:9000"
Expand Down

0 comments on commit 46b9e75

Please sign in to comment.