We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c8032c commit 58eeb0aCopy full SHA for 58eeb0a
client.go
@@ -15,6 +15,7 @@ import (
15
"net/http"
16
"net/http/httputil"
17
"net/url"
18
+ "time"
19
)
20
21
// Client etherscan API client
@@ -41,7 +42,9 @@ type Client struct {
41
42
// please use pre-defined network value
43
func New(network Network, APIKey string) *Client {
44
return &Client{
- coon: &http.Client{},
45
+ coon: &http.Client{
46
+ Timeout: 30 * time.Second,
47
+ },
48
network: network,
49
key: APIKey,
50
baseURL: fmt.Sprintf(`https://%s.etherscan.io/api?`, network.SubDomain()),
0 commit comments