Files
openzeppelin-contracts/test/helpers/chainid.js
github-actions dbe796d542 Update docs
2023-09-19 19:19:10 +00:00

11 lines
226 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,
};