SDK 2.1: platform toolkit + vesting engine
v2.1.0 stable
SDK 2.1 is the stable release on the latest dist-tag. Install it with pnpm add @tokenops/sdk. The receipt-free and Safe create surface of /fhe-airdrop remains @beta.
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 the factory would deploy, at the latest state or at blockNumber. Runs once token, userSalt and deployer are set; blockNumber is optional.

Advanced surface. The registered factories pack a constant 0 into the clone's block-number slot, so the prediction does not depend on the block. It does depend on the deployer's fee settings, packed into the clone args too, which can change before a deploy mines. A legacy factory (an address override) that packs the deployment block is block-dependent; pass blockNumber there, or to reproduce a past prediction.

For the "deploy a clone and learn its address" flow, prefer useCreateManagerAndGetAddress on the headline React subpath: it reads the address from the executed transaction's ManagerCreated event.

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
blockNumberbigintBlock to predict at. Omit it to predict at the latest state.
splitEnabledboolean
pausableEnabledboolean
publicClientPublicClient | undefinedOverride the viem PublicClient, bypassing the wagmi context. The one hook that takes it: a lookup at a past blockNumber may target an archive node the wagmi config does not carry.
Want to run a similar shape interactively? The Playground ships 12 ready presets across vesting / airdrop / disperse / faucet — deploy a manager, create a vesting, claim, and run the product 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";

const { data: predictedAddress } = usePredictManagerAddress({ token, userSalt, deployer });

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

See also