Testnet Faucet · Flows

The four testnet faucet flows.

Testnet-only, for Sepolia + Anvil: mint plaintext TTT, mint backed CTTT, read both balances, inspect rate + supply.

  1. 1

    Mint TTT underlying

    TokenopsTestToken (TTT) is a plain 18-decimal ERC-20 with an open mint(to, amount). Anyone on Sepolia (11155111) or local Anvil (31337) can mint plaintext test tokens — no encryptor, no RBAC, no pause.

    1. useMintUnderlying().mutate({ amount, to? }) — submits mint(to, amount) on TTT; amount is a plaintext bigint in 18-decimal units
    2. MintUnderlyingResult returns { amount, hash, to } — the values you passed, after the receipt's success guard
    3. Read it back with useUnderlyingBalance({ account }) — a plaintext bigint
  2. 2

    Mint CTTT backed-confidential

    ConfidentialTokenopsTestToken (CTTT) is a 6-decimal ERC-7984 confidential wrapper (UUPS proxy) with an open backed faucet mint. The mint takes a public uint64 amount (no @zama-fhe encryptor): the faucet mints the underlying behind it 1:1, then issues the confidential balance.

    1. useMintConfidential().mutate({ amount, to? }) — submits mint(to, amount) on CTTT; amount is a plaintext bigint in 6-decimal units
    2. MintConfidentialResult returns { amount, handle, hash, to, underlyingMinted } — parsed from the ConfidentialMint event
    3. FaucetSupplyExhaustedError (TOKENOPS_FAUCET_SUPPLY_EXHAUSTED) maps from the ERC7984TotalSupplyOverflow revert if maxTotalSupply is reached
  3. 3

    Read public + encrypted balances

    TTT exposes a plaintext balance; CTTT exposes an encrypted euint64 handle (Hex). useConfidentialBalance returns the ciphertext handle as-is — there is no encryptor in this surface, so decryption is out of band. Pair the two to inspect both sides of a backed mint.

    1. useUnderlyingBalance({ account }) — TTT plaintext balance as a bigint
    2. useConfidentialBalance({ account }) — CTTT encrypted balance, returned as an euint64 handle (Hex)
    3. Headless equivalents: client.underlyingBalanceOf(account) and client.confidentialBalanceOf(account)
  4. 4

    Read faucet metadata, rate + supply

    Inspect the faucet's static and dynamic state with read-only calls: token metadata for both sides, the backing rate, and supply headroom against the CTTT cap. getMetadata bundles confidential + underlying FaucetTokenMetadata with maxTotalSupply and rate.

    1. useFaucetMetadata() — FaucetMetadata { confidential, underlying, maxTotalSupply, rate }
    2. useFaucetRate() / useMaxTotalSupply() / useInferredTotalSupply() — the rate and supply headroom as bigints
    3. useUnderlyingTokenAddress() — the TTT address backing CTTT; addresses also via getTestTokenAddress / getConfidentialTestTokenAddress