Use hardhat-exposed to reduce the need for mocks (#3666)
Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
10
test/helpers/chainid.js
Normal file
10
test/helpers/chainid.js
Normal file
@ -0,0 +1,10 @@
|
||||
const hre = require('hardhat');
|
||||
|
||||
async function getChainId () {
|
||||
const chainIdHex = await hre.network.provider.send('eth_chainId', []);
|
||||
return new hre.web3.utils.BN(chainIdHex, 'hex');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getChainId,
|
||||
};
|
||||
Reference in New Issue
Block a user