> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onebalance.io/llms.txt
> Use this file to discover all available pages before exploring further.

# EIP-7702 Overview

> Enable EOAs to delegate execution to smart contracts for cross-chain operations

## What is EIP-7702?

[EIP-7702](https://eip7702.io) allows Externally Owned Accounts (EOAs) to delegate their execution logic to smart contracts. When an EOA signs an authorization, it temporarily gains smart account capabilities without changing its address.

## Supported Operations

EIP-7702 accounts work with all OneBalance transaction types:

* **Swaps**: Cross-chain token exchanges with automatic bridging
* **Transfers**: Send assets across chains to any address
* **Contract Calls**: Execute smart contract functions with call data

All operations benefit from gas abstraction and single-transaction UX.

### Key Concept: Delegation vs Deployment

**EIP-7702 Accounts (Delegation)**:

* EOA signs authorization to delegate to smart contract implementation
* Address remains unchanged - no migration needed
* Delegation happens when first transaction is needed

**ERC-4337 Accounts (Deployment)**:

* New smart contract deployed with predicted address
* Requires address migration from existing EOA
* Deployment happens when account is created

## Integration Flow

OneBalance implements EIP-7702 through a clear process:

<Steps>
  <Step title="Prepare Quote">
    Call [prepare-call-quote](/api-reference/quotes/prepare-call-quote) to analyze your requirements and get delegation objects if needed
  </Step>

  <Step title="Sign Delegations">
    Sign any delegation objects using viem's [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) method
  </Step>

  <Step title="Get Quote">
    Submit signed delegations to [call-quote](/api-reference/quotes/get-call-quote) to get the executable quote
  </Step>

  <Step title="Execute">
    Execute the quote using [execute-quote](/api-reference/quotes/execute-quote) to perform the cross-chain operation
  </Step>
</Steps>

<Note>
  OneBalance handles delegation automatically. If your EOA is already delegated on a chain, no additional signing is required.
</Note>

## How EIP-7702 Works

When you configure an EIP-7702 account with OneBalance:

1. **Account Configuration**: Set `deploymentType: "EIP7702"` and use your EOA address for both `signerAddress` and `accountAddress`
2. **Smart Contract Implementation**: OneBalance uses Kernel 3.3 as the delegation target
3. **Automatic Delegation**: When needed, OneBalance generates authorization objects for you to sign
4. **Execution**: Your EOA temporarily gains smart account capabilities during the transaction

## Example: Account Configuration

```typescript theme={null}
const account = {
  type: "kernel-v3.3-ecdsa",
  deploymentType: "EIP7702",
  signerAddress: "0x5Cb2369421F8a00Ef556d662D6E97C1419B1d37c", // Your EOA
  accountAddress: "0x5Cb2369421F8a00Ef556d662D6E97C1419B1d37c" // Same address
};
```

When delegation is needed:

* **Source chain**: Always required for spending operations (swaps, transfers, contract calls)
* **Destination chain**: Only required for contract calls (not for swaps or transfers)

## When to Use EIP-7702

Choose EIP-7702 when you want to preserve existing EOA addresses:

* **Existing EOA users**: No address migration needed
* **Embedded wallets**: Upgrade EOAs to smart account capabilities
* **Address preservation**: Keep on-chain history and familiar addresses

**Choose ERC-4337 when you need:**

* [Resource Locks](/concepts/resource-locks) (requires managed key infrastructure)
* Custom account implementations beyond Kernel v3.3

<Info>
  EIP-7702 uses the same ERC-4337 infrastructure (bundlers, paymasters, UserOps) but extends it to work with existing EOA addresses. Learn more about [Account Types](/concepts/accounts).
</Info>

## Current Limitations

OneBalance's EIP-7702 implementation works for most scenarios but has one constraint:

**Multi-Input Limitation**: When you have assets on more than 1 source chain different from the destination chain, you'll need to use a [manual delegation workaround](/guides/eip-7702/troubleshooting#multi-input-limitation).

| Example Assets              | Destination | Result               |
| --------------------------- | ----------- | -------------------- |
| USDC on Optimism            | Arbitrum    | ✅ Single transaction |
| USDC on Optimism + Arbitrum | Arbitrum    | ✅ Single transaction |
| USDC on Optimism + Base     | Arbitrum    | ⚠️ Needs workaround  |

## Cross-Chain Funding with Solana

EIP-7702 accounts can be funded using Solana assets for cost efficiency and expanded liquidity access:

<CardGroup cols={2}>
  <Card title="Solana + EIP-7702" icon="coins" href="/guides/solana/contract-calls#eip-7702-integration">
    Fund EIP-7702 contract calls using SOL or USDC from Solana
  </Card>

  <Card title="Solana Examples" icon="code" href="/guides/solana/contract-calls">
    Complete working examples of cross-chain contract execution
  </Card>
</CardGroup>

<Info>
  Using Solana funding with EIP-7702 enables atomic operations: SOL → USDC swap → bridge → delegation → contract execution.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/guides/eip-7702/getting-started">
    Build your first EIP-7702 swap with delegation
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/guides/eip-7702/troubleshooting">
    Handle multi-input limitations and edge cases
  </Card>
</CardGroup>

<Note>
  All existing OneBalance API endpoints work with EIP-7702. Just update your account configuration to use `type: "kernel-v3.3-ecdsa"` and `deploymentType: "EIP7702"`.
</Note>
