Using the Linea bridge through the block explorer

Have more questions? Submit a request

This page is currently awaiting an update.

Thanks for bearing with us — in the meantime, we recommend you do not use these instructions, and head to the Linea SDK page for details of how this process has changed with the release of Linea Alpha v2.

It is possible to use the Linea bridge by interacting directly with the contracts on the block explorer. This may be a handy alternative to using the front end at bridge.linea.build if you're encountering issues, or you'd just prefer not to.

Note:

We recommend you only use this method if you're a confident user. If you only have a beginner-level understanding of how blockchains and smart contracts work, please stick to using the bridge site, which will be more suitable for many.

Set up

Before you begin, ensure your wallet is:

  1. Configured to use Linea
  2. Funded (contains ETH to pay for gas fees). If you need ETH, you can purchase ETH directly.

Bridge ETH between Linea and L1 (Ethereum mainnet)

The process for bridging via the block explorer is very similar, regardless of which way your bridge is heading. Make sure you use the sendMessage method on the correct bridge contract. 

So if you're on L1 (Ethereum) and want to move ETH to Linea, use the L1 Message Service (read: bridge) contract, on Etherscan. The block explorer you're using should be the block explorer for your origin/source network.

Here's how it works:

  1. Go to the bridge contract page on the block explorer for the network you're bridging from:

  2. On the contract's page in the block explorer, find the 'Contract' tab, and then within that, find the 'Write as Proxy' tab:

    Linea Etherscan locate write as proxy tab

  3. Connect your wallet by clicking the 'Connect to Web3' button at the top of the list of methods.

    Linea Etherscan locate Connect to Web3

  4. Open the sendMessage function form:

    Linea Etherscan sendMessage function form

  5. Complete the form with the following information:

    Label Meaning
    sendMessage The amount of ETH you want to bridge
    _to Your (recipient) address on the other network/layer
    _fee This is the fee paid to the postman to automatically execute the transfer on the second layer. We recommend providing a 0.001 ETH fee to ensure proper execution. (Note: the amount is in wei, so 0.001 ETH = 1015, or 1,000,000,000,000,000.)
    _calldata For a simple transfer, we recommend sending no calldata by inputting 0x.
  6. Confirm the transaction in your wallet, and you’re done 🎉! Your funds should arrive on the destination network within a few minutes (L2 -> L1 bridging is a bit longer and can take up to ~15 minutes).

Bridge ERC-20 tokens between Linea and L1 (Ethereum mainnet)

  1. Go to the ERC-20 contract of your choice. See the list here for links to the contracts. For this process, you need to go to the token's contract page on the block explorer for the source network (the network you're bridging from).
  2. On the contract's page in the block explorer, find the 'Contract' tab, and then within that, find the 'Write Contract' tab:

    Linea Etherscan ERC20 locate write contract tab

  3. Connect your wallet by clicking the 'Connect to Web3' button at the top of the list of methods.

    Linea Etherscan ERC20 locate Connect to Web3

  4. Open the approve function form. (Note: if you can't find it under 'Write contract', check in 'Write as Proxy'. Either will work.):

    Linea Etherscan ERC20 approve function form

  5. Complete the form with the following information:

    Label Meaning
    spender Fill this with the contract address of the token bridge transparent proxy address for the source network (that you're bridging from).
    amount The amount of the token you want to send. Note that the figure you enter here is in the lowest decimal for the token in question. So for $UNI, for example, which has 18 decimals, you'd need to enter 100,000,000,000,000,000 (1 + 18 zeros).

    The transparent proxy addresses are:

  6. Next, go to the block explorer page for the token bridge transparent proxy address (listed in the previous step).
  7. Navigate to 'Contract', and then the tab 'Write as Proxy' within it:

    Linea Etherscan transparent proxy locate write as proxy tab

  8. Connect your wallet by clicking on the 'Connect to Web3' button:

    Linea Etherscan transparent proxy locate Connect to Web3

  9. Open the bridgeToken method form:

    Linea Etherscan transparent proxy bridgeToken function form

  10. Complete it with the following information:
    Label Meaning
    bridgeToken i.e. payableAmount, the fee paid to the postman service to automatically execute the transfer on the destination layer. We recommend providing a 0.001 ETH fee to ensure proper execution. Note: the amount is in wei, so 0.001 ETH = 1,000,000,000,000,000.
    _token The token address of the ERC-20 that you intend to bridge. Make sure you input the correct address here: if you're on Etherscan, make sure you've copied the L1 (Ethereum) address from here.
    _amount The amount of the token you want to bridge. Note that the figure you enter here is in the lowest decimal for the token in question. So for $UNI, for example, which has 18 decimals, you'd need to enter 100,000,000,000,000,000 (1 + 18 zeros).
    _recipient Your (recipient) address on the destination layer.
  11. Confirm the transaction in your wallet, and you’re done 🎉! Your funds should arrive on the other layer within a few minutes (L2 -> L1 bridging is a bit longer and can take up to ~15min)

 

Manually complete a bridge transaction

Note

This step is not mandatory unless you didn’t send enough of a fee when initiating your bridge transaction.

  1. One the block explorer, locate the transaction you sent on the source network. When you're there, you should be on a page with the header 'Transaction Details'.
  2. Go to the 'Logs' tab:

    Linea Etherscan locate logs tab

  3. Find the log for the 'MessageSent' event:

    Linea Etherscan messageSent log data

    Keep it open for a later step.

  4. Go to the Message Service contract on the destination layer. The contracts are available here.
  5. Navigate to the 'Contract' tab, then the 'Write as Proxy' tab. Make sure your wallet is connected, and call the claimMessage function using the parameters found in the 'MessageSent' logs we located earlier. Note: flick the 'hex' toggle on the right-hand side; the bytes argument must start with 0x0.

    Linea_Etherscan_claimMessage_data.png

  6. Confirm the transaction in your wallet to complete the process.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share