Testnet Faucet · Errors · 10@tokenops/sdk/testnet-faucet

Testnet Faucet errors you can catch by class.

Testnet-only faucet errors. No RBAC, no pause, no encryptor — failures cluster around chain support, deployment addresses, wallet/account preconditions, and the one supply cap on the confidential mint.

For the catch-ladder pattern + how SDK-level and generic-fallback errors fit alongside these, read Concepts › Typed errors + recovery.

ClassWhen thrownRecovery
FaucetSupplyExhaustedErroruseMintConfidential / mintConfidential would push the confidential token past its maxTotalSupply. Mapped from the contract's ERC7984TotalSupplyOverflow revert. Code: TOKENOPS_FAUCET_SUPPLY_EXHAUSTED.Read the cap and current supply before minting — compare useMaxTotalSupply against useInferredTotalSupply — and lower the requested amount to fit headroom. TTT (plain) mints are not subject to this cap. useMaxTotalSupply
UnsupportedChainErrorThe connected chainId is neither Sepolia (11155111) nor local Anvil (31337). The faucet ships no mainnet deployment, so assertTestnetFaucetChain rejects any other network before a call is dispatched.Gate the UI with isTestnetFaucetChainId and prompt a switch to a supported testnet. TESTNET_FAUCET_SUPPORTED_CHAIN_IDS lists the allowed ids.
DeploymentAddressUnavailableErrorNo CTTT deployment address is registered for the resolved chainId and none was passed via the client's address config (e.g. on a local Anvil chain). The TTT backing token is read from the CTTT wrapper, so there's no separate underlying address to supply.Pass an explicit address in new TestnetFaucetClient({ ... }), or use requireTestTokenAddress / requireConfidentialTestTokenAddress to resolve the canonical Sepolia deployment.
MissingWalletClientErrorA write call (mintUnderlying / mintConfidential, i.e. useMintUnderlying / useMintConfidential) ran on a client created without a walletClient.Construct the client with a walletClient, or rely on the React hooks which read the connected wagmi wallet automatically. useMintConfidential
MissingAccountErrorA write or balance read could not resolve an account: neither an account arg nor a default account on the walletClient was available.Pass account in the args, set a default account on the walletClient, or connect a wallet so the hooks can supply it. useMintUnderlying
InvalidArgumentErrorA mint amount or recipient failed validation before dispatch — e.g. a non-positive amount, a CTTT amount that overflows uint64, or a zero-address recipient.Validate amounts against the token's decimals (CTTT = 6, TTT = 18) and keep confidential amounts within uint64 before calling.
ReceiptEventNotFoundErrormintConfidential's receipt contained no parseable ConfidentialMint event from the configured address. The configured address may not point at the deployed CTTT.Inspect the tx by hash and confirm the configured address points at the deployed CTTT proxy before retrying.
ReceiptEventAmbiguousErrorThe CTTT mint receipt held more than one matching ConfidentialMint event, so the SDK could not pick the canonical one to report the handle.Usually indicates an unexpected token address or a forwarder in the path — verify the configured CTTT address.
TokenOpsContractErrorA mint cleared simulate but the on-chain tx reverted (receipt.status !== 'success'), or a contract failure was not mapped to a more specific class. The SDK preserves structured context when available.Inspect err.context and err.cause when present; this is the catch-all below the typed classes in the ladder.
WalletRejectedErrorThe connected wallet rejected the mint signature request (user cancelled in the wallet UI).Treat as a benign cancel — re-enable the mint button and let the user retry rather than surfacing it as a hard error.
Each class extends the SDK's base TokenOpsSdkError and carries the offending values under err.context — render specific messages instead of generic "transaction failed."Read the catch ladder