This document covers deploying the MozaikPay smart contracts to Base Sepolia (testnet) and Base mainnet.
- Foundry installed (
forge,cast) - A deployer wallet with ETH on the target chain (for gas)
- A sponsor wallet (hot wallet) whose private key signs paymaster approvals
- An RPC endpoint for the target chain. The Makefile defaults to the public Base endpoints (
https://sepolia.base.org,https://mainnet.base.org); setBASE_SEPOLIA_RPC/BASE_MAINNET_RPCto use your own (recommended for mainnet)
| Parameter | Base Sepolia (testnet) | Base Mainnet |
|---|---|---|
| Chain ID | 84532 |
8453 |
| RPC (Infura) | https://base-sepolia.infura.io/v3/<API_KEY> |
https://base-mainnet.infura.io/v3/<API_KEY> |
| EntryPoint v0.9 | 0x433709009B8330FDa32311DF1C2AFA402eD8D009 |
0x433709009B8330FDa32311DF1C2AFA402eD8D009 |
| USDC | 0x036CbD53842c5426634e7929541eC2318f3dCF7e |
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Block explorer | https://sepolia.basescan.org |
https://basescan.org |
The EntryPoint v0.9 is already deployed at the canonical address on both chains via deterministic CREATE2. You do not need to deploy it.
Four contracts are deployed per environment on Base, plus one on Ethereum L1:
- MozaikAccountFactory -- CREATE2 factory for deploying ERC-4337 smart accounts. The canonical EntryPoint v0.9 is hardcoded (not a constructor argument), matching the account, so deployment and runtime authority cannot diverge.
- MozaikVerifyingPaymaster -- Sponsors gas for UserOperations. Constructor takes the sponsor wallet address; the canonical EntryPoint v0.9 is hardcoded.
- MozaikAccount (implementation) -- Deployed automatically by the factory constructor. Not called directly.
- MozaikPaylinks -- Non-upgradeable USDC escrow for payment links. Deployed by
01_Deploy.s.solalongside the account/paymaster stack, bound to the chain's USDC. Constructor takes the USDC token address; immutable thereafter. Lifecycle:create(sender locks USDC under an ephemeralclaimSigner),claim(recipient redeems with an EIP-712 signature over the claim payload),reclaim(sender returns funds; sender-only pre-expiry, permissionless at or after expiry). - MozaikL1Resolver (Ethereum,
src/ens/) -- ENS resolver formozaikpay.eth. Subnames resolve through a CCIP-read gateway; the resolver only checks the gateway's signature. Vendored from Basenames.