fhe-vesting/advanced/react
Interfaces
UsePredictManagerAddressArgs
Defined in: fhe-vesting/advanced/react/usePredictManagerAddress.ts:11
React hooks for @tokenops/sdk/fhe-vesting/advanced. The headline React
subpath stays lean; pre-mine address prediction lives here.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
token? | ... | ... | - | fhe-vesting/advanced/react/usePredictManagerAddress.ts:12 |
userSalt? | ... | ... | - | fhe-vesting/advanced/react/usePredictManagerAddress.ts:13 |
deployer? | ... | ... | - | fhe-vesting/advanced/react/usePredictManagerAddress.ts:14 |
blockNumber? | ... | ... | - | fhe-vesting/advanced/react/usePredictManagerAddress.ts:15 |
splitEnabled? | ... | ... | ... | - | fhe-vesting/advanced/react/usePredictManagerAddress.ts:16 |
pausableEnabled? | ... | ... | ... | - | fhe-vesting/advanced/react/usePredictManagerAddress.ts:17 |
address? | ... | ... | Override the on-chain factory address. Defaults to DEPLOYED_ADDRESSES. | fhe-vesting/advanced/react/usePredictManagerAddress.ts:19 |
chainId? | ... | ... | Override the chain id used for default address resolution. Defaults to usePublicClient().chain?.id. | fhe-vesting/advanced/react/usePredictManagerAddress.ts:21 |
publicClient? | ... | ... | Override the viem PublicClient — bypasses the wagmi context. | fhe-vesting/advanced/react/usePredictManagerAddress.ts:23 |
Functions
usePredictManagerAddress()
function usePredictManagerAddress(args?): UseQueryResult<..., ...>;
Defined in: fhe-vesting/advanced/react/usePredictManagerAddress.ts:50
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.
Parameters
| Parameter | Type |
|---|---|
args | UsePredictManagerAddressArgs |
Returns
UseQueryResult<..., ...>
Example
import { usePredictManagerAddress } from "@tokenops/sdk/fhe-vesting/advanced/react";
// Historical lookup
const { data: predictedAddress } = usePredictManagerAddress({
token, userSalt, deployer, blockNumber: 10_852_182n,
});