ERC-4337 Error AA30: Paymaster Not Deployed UserOp Revert
ERC-4337 error AA30 "paymaster not deployed" indicates that the paymaster address specified in the UserOperation paymasterAndData field has no contract bytecode deployed on the target chain. When sponsoring gas fees, the EntryPoint must call validatePaymasterUserOp on this contract. If the address contains zero bytecode, EntryPoint immediately aborts validation. Verify that your gas sponsorship policy uses the correct chain-specific paymaster address and deploy the sponsoring contract before submitting transactions.
# Root Cause & Technical Architecture
In ERC-4337 v0.6 (`paymasterAndData`) or v0.7 (`paymaster` field), the first 20 bytes designate the contract responsible for sponsoring transaction gas fees. During validation, the EntryPoint verifies `paymaster.code.length > 0`. If no bytecode is found at that address on the current network, the contract executes `revert("AA30 paymaster not deployed")`. This typically occurs when multi-chain apps configure testnet paymaster addresses on mainnet.
# 4-Step Actionable Diagnostic Protocol
Step-by-Step ResolutionExtract Paymaster Address from UserOp
In v0.6, take the first 20 bytes (40 hex characters) of paymasterAndData. In v0.7, inspect the distinct paymaster address property.
Query RPC for Deployed Paymaster Bytecode
Execute eth_getCode on the extracted paymaster address. If the result is "0x", the contract does not exist on this specific network.
Verify Paymaster Provider Chain ID Configuration
Log into your gas sponsorship provider (Pimlico, Biconomy, Stackup) dashboard and verify that the API key matches the chain ID of your RPC endpoint.
Audit Smart Contract Factory Deployment Addresses
If running a custom paymaster, deploy the contract to identical addresses across chains using a deterministic CREATE2 deployer like Arachnid.
# Diagnostic Verification Code / Command
typescript// Verify Paymaster Bytecode Before Submitting UserOp
import { createPublicClient, http } from 'viem';
import { sepolia } from 'viem/chains';
const client = createPublicClient({ chain: sepolia, transport: http() });
async function checkPaymaster(paymasterAddress: `0x${string}`) {
const code = await client.getBytecode({ address: paymasterAddress });
if (!code || code === '0x') {
throw new Error(`Paymaster ${paymasterAddress} not deployed on chain ${sepolia.id}! AA30 Revert guaranteed.`);
}
return true;
} Launch ERC-4337 UserOp Decoder
Execute client-side cryptographic simulation and parameter checks safely in your browser via native WebCrypto without sending private keys or mnemonics over the wire.
Read Full Investigation & Recovery Workflow
Explore complete architectural diagrams, edge-case failure trees, and detailed post-mortem analysis in our verified deep guide.
# Related Diagnostic Codes in ERC-4337 & Safe
Related Hex StatusesERC-4337 Error AA10: Sender Already Constructed UserOp Fix
Fix ERC-4337 error AA10 sender already constructed. Resolve non-empty initCode sent for deployed smart accounts, bundler estimation, and counterfactuals.
ERC-4337 Error AA20: Account Not Deployed EntryPoint Revert
Fix ERC-4337 error AA20 account not deployed. Troubleshoot empty initCode for counterfactual smart accounts, factory calldata, and pre-deployment.
ERC-4337 Error AA24: Signature Error UserOp Validation Fix
Fix ERC-4337 error AA24 signature error. Resolve validateUserOp signature mismatch, userOpHash EIP-712 hashing errors, and signature aggregator faults.
# Frequently Asked Questions
FAQ SchemaWhy does my paymaster work on testnet but fail on mainnet with AA30?
Paymasters have different contract addresses on each network. You must configure the mainnet paymaster address provided by your sponsorship service.
Can an ERC-4337 paymaster be deployed counterfactually?
No. Unlike smart accounts which can deploy via initCode, paymasters must be deployed and funded on-chain before processing transactions.
What is the structure of paymasterAndData in ERC-4337 v0.6?
It begins with the 20-byte paymaster address, followed by optional extra data such as expiration timestamps and cryptographic sponsorship signatures.