Gelato
  • Introduction
    • Gelato, The Web3 Cloud Platform
  • Rollup As A Service
    • Introduction
    • Rollup Stacks
      • Arbitrum Orbit
        • Run a Full Orbit Node
      • OP Stack
        • Run OP Node
    • Deploy your Rollup
    • Customization
      • Data Availability
        • Celestia
        • Avail
        • Eigen DA
      • Custom Gas Token
      • Marketplace
        • Gelato Services
        • Data Indexers
        • Block Explorers
        • Oracles
        • Bridges
        • Account Abstraction
        • On & Off-ramp
        • Community
        • Identity & KYC
        • Others
      • Verifier Node Package
    • Public Testnet
  • RPC Nodes
    • Introduction
    • Compute Units
    • Using RPC Nodes
    • Supported Networks
    • Pricing and Plans
    • FAQ
  • Web3 Services
    • Web3 Functions
      • Understanding Web3 Functions
        • Trigger Types
        • Typescript Function
        • Solidity Function
        • Automated Transactions
      • Security Considerations
      • Template & Use Cases
      • Quick Start
        • Writing Typescript Functions
          • Event Trigger
          • Private Typescript Functions
          • Callbacks
        • Test, Deploy & Run Typescript functions
        • Writing Solidity Functions
        • Test, Deploy & Run Solidity Functions
        • Initiate an Automated Transaction
      • Create a Web3 Function Task
        • Using the UI
        • Using the Safe App
        • Using a Smart Contract
        • Using the Automate SDK
      • Analytics & Monitoring
      • Supported Networks
      • Subscription & Payments
      • Legacy Automate Migration Guide
    • Relay
      • What is Relaying?
      • Security Considerations
        • ERC-2771 Delegatecall Vulnerability
      • Templates
      • Quick Start
        • Sponsored Calls
        • Non-Sponsored Calls
      • ERC-2771 (recommended)
        • SponsoredCallERC2771
        • CallWithSyncFeeERC2771
          • Relay Context Contracts ERC2771
      • Non-ERC-2771
        • SponsoredCall
        • CallWithSyncFee
          • Relay Context Contracts
      • Relay API
      • Gelato's Fee Oracle
      • Tracking your Relay Request
      • Supported Networks
      • Subscriptions and Payments
        • 1Balance & Relay
        • SyncFee Payment Tokens
        • Relay Pricing
      • ERC2771 Migration Guide
    • VRF
      • Understanding VRF
      • How does Gelato VRF Work?
      • Security Considerations
      • Template
      • Quick Start
      • Create a VRF Task
        • Create a Fallback VRF
        • Migrating from Chainlink VRF
      • Supported Networks
      • Pricing & Rate Limits
    • Oracles
      • Understanding Gelato Oracles
      • Quick Start
      • Data Providers
        • Stork
        • Choas Labs
      • Migrating from Chainlink Oracles
      • Available Price Feeds
      • Supported Networks
      • Pricing & Rate Limits
    • Account Abstraction
      • Understanding ERC4337
      • Introduction to Gelato Bundler
      • Templates & Examples
      • Quick Start
      • Sponsored UserOps
        • Using 1Balance
        • Using Zerodev Paymaster
      • Non-Sponsored UserOps
        • Pay with Native
        • Pay with ERC20
      • Supported Networks
      • Bundler API Endpoints
        • eth_sendUserOperation
        • eth_estimateUserOperationGas
        • eth_getUserOperationByHash
        • eth_getUserOperationReceipt
        • eth_supportedEntryPoints
        • eth_maxPriorityFeePerGas
        • eth_chainId
    • 1Balance
      • 1Balance Alerts
      • Subscription Plans
      • Subscription Notifications
      • USDC Addresses
    • AI Agents
    • Teams
  • GELATO DAO
    • DAO & Token (GEL)
    • GEL Token Contracts
    • Governance Process
  • Social Media
Powered by GitBook
On this page
  • Getting Started
  • 1. Using Bundler API Endpoints
  • Example Code
  • 2. Using Zerodev SDK
  • Example Code
  • Option 1. Sponsoring all of your users' gas
  • Option 2. Your users pay for for their own gas
  1. Web3 Services
  2. Account Abstraction

Quick Start

PreviousTemplates & ExamplesNextSponsored UserOps

Last updated 1 month ago

After reading this page:

  • You'll go through a decision process to understand the best way to integrate with ERC4337 methods with Gelato Bundler using Bundler API Endpoints and Zerodev SDK.

  • You'll know exactly which SDK/API method is for you.

Depending on your final destination, please click the corresponding link to find about your chosen SDK method:

Getting Started

1. Using Bundler API Endpoints

Users can directly interact with our bundler via API endpoints—enabling actions like sending UserOperations, estimating gas, and more. Learn more about how to use the bundler endpoints .

Example Code

1. Clone the repository

git clone https://github.com/gelatodigital/erc4337-counter-example.git
cd erc4337-counter-example

2. Install dependencies and navigate to the appropriate directory.

yarn install
cd src/gelato

3. Copy environment variables

cp .env.sample .env

or

2. Using Zerodev SDK

Users can also interact with our bundler through the Zerodev SDK, enabling them to pay gas fees using ERC-20 tokens or native tokens, in addition to leveraging the bundler's sponsorship features.

Example Code

1. Clone the repository

git clone https://github.com/gelatodigital/how-tos-19-master-gelato-erc4337.git
cd how-tos-19-master-gelato-erc4337

2. Install dependencies

npm install

3. Copy environment variables

cp .env.example .env

Option 1. Sponsoring all of your users' gas

  • Gas Fee Coverage A third-party sponsor (or paymaster) covers the gas fees, allowing users to transact without holding any native tokens.

  • Frictionless Experience Users benefit from a seamless on-chain interaction, since they don’t directly manage or pay for transaction fees.

Option 2. Your users pay for for their own gas

  • User-Paid Fees Users themselves cover the gas costs—either with the network’s native token (no paymaster needed) or through an ERC20 paymaster (when paying in ERC20 tokens).

  • Greater Control Since users handle their own fees, they maintain direct control over cost management and transactions.

Sponsor UserOps Using 1Balance
Sponsor UserOps Using Zerodev Paymaster
Pay Gas for UserOps Using Native Tokens
Pay Gas for UserOps Using ERC20 Tokens
here