IntrospectionuseQuery Curated

usePredictManagerAddress

CREATE2 the manager clone address before deploying — pre-flight UI flows.

Import
@tokenops/sdk/fhe-vesting/advanced/react
Return
{ data, isLoading, error, refetch }
Lifecycle
Introspection

Description

Compute the deterministic CREATE2 clone address as the factory would have computed it at blockNumber.

Advanced surface — block-dependent. The factory packs the deployment block number into the clone's immutable args, which feed into keccak256(initCode). Predict at block N and mine at N+1 and you get different addresses. This hook is only useful for: - Historical lookups (verifying a clone deployed at a known past block). - Tightly-coupled same-tx flows (rare).

For the common "deploy a clone and learn its address" flow, prefer `useCreateManagerAndGetAddress` on the headline React subpath — it parses the address out of the ManagerCreated event in the tx receipt without any block-number guessing.

Signature

@tokenops/sdk/fhe-vesting/advanced/react
ts
function usePredictManagerAddress(args?: UsePredictManagerAddressArgs): UseQueryResult<Address, Error>;

Parameters

Shape of the options object passed to the hook itself.

PropertyTypeDescription
tokenAddress
userSaltHex
deployerAddress
blockNumberbigint
splitEnabledboolean
pausableEnabledboolean
addressAddress | undefinedOverride the on-chain factory address. Defaults to {
chainIdnumber | undefinedOverride the chain id used for default address resolution. Defaults to usePublicClient().chain?.id.
publicClientPublicClient | undefinedOverride the viem PublicClient — bypasses the wagmi context.
Want to run a similar shape interactively? The Playground ships 8 ready presets across vesting / airdrop / disperse — deploy a manager, create a vesting, claim, and the airdrop / disperse equivalents. The deep-link above auto-selects the closest preset to usePredictManagerAddress; pick another from the dropdown if you'd rather start there.

Example

@tokenops/sdk/fhe-vesting/advanced/react · @example
tsx
import { usePredictManagerAddress } from "@tokenops/sdk/fhe-vesting/advanced/react";

// Historical lookup
const { data: predictedAddress } = usePredictManagerAddress({
  token, userSalt, deployer, blockNumber: 10_852_182n,
});

Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.

See also