AA (ERC-4337)

ERC-4337 Meta Transactions Integration Guide

Introduction

This guide explains how to integrate your protocol's ERC-4337 (Account Abstraction) meta transactions with our tracking system. By following this guide, you'll ensure that your protocol's transactions are correctly parsed and decoded across all supported blockchain networks. After the successful integration, the new configuration will be applied for all future transactions and your dapp should have an increase in UAW and Transactions count metrics. If you wish to recalculate historical data for activity calculated prior to the integration date, you should reach out to our support team.

What is ERC-4337?

ERC-4337 is a standard for account abstraction that enables smart contract wallets to operate without changes to the blockchain's consensus layer. It introduces several key components:

  • EntryPoint contract: A singleton contract that validates and executes transactions

  • Smart Contract Wallets: User accounts implemented as smart contracts

  • Bundlers: Network actors that bundle multiple user operations into a single transaction

Integration Requirements

Prerequisites

Before beginning the integration process, ensure you have:

  • Deployed or identified the EntryPoint contract on your target chain

  • Implemented Smart Contract Wallet following ERC-4337 specification

  • Access to chain RPC endpoints for testing

  • Node.js development environment

  • Access to GitHub and our open source repository at https://github.com/dappradar/erc4337-configurations

Additionally please make sure that the configuration is not already added by our team or other contributors to avoid committing duplicate configurations.

Configuration Structure

Your ERC-4337 configuration must include the following components:

  1. entrypoint_address

    1. The deployed address of your EntryPoint contract

    2. Example: "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789"

  2. entrypoint_function_name

    1. The function name in your EntryPoint contract that handles operations

    2. Typically "handleOps" as per the ERC-4337 specification

    3. Must be case-sensitive

  3. entrypoint_function_abi

    1. The ABI definition of your handleOps function

    2. Must include all parameter types exactly as implemented

    3. Standard format: `function handleOps((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[], address)`

  4. scw_function_name

    1. The function name in your Smart Contract Wallet that executes transactions

    2. Typically "execute" as per common implementation

    3. Must be case-sensitive

  5. scw_function_abi

    1. The ABI definition of your execute function

    2. Must include all parameter types exactly as implemented

    3. Standard format: `function execute(address,uint256,bytes)`

Here you can find an example of existing ERC-4337 configuration for Ethereum: https://github.com/dappradar/erc4337-configurations/blob/main/chain-config/ethereum/erc4337.json

Submission Process

  1. Fork our erc4337-configurations repository: https://github.com/dappradar/erc4337-configurations

  2. Create or update (depending if the chain is already supported or not) configuration file in `chain-config/<chain-name>/erc4337.json`

  3. Add / update a test case in `test/chains/<chain-name>.test.json` and make sure it’s passing.

  4. Create a Pull Request which will be reviewed by our internal team.

Support

Troubleshooting common integration issues

  1. Incorrect ABI Format

    1. Ensure all ABIs are properly formatted strings

    2. Check for matching parameter counts and types

    3. Verify no extra whitespace in ABI strings

  2. Address Formatting

    1. All addresses must be in checksum format

    2. Addresses must include "0x" prefix

    3. Verify correct case sensitivity

  3. Function Name Mismatches

    1. Function names must exactly match your contract

    2. Check for typos and case sensitivity

    3. Verify against deployed contract code

Getting Help

  1. Provide detailed information about your implementation

  2. Include relevant transaction hashes

  3. Share any error messages or unexpected behaviors

Last updated

Was this helpful?