1
0
forked from mico/idle_moloch
idle_moloch/lib/v3-periphery/contracts/libraries/ChainId.sol
2024-11-01 11:55:27 +01:00

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()
}
}
}