Skip to main content

Overview

This guide demonstrates how to combine Para’s session-based authentication with Biconomy’s MEE (Modular Execution Environment) and Nexus smart accounts to enable EIP-7702 gas abstracted transactions. You’ll learn how to:
  • Create smart accounts using EIP-7702 delegation
  • Execute batched transactions with gas abstraction
  • Use Para sessions for seamless user experience
  • Handle cross-chain operations
What is EIP-7702? EIP-7702 allows EOAs (Externally Owned Accounts) to temporarily delegate their execution to smart contract code, enabling smart account features without deploying a separate contract.

Prerequisites

  • Node.js 18+ installed
  • Basic understanding of Ethereum and smart contracts
  • Express.js server setup
  • Para API key
  • RPC endpoint for Arbitrum Sepolia

Installation

Install the required dependencies:

Environment Setup

Create a .env file with the following variables:
.env
Keep your API keys secure and never commit them to version control.

Implementation

Step 1: Import Dependencies

Create your handler file and import the necessary packages:
handler.ts

Step 2: Define Constants

Set up your contract details and Nexus implementation:
constants.ts
The Nexus implementation address is the same across all chains. This is the smart contract code that will be delegated to your EOA.

Step 3: Create the Handler Function

handler.ts

Step 4: Initialize Para and Create Account

para-setup.ts

Step 5: Set Up Clients

clients.ts

Step 6: Sign EIP-7702 Authorization

This is the key step that enables EIP-7702 functionality:
authorization.ts
Setting chainId: 0 allows the authorization to work across any chain, providing maximum flexibility.

Step 7: Create Nexus Account

nexus-account.ts
Critical: Set accountAddress to the EOA address (not undefined) to enable EIP-7702 delegation mode.

Step 8: Create MEE Client and Execute Transaction

execution.ts

Step 9: Handle Response

response.ts

Testing

Request Format

Send a POST request to your handler endpoint:

Expected Response

Advanced Features

Gas Abstraction with ERC-20 Tokens

Enable users to pay gas fees with any ERC-20 token:
gas-abstraction.ts

Cross-Chain Execution

Execute transactions across multiple chains in a single call:
cross-chain.ts

Runtime Parameter Injection

Use dynamic values in your transactions:
runtime-params.ts

Troubleshooting

Ensure your customSignAuthorization function properly handles EIP-7702 authorization format:
  • Verify the authorization was signed correctly
  • Ensure accountAddress is set to the EOA address
  • Check that the Nexus implementation address is correct
Try specifying a fee token or ensure the account has sufficient balance for gas: