# Account Abstraction Deployment Report

**Environment:** BlockDAG  Network\
**Version:** EntryPoint v0.6, Bundler Service, Verifying Paymaster

### &#x20;1. Introduction

We have successfully deployed Account Abstraction (AA) components on the BlockDAG test network in line with ERC-4337 specifications.

This deployment includes:

* EntryPoint v0.6 Contract – the central router for UserOperations.
* Bundler Service – a spec-compliant service for UserOperation validation, mempooling, and bundling.
* Verifying Paymaster Contract – an on-chain paymaster enabling sponsored (gasless) transactions with signature validation.

Together, these provide a secure and user-friendly foundation for gas abstraction and next-generation dApps.

### 2. Components Deployed

#### 2.1 EntryPoint v0.6

* Core contract validating and executing UserOperations.
* Provides replay protection, batching, and signature verification.
* Fully aligned with ERC-4337.

#### 2.2 Bundler Service

The bundler was deployed using the Eth Infinitism reference implementation and extended for our BlockDAG environment.

Key Features:

* Spec RPC Endpoints: eth\_sendUserOperation, eth\_estimateUserOperationGas, eth\_getUserOperationReceipt, eth\_getUserOperationByHash.
* Validation Pipeline: Uses simulateValidation to ensure correctness before acceptance.
* Mempool & Reputation: Valid UserOps are queued, invalid ones filtered with reputation checks.
* Execution Flow: Validate → Prefund/Paymaster check → Mempool → Bundle → Submit → Event tracking.
* Diagnostics: Detailed logging for signatures, prefund, gas fields, and execution results.

#### 2.3 Verifying Paymaster Contract

The Verifying Paymaster allows transactions to be sponsored by an on-chain contract, removing the need for users to hold native gas tokens.

**How It Works**

* The paymasterAndData field is built as:<br>

paymaster(20 bytes)&#x20;

\+ abi.encode(uint48 validUntil, uint48 validAfter)&#x20;

\+ signature

* Implementation in VerifyingPaymasterAPI.ts:
* Ensures the local verifying signer matches the on-chain verifyingSigner.
* Computes preVerificationGas with a placeholder 65-byte signature.
* Signs getHash(op, validUntil, validAfter).
* If PVG changes, re-computes and re-signs.<br>

**Runner Usage**

The runner (runop.ts) provides flexible integration:

* \--paymaster \<address> – specify Paymaster contract.
* \--verifierMnemonic \<file> – load verifying signer.
* \--pmValidFor \<seconds> – define validity window.
* \--pmAutoTopUp – automatically fund Paymaster deposit if required.

It verifies both account owner signatures and Paymaster signatures before sending.

**Prerequisites**

* EntryPoint deployed and registered.
* Paymaster staked and funded on-chain.
* Verifying signer is configured on-chain and locally available.

**Outputs & Diagnostics**

* Logs PVG components and computed hashes.
* Signature length and recovery checks.
* Detailed failure dumps for gas or validation errors.

**Example Workflow**

1. Start Bundler:

| yarn bundler --config ./localconfig/bundler.config.json --unsafe --auto |
| ----------------------------------------------------------------------- |

2. Send UserOperation with Paymaster:

| <p>yarn runop \<br>  --deployFactory \<br>  --network <http://localhost:18545> \<br>  --entryPoint 0x5FF1...2789 \<br>  --paymaster 0xAaBb...1122 \<br>  --verifierMnemonic ./verifier.txt \<br>  --pmValidFor 300 \<br>  --pmAutoTopUp</p> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

3. paymasterAndData Layout:

0x<20-byte paymaster address>

\<validUntil: 48 bits>

\<validAfter: 48 bits>

\<signature: dynamic length>

### 3. Benefits to the User

* Gasless Transactions: Users interact without holding native tokens.
* Custom Sponsorship Policies: Time-bound or conditional approvals.
* Diagnostics & Security: Strong validation checks and transparent failure reporting.
* Future-proof: Compatible with ERC-4337 tooling and SDKs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blockdagnetwork.io/new-features/account-abstraction-deployment-report.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
