12 lines
286 B
JavaScript
12 lines
286 B
JavaScript
|
const { toBN } = require('web3').utils
|
||
|
|
||
|
const getBlockNumberCall = web3 => web3.eth.getBlockNumber()
|
||
|
|
||
|
async function getBlockNumber(web3Home, web3Foreign) {
|
||
|
return (await Promise.all([web3Home, web3Foreign].map(getBlockNumberCall))).map(toBN)
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
getBlockNumber
|
||
|
}
|