internal/web3ext: improve eth_getBlockByNumber and eth_getBlockByHash console api (#21608)

release/1.9
mr_franklin 4 years ago committed by GitHub
parent eebfb13053
commit a04294d160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      internal/web3ext/web3ext.go

@ -532,12 +532,14 @@ web3._extend({
new web3._extend.Method({ new web3._extend.Method({
name: 'getBlockByNumber', name: 'getBlockByNumber',
call: 'eth_getBlockByNumber', call: 'eth_getBlockByNumber',
params: 2 params: 2,
inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter, function (val) { return !!val; }]
}), }),
new web3._extend.Method({ new web3._extend.Method({
name: 'getBlockByHash', name: 'getBlockByHash',
call: 'eth_getBlockByHash', call: 'eth_getBlockByHash',
params: 2 params: 2,
inputFormatter: [null, function (val) { return !!val; }]
}), }),
new web3._extend.Method({ new web3._extend.Method({
name: 'getRawTransaction', name: 'getRawTransaction',

Loading…
Cancel
Save