> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# ContractAddress.fromCreate2

:::info
`ContractAddress.fromCreate2` is a re-export of ox's [`ContractAddress.fromCreate2`](https://oxlib.sh/api/ContractAddress/fromCreate2). Refer to the ox documentation for the full reference.
:::

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

## Imports

```ts
import { ContractAddress } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { ContractAddress, Hex } from 'viem/utils'

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

## Definition

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

## 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`
