Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ioctl] set default endpoint to iotex mainnet #4050

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading