Skip to main content
Version: 0.3.0

Faucet

The faucet is a testnet-only static Vercel app that mints 100 each of zkUSD, zkEUR, zkGBP, and zkPLN on Base Sepolia to a user-supplied EVM address. It exists for onboarding and demos, not for the main deployment.

User flow

The app serves a single static page:

  1. The user enters an EVM address or fills it from an injected wallet such as MetaMask.
  2. The page submits { address } to POST /api/mint.
  3. The API immediately returns { success: true, userOpHash } after the bundler accepts the UserOperation.

There is no receipt polling, CAPTCHA, password, rate limit, queue, or user wallet signature. The connected wallet is only an address source.

Mint route

The API route builds one sponsored ERC-4337 UserOperation:

FieldValue
ChainBase Sepolia (84532)
SenderSharedAccount
TargetEBHub
CallpublicMint(address ebemt,address to,uint256 amount)
Amount100_000000 base units per token (100, 6 decimals)
Paymaster floweb_requestGasAndPaymasterData through createEbBundlerClient

The route must not fall back to a direct EOA transaction. The server key is only the paymaster partner key used to sign partner context; it is not an EBEMT minter key.

Deployment configuration

Required Vercel environment variables:

VariablePurpose
BASE_SEPOLIA_RPC_URLBase Sepolia RPC for nonce and chain reads
PAYMASTER_PARTNER_IDPartner id registered in the Paymaster Backend
PAYMASTER_PARTNER_PRIVATE_KEYPartner signing key for paymaster context
ENTRYPOINT_ADDRESSOptional override; defaults come from the SDK path

Bundler URL, Paymaster URL, SharedAccount address, Hub address, and zk token addresses come from the Base Sepolia deployment manifest in @cardinal-cryptography/core.

On-chain setup:

  1. Deploy the EBHub and the test EBEMT token contracts (Hub is shared across all tokens).
  2. Ensure the SharedAccount is deployed on Base Sepolia.
  3. Call Hub.setMinter(SHARED_ACCOUNT_ADDRESS, true) once — a single enrollment on Hub authorizes the SharedAccount to mint on every EBEMT in the deployment.
  4. Configure the Paymaster Backend to allow the Hub address and selector 0x36fac067. If the same backend sponsors direct token operations, also allow the four faucet token addresses.
  5. Fund and stake the paymaster for EntryPoint.

Do not grant faucet minting rights or the publicMint selector in the main deployment.