> For the complete documentation index, see [llms.txt](https://docs.chiliz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chiliz.com/develop/advanced/use-account-abstraction.md).

# Use Account Abstraction

## What is Account Abstraction?

Account Abstraction is a blockchain technology that allows users to use smart contracts as their accounts, making them fully programmable.

It aims to make user accounts more flexible and functional, thus enhancing the user experience.

## What does it mean for Chiliz Chain developers?

By implementing AA, developers can enhance the user experience of their project: simpler Chiliz Chain interactions mean a more user-friendly app.

## Using Biconomy on Chiliz Chain

[Biconomy](https://www.biconomy.io/) provides a full-stack Account Abstraction toolkit built around its **MEE** (Modular Execution Environment) and the **AbstractJS** SDK. Chiliz Chain is supported on [both Mainnet and Spicy Testnet](https://docs.biconomy.io/contracts-and-audits/supported-chains)

With Biconomy's stack, you can offer your users:

* Gasless transactions
* Batched and cross-chain transactions
* Smart-contract wallets (including social login)
* Modules such as session keys, account recovery, and more

### Why MEE, and not the classic Account Abstraction model?

Biconomy's earlier stack was built on the classic **ERC-4337** model, which relied on separate bundler and paymaster infrastructure on each chain. Biconomy has since moved to **MEE**, which keeps full ERC-4337 parity while removing its main limitations. Their [MEE vs ERC-4337](https://docs.biconomy.io/new/learn-about-biconomy/mee-vs-4337) comparison explains the reasoning:

* **Dynamic composability:** ERC-4337 only allows static batching, where all call data must be known upfront. MEE lets each step reference the outputs of previous steps (conditional logic, runtime values).
* **Native cross-chain orchestration**: Instead of separate transactions and signatures per chain, MEE authorizes complex multi-chain flows with a single signature.
* **Universal gas abstraction**: Users can pay gas on any supported chain using tokens from another, rather than managing gas per chain.
* **Automation**: MEE supports scheduled and recurring execution, which ERC-4337 lacks.
* **EOA support by default**: no smart-contract wallet (or EIP-7702) is strictly required.

### Gasless transactions on Chiliz Chain

One of the most impactful uses of AA is removing the need for users to hold CHZ just to interact with your dApp. With **sponsored (gasless) transactions**, your application covers the gas on the user's behalf, so onboarding no longer requires the user to first acquire CHZ. Combined with MEE's universal gas abstraction, gas can also be paid in another token rather than the chain's native asset. See Biconomy's [gas sponsorship](https://docs.biconomy.io/gasless-apps/sponsorship) guide for how to enable it.

### Getting started

Sign in to the [Biconomy dashboard](https://dashboard.biconomy.io/) and create a project. Each project gives you the credentials you'll use in your app:

* an **API Key** (e.g. `mee_LDxnuNsXYfvNUGsz6sJbHn`)
* a **Project ID** (e.g. `1sp767r4-5rrs-9o1s-3s6s-4s0r6nrq3647`)

Install AbstractJS and [viem](https://viem.sh/):

```bash
npm install @biconomy/abstractjs viem
```

Then create a Nexus account and an MEE client, pointing your chain configuration at Chiliz Chain. The Chiliz Chain IDs are:

* `Chiliz Mainnet = 88888`
* `Chiliz Spicy Testnet = 88882`

```typescript
import { createMeeClient, toMultichainNexusAccount, getMEEVersion, MEEVersion } from "@biconomy/abstractjs";
import { http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { chiliz, spicy } from "viem/chains";

const eoa = privateKeyToAccount("0xYOUR_PRIVATE_KEY");

// Create a Nexus account configured for Chiliz Chain (and Spicy Testnet)
const orchestrator = await toMultichainNexusAccount({
  chainConfigurations: [
    { chain: chiliz, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) },
    { chain: spicy, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) },
  ],
  signer: eoa,
});

// Create the MEE client using your Biconomy dashboard API key
const meeClient = await createMeeClient({
  account: orchestrator,
  apiKey: "mee_LDxnuNsXYfvNUGsz6sJbHn",
});
```

Note: Biconomy's SDK keeps evolving, so follow their [Setting up AbstractJS](https://docs.biconomy.io/new/getting-started/set-up-abstractjs) guide and [introduction](https://docs.biconomy.io/overview/introduction) for the current, complete example.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.chiliz.com/develop/advanced/use-account-abstraction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
