ChainUtils
Chain helpers internal library
ARBITRUM_MAINNET
uint256 ARBITRUM_MAINNETARBITRUM_SEPOLIA
uint256 ARBITRUM_SEPOLIAPOLYGON_MAINNET
uint256 POLYGON_MAINNETTESTNET
uint256 TESTNETOverflow
error Overflow()getBlockNumber
function getBlockNumber() internal view returns (uint256)Returns the current block number (l2 block for arbitrum)
getUint48BlockNumber
function getUint48BlockNumber(uint256 blockNumber) internal pure returns (uint48)Returns blockNumber converted to uint48
Parameters
Name
Type
Description
blockNumber
uint256
block number to convert
getWrappedNativeToken
function getWrappedNativeToken() internal view returns (address)Returns the wrapped native token address for the current chain
isWrappedNativeToken
function isWrappedNativeToken(address _token) internal view returns (bool)Returns whether a token is the wrapped native token for the current chain
Parameters
Name
Type
Description
_token
address
token address to check
Was this helpful?