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
How the Upgrade Works
When you upgrade a Portal wallet to EIP-7702:- Status check confirms the wallet is an
EIP_155_EOA - Authorization is built and signed by the EOA
- Upgrade transaction is submitted on-chain by your upgrade sponsor configured in the Portal Dashboard
- Wallet transforms to
EIP_7702_EOAaccount type
Prerequisites
Before upgrading a wallet to EIP-7702, ensure:- The wallet has
EIP_155_EOAaccount 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
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)
status: Current account type (EIP_155_EOA,SMART_CONTRACT, orEIP_7702_EOA)eoaAddress: The EOA address of your Portal walletsmartContractAddress: 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
txHash: Transaction hash (if upgrade was performed)
The
upgradeTo7702() method handles the entire upgrade process automatically, including building the authorization, signing, and submitting the transaction.Transaction Flow
The upgrade process follows these steps:- Check status using
getStatus()to verify wallet isEIP_155_EOA - Fund Upgrade Sponsor address with native tokens for the target chain
- Call
upgradeTo7702()to perform the upgrade - Wait for confirmation on-chain
- Verify upgrade by checking status again and ensuring the wallet is
EIP_7702_EOA
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
Best Practices
- Check status first: Always verify wallet type before attempting upgrade
- Fund adequately: Ensure Upgrade Sponsor address has enough native tokens for gas fees
- Monitor transactions: Track the transaction hash for confirmation
- Test thoroughly: Validate on testnet before production use