# ERC-4337 paymaster starter

> Gasless UX · ERC-4337 paymaster contract + bundler integration template. Compatible with Arbitrum, Base, Optimism, Polygon. MIT.

Gasless UX · ERC-4337 paymaster contract + bundler integration template. Compatible with Arbitrum, Base, Optimism, Polygon. MIT.

Complete paymaster template for ERC-4337 · ERC-20-paid gas, whitelist, spending limits, rate-limits. With Biconomy / Alchemy bundler integration examples.

## What the file contains

- Paymaster contract (Solidity 0.8.26)
- ERC-20 gas payment with token whitelist
- User spending limit + rate limit enforcement
- Biconomy + Alchemy bundler integration
- Foundry invariant test suite

## What to take away

- Paymaster contract (Solidity 0.8.26)
- ERC-20 gas payment with token whitelist
- User spending limit + rate limit enforcement
- Biconomy + Alchemy bundler integration
- Foundry invariant test suite

## Tags

template, Solidity + Markdown, erc-4337, paymaster, account-abstraction, solidity

## Read the full write-up

/resources/erc-4337-paymaster-starter.md

## Terms used in this piece

- https://dfieldsolutions.com/en/glossary/paymaster.md
- https://dfieldsolutions.com/en/glossary/erc-4337.md
- https://dfieldsolutions.com/en/glossary/erc-20.md
- https://dfieldsolutions.com/en/glossary/solidity.md
- https://dfieldsolutions.com/en/glossary/token.md
- https://dfieldsolutions.com/en/glossary/foundry.md

## We build this for clients

https://dfieldsolutions.com/en/services/blockchain

## More from the lab

- https://dfieldsolutions.com/en/lab/smart-contract-invariant-starter-foundry.md — Foundry invariant starter · for smart contracts
- https://dfieldsolutions.com/en/lab/smart-contract-threat-model-template.md — Smart contract threat model template
- https://dfieldsolutions.com/en/lab/solana-rpc-costs.md — What Solana RPC actually costs once the prototype works
- https://dfieldsolutions.com/en/lab/solana-anchor-footguns.md — Solana foot-guns Anchor does not remove

---

Source: https://dfieldsolutions.com/en/lab/erc-4337-paymaster-starter
DField Solutions — Torony köz 5-1.a, 2120 Dunakeszi, Hungary — +36 20 722 0002 — dezso@dfieldsolutions.com
Booking: see https://dfieldsolutions.com/en/contact
