UNPKG
@uniswap/v4-core
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
🦄 Core smart contracts of Uniswap v4
github.com/Uniswap/v4-core
Uniswap/v4-core
@uniswap/v4-core
/
lib
/
openzeppelin-contracts
/
test
/
helpers
/
chainid.js
11 lines
(8 loc)
•
226 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
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, };