Files
openzeppelin-contracts/test/helpers/chainid.js
Hadrien Croubois c1d9da4052 Use hardhat-exposed to reduce the need for mocks (#3666)
Co-authored-by: Francisco <fg@frang.io>
2023-01-03 14:38:13 +00:00

11 lines
227 B
JavaScript

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,
};