2.0 RC docsYou are viewing the 2.0 release candidate docs, published on the next tag.View 1.x docs
Concept · Deployments
Where each product is deployed
Every table below is read from DEPLOYED_ADDRESSES in the installed build, so it cannot drift from what the SDK calls.
v2.0.0-rc.1 release candidate
The API is frozen and later candidates carry fixes only, except the receipt-free and Safe create surface of /fhe-airdrop, which is @beta. Published on the next dist-tag; latest stays on 1.6.0 until 2.0.0.
The SDK only calls pre-deployed contracts; there are no factory-deployment helpers. Each client resolves its address from the registry by chain id unless you pass address (or aclAddress for the FHEVM ACL).
chainsWithDeployment(product) lists chains where every contract of the product has an address, since a partial deployment is not usable. chainsWithKnownRegistryEntry also includes chains recorded as null (known, not yet deployed), for a deployment-pending state separate from an unsupported chain.
Prefer the accessors to indexing the object. The get* forms return undefined for both a missing chain and a null entry; the require* forms throw DeploymentAddressUnavailableError. All are on the root @tokenops/sdk.
import { chainsWithDeployment, getDeployedAddress, getFheAirdropFactoryAddress, requireFheDisperseSingletonAddress,} from "@tokenops/sdk";getFheAirdropFactoryAddress(1); // Address | undefinedgetDeployedAddress("fheVesting", "confidentialVestingFactory", 1); // undefined: null in the registryrequireFheDisperseSingletonAddress(11155111); // Address, or throwschainsWithDeployment("fheVesting"); // chains where every contract is set
Live from the installed build: getFheAirdropFactoryAddress(1) returns 0x3c6a7Ae9f03a7c2c30938bae94a75491027d470C; getFheAirdropFactoryAddress(11155111) returns 0x3c6a7Ae9f03a7c2c30938bae94a75491027d470C.
A client that cannot resolve an address throws DeploymentAddressUnavailableError, and context.reason says why. Every client and hook reports the reason the registry gives: registry-not-deployed for an explicit null (vesting on mainnet, for example) and registry-unknown-chain for a chain with no entry at all. context.overrideName names the config field that bypasses the registry, usually address.
import { DeploymentAddressUnavailableError } from "@tokenops/sdk";import { createConfidentialVestingFactoryClient } from "@tokenops/sdk/fhe-vesting";function networkNotice(err: unknown): string | undefined { if (!(err instanceof DeploymentAddressUnavailableError)) return undefined; switch (err.context.reason) { case "registry-not-deployed": return "Not deployed on this network yet."; case "registry-unknown-chain": return "Unsupported network."; case "chain-id-missing": return "Pass chainId: the public client has no chain."; }}try { createConfidentialVestingFactoryClient({ publicClient: mainnetClient, walletClient });} catch (err) { showNotice(networkNotice(err) ?? "Something went wrong.");}
Encrypted views filter receipt logs by the FHEVM ACL contract to find the granted handle. FHEVM_ACL_ADDRESS_BY_CHAIN (/fhe) is the single source for every product, with getFhevmAclAddress and requireFhevmAclAddress as accessors.
The airdrop system is deployed at the same addresses on mainnet and Sepolia. AIRDROP_CONTRACTS_COMMIT (/fhe-airdrop) names the contract commit the vendored ABIs resolve against; read it at runtime to confirm which generation an installed build speaks to.