# Value.fromEther

Parses a string representation of Ether to a `bigint` Value (default: wei).

## Imports

:::code-group
```ts [Named]
import { Value } from 'ox'
```

```ts [Entrypoint]
import * as Value from 'ox/Value'
```
:::

## Examples

```ts twoslash
import { Value } from 'ox'

Value.fromEther('420')
// @log: 420000000000000000000n
```

## Definition

```ts
function fromEther(
  ether: string,
  unit?: 'wei' | 'gwei' | 'szabo' | 'finney',
): bigint
```

**Source:** [src/core/Value.ts](https://github.com/wevm/ox/blob/main/src/core/Value.ts#L279)

## Parameters

### ether

* **Type:** `string`

String representation of Ether.

### unit

* **Type:** `'wei' | 'gwei' | 'szabo' | 'finney'`
* **Optional**

The unit to parse to.

## Return Type

A `bigint` Value.

`bigint`
