Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/fallback/src/lib/wagmi-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
arbitrum,
base,
corn,
etherlink,
flame,
fraxtal,
hemi,
Expand Down Expand Up @@ -58,6 +59,7 @@ const chains = [
// NOTE: Camp is disabled because RPC rate limits are too strict
// customChains.basecamp,
corn,
etherlink,
flame,
fraxtal,
hemi,
Expand Down Expand Up @@ -100,6 +102,10 @@ const transports: Record<(typeof chains)[number]["id"], Transport> = {
{ url: "https://optimism.drpc.org", batch: false },
{ url: "https://optimism.lava.build", batch: false },
]),
[etherlink.id]: createFallbackTransport([
{ url: "https://rpc.ankr.com/etherlink_mainnet", batch: { batchSize: 10, wait: 20 } },
{ url: "https://node.mainnet.etherlink.com", batch: { batchSize: 10, wait: 20 } },
]),
[arbitrum.id]: createFallbackTransport([
{ url: "https://arbitrum.gateway.tenderly.co", batch: { batchSize: 10 } },
{ url: "https://rpc.ankr.com/arbitrum", batch: { batchSize: 10 } },
Expand Down
14 changes: 13 additions & 1 deletion apps/lite/src/lib/constants.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SafeLink } from "@morpho-org/uikit/components/safe-link";
import { type Deployments } from "@morpho-org/uikit/lib/deployments";
import { ReactNode } from "react";
import { optimism, plumeMainnet, polygon, worldchain } from "wagmi/chains";
import { optimism, plumeMainnet, polygon, worldchain, etherlink } from "wagmi/chains";

export const APP_DETAILS = {
// NOTE: Should always match the title in `index.html` (won't break anything, but should be correct)
Expand Down Expand Up @@ -53,6 +53,18 @@ export const BANNERS: Record<keyof Deployments, { color: string; text: ReactNode
</span>
),
},
[etherlink.id]: {
color: "bg-[rgba(56,255,156,0.8)]",
text: (
<span className="grow py-2 text-center">
Access additional features and explore incentives via the interfaces offered by{" "}
<SafeLink className="underline" href="https://oku.trade/">
Oku
</SafeLink>
.
</span>
),
},
[optimism.id]: {
color: "bg-red-500",
text: (
Expand Down
6 changes: 6 additions & 0 deletions apps/lite/src/lib/wagmi-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
arbitrum,
base,
corn,
etherlink,
fraxtal,
hemi,
ink,
Expand Down Expand Up @@ -85,6 +86,7 @@ const chains = [
// lite support (alphabetical)
// arbitrum,
// corn,
etherlink,
// fraxtal,
// hemi,
// ink,
Expand Down Expand Up @@ -114,6 +116,10 @@ const transports: { [K in (typeof chains)[number]["id"]]: Transport } & { [k: nu
{ url: "https://mainnet.base.org", batch: { batchSize: 10 } },
{ url: "https://base.lava.build", batch: false },
]),
[etherlink.id]: createFallbackTransport([
...createPrivateAnkrHttp("etherlink_mainnet"),
...etherlink.rpcUrls.default.http.map((url) => ({ url, batch: { batchSize: 10, wait: 20 } })),
]),
[ink.id]: createFallbackTransport([
...createPrivateAlchemyHttp("ink-mainnet"),
{ url: "https://ink.gateway.tenderly.co", batch: { batchSize: 10 } },
Expand Down
8 changes: 8 additions & 0 deletions packages/uikit/src/assets/chains/etherlink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/uikit/src/components/chain-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
arbitrum,
base,
corn,
etherlink,
flame,
fraxtal,
hemi,
Expand All @@ -26,6 +27,7 @@ import BaseChainSvg from "@/assets/chains/base.svg?react";
import CampSvg from "@/assets/chains/camp.svg?react";
import CornSvg from "@/assets/chains/corn.svg?react";
import EthereumChainSvg from "@/assets/chains/ethereum.svg?react";
import EtherlinkSvg from "@/assets/chains/etherlink.svg?react";
import FlameSvg from "@/assets/chains/flame.svg?react";
import FraxtalSvg from "@/assets/chains/fraxtal.svg?react";
import HemiSvg from "@/assets/chains/hemi.svg?react";
Expand Down Expand Up @@ -55,6 +57,8 @@ export function ChainIcon({ id }: { id: number | undefined }): JSX.Element {
return <CampSvg />;
case corn.id:
return <CornSvg />;
case etherlink.id:
return <EtherlinkSvg />;
case flame.id:
return <FlameSvg />;
case fraxtal.id:
Expand Down
5 changes: 4 additions & 1 deletion packages/uikit/src/hooks/use-contract-events/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type AnnotatedTransport = EIP1193Transport & {
// opting not to implement them for now.
export type Strategy = AnnotatedTransport[];

const BLOCK_BINS = [1n, 1_000n, 2_000n, 5_000n, 10_000n, "unconstrained" as const];
const BLOCK_BINS = [1n, 500n, 1_000n, 2_000n, 5_000n, 10_000n, "unconstrained" as const];
const ORDINARY_RETRIES = 4; // Num of `eth_getLogs` retries in bins that have succeeded before
const EXPLORATORY_RETRIES = 1; // Num of `eth_getLogs` retries in untested bins
const ORDINARY_RETRY_DELAY = 50; // Delay to pass to viem if retrying in bins that have have succeeded before (ms)
Expand All @@ -50,6 +50,9 @@ function supportsNumBlocks(transportId: string, numBlocks: bigint | "unconstrain
) {
return true;
}
if (transportId.includes("etherlink")) {
return numBlocks !== "unconstrained" && numBlocks <= 500n;
}
if (
transportId.includes("drpc") ||
transportId.includes("ankr") ||
Expand Down
5 changes: 5 additions & 0 deletions packages/uikit/src/lib/deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
arbitrum,
base,
corn,
etherlink,
flame,
fraxtal,
hemi,
Expand Down Expand Up @@ -106,6 +107,10 @@ export const DEPLOYMENTS: Deployments = {
Morpho: { address: "0xE75Fc5eA6e74B824954349Ca351eb4e671ADA53a", fromBlock: 6440817n },
MetaMorphoV1_1Factory: { address: "0x7026b436f294e560b3C26E731f5cac5992cA2B33", fromBlock: 6440899n },
},
[etherlink.id]: {
Morpho: { address: "0xbCE7364E63C3B13C73E9977a83c9704E2aCa876e", fromBlock: 21047448n },
MetaMorphoV1_1Factory: { address: "0x997a79c3C04c5B9eb27d343ae126bcCFb5D74781", fromBlock: 21050315n },
},
[flame.id]: {
Morpho: { address: "0x63971484590b054b6Abc4FEe9F31BC6F68CfeC04", fromBlock: 5991116n },
MetaMorphoV1_1Factory: { address: "0xf2BD176D3A89f6E9f6D0c7F17C4Ae6A3515007a8", fromBlock: 5991236n },
Expand Down