# ContractAddress.fromCreate2

Computes contract address via [CREATE2](https://eips.ethereum.org/EIPS/eip-1014) opcode.

## Imports

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

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

## Examples

```ts twoslash
import { ContractAddress, Hex } from 'ox'

ContractAddress.fromCreate2({
  from: '0x1a1e021a302c237453d3d45c7b82b19ceeb7e2e6',
  bytecode:
    '0x6394198df16000526103ff60206004601c335afa6040516060f3',
  salt: Hex.fromString('hello world')
})
// @log: '0x59fbB593ABe27Cb193b6ee5C5DC7bbde312290aB'
```

## Definition

```ts
function fromCreate2(
  options: fromCreate2.Options,
): Address.Address
```

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

## Parameters

### options

* **Type:** `fromCreate2.Options`

Options for retrieving address.

#### options.bytecode

* **Type:** `0x${string} | Uint8Array`

#### options.bytecodeHash

* **Type:** `0x${string} | Uint8Array`

#### options.from

* **Type:** `abitype_Address`

#### options.salt

* **Type:** `0x${string} | Uint8Array`

## Return Type

Contract Address.

`Address.Address`
