Add RawClient method

This commit is contained in:
Chris Pacia 2017-05-23 01:20:41 -04:00
parent 2a41e76b39
commit b0c6a76bee

View file

@ -36,6 +36,11 @@ func NewEthereumClient(rawurl string) (client *EthereumClient, _ error) {
return &EthereumClient{rawClient}, err
}
// Get the raw ethclient.Client
func (ec *EthereumClient) RawClient() *ethclient.Client {
return ec.client
}
// GetBlockByHash returns the given full block.
func (ec *EthereumClient) GetBlockByHash(ctx *Context, hash *Hash) (block *Block, _ error) {
rawBlock, err := ec.client.BlockByHash(ctx.context, hash.hash)