> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gains.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# ChainUtils

*Chain helpers internal library*

## ARBITRUM\_MAINNET

```solidity theme={null}
uint256 ARBITRUM_MAINNET
```

## ARBITRUM\_SEPOLIA

```solidity theme={null}
uint256 ARBITRUM_SEPOLIA
```

## POLYGON\_MAINNET

```solidity theme={null}
uint256 POLYGON_MAINNET
```

## TESTNET

```solidity theme={null}
uint256 TESTNET
```

## Overflow

```solidity theme={null}
error Overflow()
```

## getBlockNumber

```solidity theme={null}
function getBlockNumber() internal view returns (uint256)
```

*Returns the current block number (l2 block for arbitrum)*

## getUint48BlockNumber

```solidity theme={null}
function getUint48BlockNumber(uint256 blockNumber) internal pure returns (uint48)
```

*Returns blockNumber converted to uint48*

### Parameters

| Name        | Type    | Description             |
| ----------- | ------- | ----------------------- |
| blockNumber | uint256 | block number to convert |

## getWrappedNativeToken

```solidity theme={null}
function getWrappedNativeToken() internal view returns (address)
```

*Returns the wrapped native token address for the current chain*

## isWrappedNativeToken

```solidity theme={null}
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 |
