[API Reference](../README.md) > [UtilsInternal](../classes/UtilsInternal.md)

# Class: UtilsInternal

Utils not meant to be exported to the public

## Hierarchy

**UtilsInternal**

## Index

### Methods

* [computeMaxGasLimit](UtilsInternal.md#computeMaxGasLimit)
* [ensureArray](UtilsInternal.md#ensureArray)
* [getRandomNumber](UtilsInternal.md#getRandomNumber)
* [getWeb3Sync](UtilsInternal.md#getWeb3Sync)
* [isNullAddress](UtilsInternal.md#isNullAddress)
* [isNullHash](UtilsInternal.md#isNullHash)
* [lastBlock](UtilsInternal.md#lastBlock)
* [lastBlockDate](UtilsInternal.md#lastBlockDate)
* [lastBlockNumber](UtilsInternal.md#lastBlockNumber)
* [sleep](UtilsInternal.md#sleep)
* [stopWatchingAsync](UtilsInternal.md#stopWatchingAsync)

---

## Methods

<a id="computeMaxGasLimit"></a>

### `<Static>` computeMaxGasLimit

▸ **computeMaxGasLimit**(): `Promise`<`number`>

*Defined in [utilsInternal.ts:76](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L76)*

Returns promise of the maximum gasLimit that we dare to ever use, given the current state of the chain.

**Returns:** `Promise`<`number`>

___
<a id="ensureArray"></a>

### `<Static>` ensureArray

▸ **ensureArray**<`T`>(arr: * `Array`<`T`> &#124; `T`*): `Array`<`T`>

*Defined in [utilsInternal.ts:15](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L15)*

**Type parameters:**

#### T 
**Parameters:**

| Param | Type |
| ------ | ------ |
| arr |  `Array`<`T`> &#124; `T`|

**Returns:** `Array`<`T`>

___
<a id="getRandomNumber"></a>

### `<Static>` getRandomNumber

▸ **getRandomNumber**(): `number`

*Defined in [utilsInternal.ts:56](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L56)*

**Returns:** `number`

___
<a id="getWeb3Sync"></a>

### `<Static>` getWeb3Sync

▸ **getWeb3Sync**(): `Web3`

*Defined in [utilsInternal.ts:60](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L60)*

**Returns:** `Web3`

___
<a id="isNullAddress"></a>

### `<Static>` isNullAddress

▸ **isNullAddress**(address: *[Address](../#Address)*): `boolean`

*Defined in [utilsInternal.ts:64](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L64)*

**Parameters:**

| Param | Type |
| ------ | ------ |
| address | [Address](../#Address) |

**Returns:** `boolean`

___
<a id="isNullHash"></a>

### `<Static>` isNullHash

▸ **isNullHash**(hash: *[Hash](../#Hash)*): `boolean`

*Defined in [utilsInternal.ts:68](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L68)*

**Parameters:**

| Param | Type |
| ------ | ------ |
| hash | [Hash](../#Hash) |

**Returns:** `boolean`

___
<a id="lastBlock"></a>

### `<Static>` lastBlock

▸ **lastBlock**(): `Promise`<`BlockWithoutTransactionData`>

*Defined in [utilsInternal.ts:25](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L25)*

Returns the last mined block in the chain.

**Returns:** `Promise`<`BlockWithoutTransactionData`>

___
<a id="lastBlockDate"></a>

### `<Static>` lastBlockDate

▸ **lastBlockDate**(): `Promise`<`Date`>

*Defined in [utilsInternal.ts:33](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L33)*

Returns the date of the last mined block in the chain.

**Returns:** `Promise`<`Date`>

___
<a id="lastBlockNumber"></a>

### `<Static>` lastBlockNumber

▸ **lastBlockNumber**(): `Promise`<`number`>

*Defined in [utilsInternal.ts:43](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L43)*

Returns the last mined block in the chain.

**Returns:** `Promise`<`number`>

___
<a id="sleep"></a>

### `<Static>` sleep

▸ **sleep**(milliseconds: *`number`*): `Promise`<`any`>

*Defined in [utilsInternal.ts:11](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L11)*

**Parameters:**

| Param | Type |
| ------ | ------ |
| milliseconds | `number` |

**Returns:** `Promise`<`any`>

___
<a id="stopWatchingAsync"></a>

### `<Static>` stopWatchingAsync

▸ **stopWatchingAsync**(filter: *`FilterResult`*): `Promise`<`any`>

*Defined in [utilsInternal.ts:52](https://github.com/daostack/arc.js/blob/6f704389/lib/utilsInternal.ts#L52)*

For environments that don't allow synchronous functions

**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| filter | `FilterResult` |   |

**Returns:** `Promise`<`any`>

___

