735546619e
Signed-off-by: T-Hax <>
14 lines
357 B
Solidity
14 lines
357 B
Solidity
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
pragma solidity >=0.7.0;
|
|
|
|
/// @title Function for getting the current chain ID
|
|
library ChainId {
|
|
/// @dev Gets the current chain ID
|
|
/// @return chainId The current chain ID
|
|
function get() internal pure returns (uint256 chainId) {
|
|
assembly {
|
|
chainId := chainid()
|
|
}
|
|
}
|
|
}
|