Zircuit
  • Introduction
  • Frequently Asked Questions (FAQ)
  • Tokenomics
    • Zircuit Token (ZRC)
    • Bridging ZRC to Zircuit
  • Build on Zircuit
    • Quick Start
    • Deploy on Zircuit
    • Zircuit LST/LRT Liquidity Hub
  • Architecture and Concepts
    • Architecture
      • Modular Prover Design
      • Template Proofs
      • Versions and Updates
    • Concepts
    • Sequencer Level Security (SLS)
    • Gas Pricing and Transaction Fees
    • Transaction Statuses
    • Supported Transaction Types
  • Research
    • Research
    • Publications and Grants
    • Talks and Panels
  • Dev Tools
    • Block Explorer
    • RPC Endpoints
    • Bridge
    • Verifying Contracts
    • ERC20 Tokens with Zircuit Canonical Bridge
    • Development Frameworks
    • CREATE2 Deployments
    • Oracles
    • Indexing and Subgraph
    • Relayers
    • Unsupported Opcodes
    • Precompiles
    • L1 Data Fee Calculation
  • Smart Contracts
    • L1 Contracts
    • L2 Contracts
    • Contract Addresses
    • Bridged Token Addresses
  • Security
    • Security
    • Privileged Roles
    • Bug Bounty
    • Audit Reports
  • Garfield Testnet
    • Garfield Testnet Quick Start
    • Garfield Testnet Bridging Prerequisites
      • Adding the Sepolia Network To Metamask
      • Adding The Zircuit Garfield Testnet Network To Metamask
      • Connecting Metamask To Zircuit’s Bridge
    • Deploy on the Zircuit Garfield Testnet
    • RPC Endpoints
    • Block Explorer
    • Verifying Contracts
    • Bridge
    • Faucet
    • Differences & Limitations
    • Contract Addresses
  • Testnet Legacy
    • Legacy Testnet Quick Start
    • Legacy Testnet Bridging Prerequisites
      • Adding The Sepolia Network To Metamask
      • Adding The Zircuit Legacy Testnet Network To Metamask
      • Connecting Metamask To Zircuit’s Bridge
    • Deploy on the Legacy Zircuit Testnet
    • RPC Endpoints
    • Block Explorer
    • Verifying Contracts
    • Bridge
    • Faucet
    • Contract Addresses
  • Bridging Step-by-Step
    • Prequisites
      • Adding The Zircuit Network To Metamask
    • Bridging From Sepolia To Zircuit
    • Bridging From Zircuit To Sepolia
    • Completing Withdrawals From Zircuit
    • Bridging ERC20 Tokens Manually
    • Binance Web3 Wallet Task Tutorial
      • Binance Web3 Wallet Tutorial: Bridging back to Ethereum
    • Exploring Bridging Behaviors with EIP-7702
Powered by GitBook
On this page
  • Bridging ETH
  • Bridging ERC-721
  • Recovering Temporarily Locked ETH/ERC-721 on L1
  • Recovering Temporarily Locked ETH/ERC-721 on L2
  1. Bridging Step-by-Step

Exploring Bridging Behaviors with EIP-7702

PreviousBinance Web3 Wallet Tutorial: Bridging back to Ethereum

Last updated 10 days ago

To avoid the risk of potential fund loss, always use the L1StandardBridge and L2StandardBridge contracts when bridging ETH and ERC-20 tokens, and use the L1ERC721Bridge and L2ERC721Bridge contracts when bridging ERC-721 tokens.

EIP-7702 enables EOAs to execute smart contract code directly. However, this comes with some nuances to be wary of when it comes to bridging.

Bridging ETH

  • ETH may be temporarily locked on the destination network if the receiving delegated account lacks a function to accept ETH (e.g., receive() external payable). To resolve this, either undelegate the code or update it to include an ETH-receiving function, then replay the message on the destination network.

  • The L1StandardBridge and L2StandardBridge contracts include a convenience receive() function that initiates the bridging process with a fixed gas limit for the destination network. If the receiving delegated account implements a receive() function with complex logic that consumes significant gas, it may trigger an out-of-gas error. To avoid unexpected behavior in such cases, use bridgeETH or bridgeETHTo instead, specifying a custom gas limit that ensures successful execution on the destination chain.

Bridging ERC-721

  • ERC-721 may be temporarily locked on the destination network if the receiving delegated account lacks a correctly implemented onERC721Received() function. To resolve this, either undelegate the code or update it to include an onERC721Received() function, then replay the message on the destination network.

Recovering Temporarily Locked ETH/ERC-721 on L1

  1. For delegated 7702 EOAs on L1, unset the code first.

  2. Go to the OptimismPortalProxy page on Etherscan. You can find the Mainnet link .

  3. Open the transaction hash page where the proveWithdrawalTransaction errors occurred.

  4. Go to the Internal Txns tab.

  5. Open and decode input data for the Relay Message method.

  6. Go to the L1CrossDomainMessengerProxy page on Etherscan. You can find the Mainnet link .

  7. Send a relayMessage transaction using the exact same decoded input data from Step 6. Set the payableAmount to 0. Once the transaction is confirmed, the funds should appear in your wallet.

Recovering Temporarily Locked ETH/ERC-721 on L2

  1. For delegated 7702 EOAs on L2, unset the code first.

  2. Open the transaction hash page where the relayMessage error occurred.

  3. Copy the Input Data and run the folllowing command:

    cast calldata-decode "relayMessage(uint256,address,address,uint256,uint256,bytes)" $INPUT_DATA
  4. Send a relayMessage transaction using the exact same decoded input data from Step 4. Set the payableAmount to 0. Once the transaction is confirmed, the funds should appear in your wallet.

Go to the L2CrossDomainMessenger page on Zircuit explorer. You can find the Mainnet link .

Go to the L2CrossDomainMessenger page on Etherscan. You can find the Mainnet link .

here
here
here
here