good morning!!!!

Skip to content
Snippets Groups Projects
Commit 8efd908e authored by Arpit Temani's avatar Arpit Temani
Browse files

add removed code

parent 01c96714
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,14 @@ func (ec *Client) ChainID(ctx context.Context) (*big.Int, error) {
return (*big.Int)(&result), err
}
// BlockByHash returns the given full block.
//
// Note that loading full blocks requires two requests. Use HeaderByHash
// if you don't need all transactions or uncle headers.
func (ec *Client) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error) {
return ec.getBlock(ctx, "eth_getBlockByHash", hash, true)
}
func (ec *Client) TransactionReceiptsInBlockByBlockNumber(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) ([]*types.Receipt, error) {
var rs []*types.Receipt
err := ec.c.CallContext(ctx, &rs, "eth_getTransactionReceiptsByBlock", blockNrOrHash)
......
......@@ -496,11 +496,8 @@ web3._extend({
methods: [
new web3._extend.Method({
name: 'getTransactionReceiptsByBlock',
call: function(args) {
return (web3._extend.utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getTransactionReceiptsByBlockHash' : 'eth_getTransactionReceiptsByBlockNumber';
},
params: 1,
inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter]
call: 'eth_getTransactionReceiptsByBlock',
params: 1
}),
new web3._extend.Method({
name: 'chainId',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment