From e33df6da627e6a09058d06d07f722ee91335c26a Mon Sep 17 00:00:00 2001 From: Tinu280 Date: Thu, 13 Nov 2025 23:37:30 +0700 Subject: [PATCH] ethclient: format file and improve documentation comments --- ethclient/ethclient.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 7ac7d7e22c..9fe2efd54b 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -39,32 +39,32 @@ type Client struct { // Dial creates a new RPC client and connects to the given URL endpoint. func Dial(rawurl string) (*Client, error) { - return DialContext(context.Background(), rawurl) + return DialContext(context.Background(), rawurl) } // DialContext creates a new RPC client using the provided context // and connects it to the specified URL endpoint. func DialContext(ctx context.Context, rawurl string) (*Client, error) { - c, err := rpc.DialContext(ctx, rawurl) - if err != nil { - return nil, err - } - return NewClient(c), nil + c, err := rpc.DialContext(ctx, rawurl) + if err != nil { + return nil, err + } + return NewClient(c), nil } // NewClient creates a Client instance that wraps the provided RPC client. func NewClient(c *rpc.Client) *Client { - return &Client{c} + return &Client{c} } // Close terminates the underlying RPC connection. func (ec *Client) Close() { - ec.c.Close() + ec.c.Close() } // Client returns the underlying RPC client instance. func (ec *Client) Client() *rpc.Client { - return ec.c + return ec.c } // Blockchain Access