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

# Upgrading to EIP-7702

> Learn how to upgrade wallets to EIP-7702.

## Overview

Portal's EVM Account Type feature enables you to upgrade your Portal wallets to EIP-7702, providing enhanced functionality and compatibility with smart contract features. With this module, you can:

* **Check wallet status** to determine the current account type
* **Upgrade to EIP-7702** to enable ejecting the Portal wallet's EOA private key

## What is EIP-7702?

EIP-7702 is an Ethereum Improvement Proposal that allows Externally Owned Accounts (EOAs) to behave like smart contract accounts. This upgrade enables:

* **Ejecting the EOA private key** from the Portal wallet
* **Enabling smart contract capabilities** for the Portal wallet
* **Saves gas fee** by not needing to deploy a smart contract

<Warning>
  EIP-7702 is not yet supported on all chains. Please check with the Portal team to see if your chain is supported.
</Warning>

### How the Upgrade Works

When you upgrade a Portal wallet to EIP-7702:

1. **Status check** confirms the wallet is an `EIP_155_EOA`
2. **Authorization** is built and signed by the EOA
3. **Upgrade transaction** is submitted on-chain by your [upgrade sponsor configured in the Portal Dashboard](https://app.portalhq.io/upgrade-sponsorship)
4. **Wallet transforms** to `EIP_7702_EOA` account type

<Warning>
  Only wallets with an `EIP_155_EOA` account type can be upgraded to EIP-7702. Smart contract wallets and already upgraded wallets cannot perform this operation.
</Warning>

## Prerequisites

Before upgrading a wallet to EIP-7702, ensure:

* The wallet has `EIP_155_EOA` account type
* The target chain supports EIP-7702 transactions
* You fund the [Upgrade Sponsor address with native tokens for the target chain in the Portal Dashboard](https://app.portalhq.io/upgrade-sponsorship)

## Key Operations

### Get Wallet Status

Check the current account type of your Portal wallet.

**Parameters:**

* `chain`: CAIP-2 format chain ID (e.g., `eip155:10143`)

**Returns:**

* `status`: Current account type (`EIP_155_EOA`, `SMART_CONTRACT`, or `EIP_7702_EOA`)
* `eoaAddress`: The EOA address of your Portal wallet
* `smartContractAddress`: The smart contract address of your Portal wallet (if account abstraction is enabled)
* `chainId`: The chain identifier

### Upgrade to EIP-7702

Upgrade an EOA wallet to EIP-7702 to enable smart contract capabilities and eject the EOA private key.

**Parameters:**

* `chain`: CAIP-2 format chain ID

**Returns:**

* `txHash`: Transaction hash (if upgrade was performed)

<Note>
  The `upgradeTo7702()` method handles the entire upgrade process automatically, including building the authorization, signing, and submitting the transaction.
</Note>

## Transaction Flow

The upgrade process follows these steps:

1. **Check status** using `getStatus()` to verify wallet is `EIP_155_EOA`
2. **Fund [Upgrade Sponsor address](https://app.portalhq.io/upgrade-sponsorship)** with native tokens for the target chain
3. **Call `upgradeTo7702()`** to perform the upgrade
4. **Wait for confirmation** on-chain
5. **Verify upgrade** by checking status again and ensuring the wallet is `EIP_7702_EOA`

<Warning>
  The upgrade is a one-way operation. Once the wallet is upgraded to EIP-7702, it cannot be downgraded.
</Warning>

<Warning>
  After upgrading to EIP-7702, you must use the EOA address of your Portal wallet to interact with the chain from `getStatus()`.
</Warning>

## Supported Networks

The EVM Account Type feature is currently available on:

* **Monad Testnet** (`eip155:10143`)
* Additional EIP-7702 compatible chains (check with Portal team)

## Security Considerations

<Warning>
  Upgrading to EIP-7702 modifies how your wallet operates on-chain. Always:

  * Verify you're on the correct network before upgrading
  * Ensure the [Upgrade Sponsor address](https://app.portalhq.io/upgrade-sponsorship) has sufficient funds for gas
  * Test on testnet before mainnet deployment
  * Understand that the upgrade is a one-way operation per wallet
</Warning>

### Best Practices

1. **Check status first**: Always verify wallet type before attempting upgrade
2. **Fund adequately**: Ensure [Upgrade Sponsor address](https://app.portalhq.io/upgrade-sponsorship) has enough native tokens for gas fees
3. **Monitor transactions**: Track the transaction hash for confirmation
4. **Test thoroughly**: Validate on testnet before production use

## Next Steps

Ready to implement EIP-7702 upgrades in your app? Choose your platform:

* [iOS](/sdks/ios/guide/evm-account-type)
* [Android](/sdks/android/guide/evm-account-type)
* [React Native](/sdks/react-native/guide/evm-account-type)
* [Web](/sdks/web/guide/evm-account-type)
