LayerZeroFault
ERC-4337 & Safe CODE: AA30 Reviewed & Verified:

ERC-4337 Error AA30: Paymaster Not Deployed UserOp Revert

Verified by Victor Vance • Lead Technical Analyst & Systems Researcher
Quick Diagnostic Answer (Executive Summary) GSC Snippet Verified

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 Resolution
01

Extract 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.

02

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.

03

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.

04

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-deployment.ts
// 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;
}
Zero-Secrets Client Sandbox

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.

Open Sandbox →
Comprehensive In-Depth Guide

Read Full Investigation & Recovery Workflow

Explore complete architectural diagrams, edge-case failure trees, and detailed post-mortem analysis in our verified deep guide.

Read Guide →

# Related Diagnostic Codes in ERC-4337 & Safe

Related Hex Statuses

# Frequently Asked Questions

FAQ Schema

Why 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.