Skip to content
Closed
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
7 changes: 7 additions & 0 deletions ethclient/ethclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,13 @@ func (ec *Client) PendingBalanceAt(ctx context.Context, account common.Address)
return (*big.Int)(&result), err
}

// BlockNumber returns the number of most recent block.
func (ec *Client) BlockNumber(ctx context.Context) (*big.Int, error) {
var result hexutil.Big
err := ec.c.CallContext(ctx, &result, "eth_blockNumber")
return (*big.Int)(&result), err
}

// PendingStorageAt returns the value of key in the contract storage of the given account in the pending state.
func (ec *Client) PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error) {
var result hexutil.Bytes
Expand Down