This quickstart demonstrates how to use EIP-7702 with ERC-4337 to send a gas-sponsored, batched transaction directly from your EOA. We’ll use Abstraxn’s SDK for EIP-7702-compliant smart account operations. Feel free to substitute with other compatible EIP-7702 implementations if desired. For the conceptual overview, jump back to the EIP-7702 Overview. For full protocol details, see the official EIP-7702 proposal.

Installation

Make sure you’ve installed our EIP-7702 SDK, which follows the viem + permissionless.js style but built for Abstraxn’s stack: For NPM users:
npm install permissionless viem
For Yarn users:
npm install permissionless viem

Quickstart steps

  1. Setup the smart account from your EOA
import { createPublicClient, Hex, http } from "viem";
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
import { to7702KernelSmartAccount, to7702SimpleSmartAccount } from "permissionless/accounts";
import { sepolia } from "viem/chains";
 
// This is your EOA's private key
const privateKey = generatePrivateKey();
 
const eoa7702 = privateKeyToAccount(privateKey);
 
const client = createPublicClient({
	chain: sepolia,
	transport: http("https://sepolia.drpc.org"),
});
 
// you can use either simple smart account
const simple7702Account = await to7702SimpleSmartAccount({
	client,
	owner: eoa7702,
});
 
// or use a kernel smart account
const kernel7702Account = await to7702KernelSmartAccount({
	client,
	owner: eoa7702,
})
  1. (Optional) Add a Paymaster for Gas Sponsorship
import { 
  createPaymasterClient 
} from 'viem/account-abstraction'
 
const APIKey = "https://paymaster.abstraxn.com/api/v1/{CHAIN_ID}/?apikey={API_KEY}";
 
export const paymasterClient = createPaymasterClient({ 
  transport: http('https://paymaster.abstraxn.com/api/v1/{CHAIN_ID}/?apikey={API_KEY}'), 
}) 
  1. Build a smart account client
import { createSmartAccountClient } from "permissionless";
import { zeroAddress } from "viem";
 
const smartAccountClient = createSmartAccountClient({
	client,
	chain: sepolia,
	account: simple7702Account, // or kernel7702Account
	paymaster: paymasterClient,
	bundlerTransport: http(
		`https://paymaster.abstraxn.com/api/v1/{CHAIN_ID}/?apikey={API_KEY}`,
	),
});
  1. Send a transaction
 
const isSmartAccountDeployed = await smartAccountClient.account.isDeployed();

const kernelVersion = KERNEL_V3_3;
const kernelAddresses = KernelVersionToAddressesMap[kernelVersion];
 
let transactionHash: Hex;
 
// We only have to add the authorization field if the EOA does not have the authorization code set
if (!isSmartAccountDeployed) {
	transactionHash = await smartAccountClient.sendTransaction({
		to: zeroAddress,
		value: 0n,
		data: "0x",
		authorization: await eoa7702.signAuthorization({
			address: kernelAddresses.accountImplementationAddress,
			chainId: sepolia.id,
			nonce: await client.getTransactionCount({
				address: eoa7702.address,
			}),
		}),
	});
} else {
	transactionHash = await smartAccountClient.sendTransaction({
		to: zeroAddress,
		value: 0n,
		data: "0x",
	});
}
  1. Batch multile calls
 
let transactionHash_2: Hex;

const kernelVersion = KERNEL_V3_3;
const kernelAddresses = KernelVersionToAddressesMap[kernelVersion];
 
// We only have to add the authorization field if the EOA does not have the authorization code set
if (!isSmartAccountDeployed) {
	transactionHash_2 = await smartAccountClient.sendTransaction({
		calls: [
			{
				to: zeroAddress,
				value: 0n,
				data: "0x",
			},
			{
				to: zeroAddress,
				value: 0n,
				data: "0x",
			},
		],
		authorization: await eoa7702.signAuthorization({
			address: kernelAddresses.accountImplementationAddress,
			chainId: sepolia.id,
			nonce: await client.getTransactionCount({
				address: eoa7702.address,
			}),
		}),
	});
} else {
	transactionHash_2 = await smartAccountClient.sendTransaction({
		calls: [
			{
				to: zeroAddress,
				value: 0n,
				data: "0x",
			},
			{
				to: zeroAddress,
				value: 0n,
				data: "0x",
			},
		],
	});
}

Summary

You’ve just sent a delegated (EIP-7702) transaction from your EOA. When you inspect the transaction on-chain, you’ll see it’s still from your EOA — but executed through the smart account delegation, often with a sponsored gas model.

Ket Takeaways

  • EIP-7702 lets EOAs gain smart account powers instantly, without migrations or new wallets.
  • Authorization is required only during setup; repeated transactions don’t need re-authorization.
  • Batch and gas sponsorship are native once the smart account is deployed.
  • All powered by Abstraxn’s integrated SDK — clean, secure, and EOA-first.