Skip to content

ContractAddress.fromCreate

Computes contract address via CREATE opcode.

Imports

Named
import { ContractAddress } from 'ox'

Examples

import { ContractAddress } from 'ox'
 
ContractAddress.fromCreate({
  from: '0x1a1e021a302c237453d3d45c7b82b19ceeb7e2e6',
  nonce: 0n,
})
'0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2'

Definition

function fromCreate(
  options: fromCreate.Options,
): Address.Address

Source: src/core/ContractAddress.ts

Parameters

options

  • Type: fromCreate.Options

Options for retrieving address.

options.from

  • Type: abitype_Address

The address the contract was deployed from.

options.nonce

  • Type: bigint

The nonce of the transaction which deployed the contract.

Return Type

Contract Address.

Address.Address