# AccountConfig.fromUpgrade

Derives the configuration an existing account installs when it migrates in place with the `upgradeAccount` precompile call ([TIP-1113](https://tips.sh/1113)).

The account keeps its address. Its salt is `keccak256("tempo:configurable-account:upgrade" || account)` and its version is `1n`. Owners are sorted into canonical order and the config is validated. The account itself may be listed as an owner.

## Imports

:::code-group
```ts [Named]
import { AccountConfig } from 'ox/tempo'
```

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

## Examples

```ts twoslash
import { AccountConfig } from 'ox/tempo'

const config = AccountConfig.fromUpgrade(
  '0x3333333333333333333333333333333333333333',
  {
    owners: [
      {
        owner: '0x1111111111111111111111111111111111111111',
        weight: 1
      }
    ],
    threshold: 1
  }
)
// config.version === 1n
```

## Definition

```ts
function fromUpgrade<numberType>(
  account: Address.Address,
  options: fromUpgrade.Options<numberType>,
): Config<1n, numberType>
```

**Source:** [src/tempo/AccountConfig.ts](https://github.com/wevm/ox/blob/main/src/tempo/AccountConfig.ts#L391)

## Parameters

### account

* **Type:** `Address.Address`

The account migrating in place.

### options

* **Type:** `fromUpgrade.Options<numberType>`

The owners and threshold to install.

#### options.owners

* **Type:** `readonly Owner[]`

Weighted owners to install. Sorted into canonical order.

#### options.threshold

* **Type:** `numberType`

Minimum total owner weight required for authorization.

## Return Type

The installed account config.

`Config<1n, numberType>`
