ContractAddress.fromCreate2
Computes contract address via CREATE2 opcode.
Imports
Named
import { ContractAddress } from 'ox'
Examples
import { ContractAddress, Hex } from 'ox'
ContractAddress.fromCreate2({
from: '0x1a1e021a302c237453d3d45c7b82b19ceeb7e2e6',
bytecode: '0x6394198df16000526103ff60206004601c335afa6040516060f3',
salt: Hex.fromString('hello world'),
})
'0x59fbB593ABe27Cb193b6ee5C5DC7bbde312290aB'
Definition
function fromCreate2(
options: fromCreate2.Options,
): Address.Address
Source: src/core/ContractAddress.ts
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