forked from cerc-io/plugeth
internal/web3ext: improve eth_getBlockByNumber and eth_getBlockByHash console api (#21608)
This commit is contained in:
parent
eebfb13053
commit
a04294d160
@ -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…
Reference in New Issue
Block a user