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 a16f12b commit b15eb66Copy full SHA for b15eb66
ethclient/ethclient.go
@@ -39,7 +39,11 @@ type Client struct {
39
40
// Dial connects a client to the given URL.
41
func Dial(rawurl string) (*Client, error) {
42
- c, err := rpc.Dial(rawurl)
+ return DialContext(context.Background(), rawurl)
43
+}
44
+
45
+func DialContext(ctx context.Context, rawurl string) (*Client, error) {
46
+ c, err := rpc.DialContext(ctx, rawurl)
47
if err != nil {
48
return nil, err
49
}
@@ -51,6 +55,10 @@ func NewClient(c *rpc.Client) *Client {
51
55
return &Client{c}
52
56
53
57
58
+func (ec *Client) Close() {
59
+ ec.c.Close()
60
61
54
62
// Blockchain Access
63
64
// BlockByHash returns the given full block.
0 commit comments