Files
openzeppelin-contracts/test/helpers/chainid.js
github-actions 6ae39c4dc1 Update docs
2023-05-09 19:56:30 +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,
};