Skip to content

Commit

Permalink
Merge branch 'main' into ci-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbown authored Sep 17, 2024
2 parents e3a606c + e5b3089 commit 60dbae6
Show file tree
Hide file tree
Showing 16 changed files with 405 additions and 235 deletions.
214 changes: 214 additions & 0 deletions bridge-ui/src/app/faq/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
import Link from "next/link";
import { Collapse } from "@/components/Collapse";

export default function FaqPage() {
return (
<div className="m-auto min-w-min max-w-5xl">
<h1 className="mb-6 text-4xl md:hidden">FAQ</h1>
<div className="flex flex-col gap-5">
<Collapse title="Which address do the funds go to?">
<p>By default, your bridged funds are sent to the same address they were originally sent from.</p>
</Collapse>

<Collapse title="Can I send the funds to a different address?">
<p>
Yes — find the &apos;To different address&apos; button beneath the field that displays the amount of ETH or
tokens you will receive on the target chain. You can then enter the address you want the funds to be bridged
to. Only send funds to addresses on Ethereum Mainnet or Linea Mainnet. You may lose funds otherwise, and
they will be irretrievable (see this{" "}
<Link
href="https://support.metamask.io/managing-my-tokens/moving-your-tokens/funds-sent-on-wrong-network/#non-evm-tokens-and-networks"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
MetaMask Support article
</Link>{" "}
for an explanation). This means you cannot bridge to Bitcoin or Solana, for example, using the Linea Bridge.
</p>
</Collapse>

<Collapse title="I need to claim a transaction. What do I do?">
<p>
If you chose manual claiming, you need to return to the Linea Bridge and make an additional transaction. It
typically takes around 20 minutes (two Ethereum epochs) before you can claim a deposit; withdrawals from
Linea can take much longer, and vary in duration.
</p>
<p>
To claim, head to the &apos;Transactions&apos; tab and locate the bridge transaction you want to claim; it
should be marked as &apos;Ready to claim&apos;. Click on it, and then on the &apos;Claim&apos; button to
initiate the transaction.
</p>
</Collapse>

<Collapse title="What fees will I pay?">
<p>
Linea does not charge fees for using the bridge. However, you will need to pay gas fees for transactions.
Gas fees vary according to network activity, so we cannot accurately predict how much you&apos;ll pay. The
bulk of the cost will be for interacting with Ethereum Mainnet; Linea&apos;s gas fees are considerably
cheaper.
</p>
<p>
If you use manual claiming, you pay gas fees for the bridge transaction and then gas fees for the claim
transaction.
</p>
<p>
For automatic claiming, you pay gas fees for your initial bridge transaction and then a fee to cover the gas
costs of the postman executing the claim on your behalf.
</p>
</Collapse>

<Collapse title="Why can I only select Linea Mainnet and Ethereum Mainnet?">
<p>
The Linea Bridge is designed to transact between layer 1 (Ethereum Mainnet) and layer 2 (Linea Mainnet),
rather than for bridging to any other chains.
</p>
<p>
If you want to bridge to other EVM-compatible networks, consider using the{" "}
<Link
href="https://portfolio.metamask.io/bridge"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
MetaMask Portfolio bridge
</Link>
.
</p>
</Collapse>

<Collapse title="Why can't I see the token I want to bridge?">
<p>
The tokens available to select on the Linea Bridge are sourced from a curated list defined{" "}
<Link
href="https://github.com/Consensys/linea-token-list/blob/main/json/linea-mainnet-token-shortlist.json"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
here
</Link>{" "}
and maintained by the Linea team. This practice ensures users always bridge to the correct token—rather than
variants, preventing{" "}
<Link
href="https://support.linea.build/bridging/bridging-to-the-correct-erc-20-token-on-linea"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
liquidity fragmentation
</Link>{" "}
and mitigates the risk of funds loss.
</p>
</Collapse>

<Collapse title="Why can't I see my bridged tokens in my wallet?">
<p>
First, check whether your funds are ready to claim. To see claimable funds, go to the “Transactions” tab of
the Linea Bridge app.
</p>
<p>
If claiming isn&apos;t the issue, head to Lineascan and see if the transaction is pending, and in the queue:
</p>
<ul className="list-disc pl-8">
<li>
<Link
href="https://lineascan.build/txsDeposits"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
Here
</Link>{" "}
for L1 -&gt; L2 transactions (deposits)
</li>
<li>
<Link
href="https://lineascan.build/txsExit"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
Here
</Link>{" "}
for L2 -&gt; L1 transactions (exit transactions)
</li>
</ul>

<p>
If the transaction is still pending, just wait for it to be confirmed, and your funds will be available to
claim or will be in your wallet (depending on the claiming method you chose). If the transaction is missing,
or it has been confirmed and you still don&pos;t see your tokens, contact support by clicking the button in
the bottom-left of the Linea Bridge app, or head to the{" "}
<Link
href="https://support.linea.build/"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
Linea help center
</Link>
.
</p>
</Collapse>

<Collapse title="How long does the bridging take?">
<p>This depends on the direction of your bridge:</p>
<ul className="list-disc pl-8">
<li>Deposit (L1 -&gt; L2): Approximately 20 minutes.</li>
<li>
Withdrawal (L2 -&gt; L1): Between 8 and 32 hours. The L2 transaction must be finalized on Ethereum Mainnet
before you can claim your funds.
</li>
</ul>
</Collapse>

<Collapse title="Can I speed up my transaction?">
<p>
Yes, although it&apos;s not a method we recommend for beginners.{" "}
<Link
href="https://support.linea.build/bridging/can-i-speed-up-bridge-transfers-on-the-linea-bridge"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
View the guide on the MetaMask Help Center
</Link>
.
</p>
<p>
Note that this only speeds up your submission of the bridge transaction. It does not actually speed up the
bridging process itself that you initiate with this transaction — you cannot speed up the 8-32 hour waiting
time for a withdrawal.
</p>
</Collapse>

<Collapse title="Where can I access support?">
<p>Click the “Contact support” button in the bottom-left corner of the Linea Bridge app.</p>
<p>Alternatively, head to the Linea Help Center and click the “Contact” button on the homepage.</p>
<p>
You can also get advice and support on our moderated{" "}
<Link
href="https://discord.gg/linea"
rel="noopener noreferrer"
passHref
target="_blank"
className="link link-primary"
>
Discord
</Link>
.
</p>
</Collapse>
</div>
</div>
);
}
13 changes: 13 additions & 0 deletions bridge-ui/src/components/Collapse.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type CollapseProps = {
title: string;
children: React.ReactNode;
};

export const Collapse: React.FC<CollapseProps> = ({ title, children }) => {
return (
<details className="collapse collapse-arrow rounded-none border-2 border-card bg-cardBg hover:border-primary">
<summary className="collapse-title px-8 text-xl font-medium text-white">{title}</summary>
<div className="collapse-content flex flex-col gap-2 px-8 text-justify">{children}</div>
</details>
);
};
2 changes: 2 additions & 0 deletions bridge-ui/src/components/layouts/header/HeaderLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ function formatPath(pathname: string): string {
return "Bridge";
case "/transactions":
return "Transactions";
case "/faq":
return "FAQ";
default:
return "";
}
Expand Down
12 changes: 6 additions & 6 deletions bridge-ui/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ export const MENU_ITEMS = [
external: false,
Icon: TransactionsIcon,
},
{
title: "FAQ",
href: "/faq",
external: false,
Icon: FaqIcon,
},
{
title: "Docs",
href: "https://docs.linea.build/",
external: true,
Icon: DocsIcon,
},
{
title: "FAQ",
href: "https://support.linea.build/hc/en-us/categories/13281330249371-FAQs",
external: true,
Icon: FaqIcon,
},
];

export const NETWORK_ID_TO_NAME: Record<number, string> = {
Expand Down
4 changes: 2 additions & 2 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@openzeppelin/hardhat-upgrades": "2.5.1",
"@safe-global/protocol-kit": "3.0.2",
"@safe-global/safe-core-sdk-types": "4.0.2",
"@typechain/hardhat": "9.0.0",
"@typechain/hardhat": "9.1.0",
"@types/diff": "5.2.0",
"@types/yargs": "17.0.32",
"c-kzg": "2.1.2",
Expand All @@ -42,7 +42,7 @@
"dotenv": "16.4.5",
"edit-json-file": "1.8.0",
"ethers": "6.12.0",
"hardhat": "2.22.6",
"hardhat": "2.22.10",
"hardhat-deploy": "0.12.4",
"hardhat-storage-layout": "0.1.7",
"hardhat-tracer": "2.8.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.sksamuel.hoplite.ConfigAlias
import com.sksamuel.hoplite.Masked
import net.consensys.assertIs32Bytes
import net.consensys.decodeHex
import net.consensys.linea.BlockParameter
import net.consensys.linea.assertIsValidAddress
import net.consensys.linea.ethereum.gaspricing.dynamiccap.MAX_FEE_HISTORIES_STORAGE_PERIOD
import net.consensys.linea.ethereum.gaspricing.dynamiccap.MAX_FEE_HISTORY_BLOCK_COUNT
Expand All @@ -18,7 +19,6 @@ import net.consensys.linea.traces.TracingModuleV1
import net.consensys.linea.traces.TracingModuleV2
import net.consensys.linea.web3j.SmartContractErrors
import net.consensys.zkevm.coordinator.clients.prover.ProversConfig
import net.consensys.zkevm.coordinator.clients.smartcontract.BlockParameter
import java.math.BigInteger
import java.net.URL
import java.nio.file.Path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.github.michaelbull.result.getError
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.onSuccess
import com.sksamuel.hoplite.Masked
import net.consensys.linea.BlockParameter
import net.consensys.linea.traces.TracesCountersV1
import net.consensys.linea.traces.TracesCountersV2
import net.consensys.linea.traces.TracingModuleV1
Expand All @@ -14,7 +15,6 @@ import net.consensys.zkevm.coordinator.app.CoordinatorAppCli
import net.consensys.zkevm.coordinator.clients.prover.FileBasedProverConfig
import net.consensys.zkevm.coordinator.clients.prover.ProverConfig
import net.consensys.zkevm.coordinator.clients.prover.ProversConfig
import net.consensys.zkevm.coordinator.clients.smartcontract.BlockParameter
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.fail
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.consensys.linea.contract.l1

import net.consensys.encodeHex
import net.consensys.linea.BlockParameter
import net.consensys.linea.async.toSafeFuture
import net.consensys.linea.contract.LineaRollup
import net.consensys.toBigInteger
import net.consensys.toULong
import net.consensys.zkevm.coordinator.clients.smartcontract.BlockParameter
import net.consensys.zkevm.coordinator.clients.smartcontract.LineaContractVersion
import net.consensys.zkevm.coordinator.clients.smartcontract.LineaRollupSmartContractClientReadOnly
import org.apache.logging.log4j.LogManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.consensys.zkevm.coordinator.clients.smartcontract

import net.consensys.linea.BlockParameter
import net.consensys.zkevm.domain.BlobRecord
import net.consensys.zkevm.domain.ProofToFinalize
import net.consensys.zkevm.ethereum.gaspricing.GasPriceCaps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.consensys.zkevm.ethereum.finalization

import io.vertx.core.Vertx
import net.consensys.linea.BlockParameter
import net.consensys.toBigInteger
import net.consensys.zkevm.PeriodicPollingService
import net.consensys.zkevm.coordinator.clients.smartcontract.BlockParameter
import net.consensys.zkevm.coordinator.clients.smartcontract.LineaRollupSmartContractClientReadOnly
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package net.consensys.zkevm.ethereum.finalization
import io.vertx.core.Vertx
import io.vertx.junit5.VertxExtension
import io.vertx.junit5.VertxTestContext
import net.consensys.zkevm.coordinator.clients.smartcontract.BlockParameter
import net.consensys.linea.BlockParameter
import net.consensys.zkevm.coordinator.clients.smartcontract.LineaRollupSmartContractClientReadOnly
import org.apache.tuweni.bytes.Bytes
import org.apache.tuweni.bytes.Bytes32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import io.vertx.core.Vertx
import io.vertx.junit5.Timeout
import io.vertx.junit5.VertxExtension
import io.vertx.junit5.VertxTestContext
import net.consensys.linea.BlockParameter
import net.consensys.linea.async.toSafeFuture
import net.consensys.linea.contract.AsyncFriendlyTransactionManager
import net.consensys.linea.contract.EIP1559GasProvider
import net.consensys.linea.contract.L2MessageService
import net.consensys.linea.contract.LineaRollupAsyncFriendly
import net.consensys.toBigInteger
import net.consensys.zkevm.coordinator.clients.smartcontract.BlockParameter
import net.consensys.zkevm.coordinator.clients.smartcontract.LineaRollupSmartContractClient
import net.consensys.zkevm.ethereum.ContractsManager
import net.consensys.zkevm.ethereum.L1AccountManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.consensys.zkevm.ethereum.coordination.messageanchoring

import io.vertx.core.Vertx
import net.consensys.linea.BlockParameter
import net.consensys.linea.contract.AsyncFriendlyTransactionManager
import net.consensys.linea.contract.L2MessageService
import net.consensys.zkevm.PeriodicPollingService
import net.consensys.zkevm.coordinator.clients.smartcontract.BlockParameter
import net.consensys.zkevm.coordinator.clients.smartcontract.LineaRollupSmartContractClientReadOnly
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.consensys.zkevm.coordinator.clients.smartcontract
package net.consensys.linea

sealed interface BlockParameter {
fun getTag(): String
Expand Down
Loading

0 comments on commit 60dbae6

Please sign in to comment.