diff --git a/components/Drawer/index.tsx b/components/Drawer/index.tsx index 860eb764..b486bf6f 100644 --- a/components/Drawer/index.tsx +++ b/components/Drawer/index.tsx @@ -1,12 +1,13 @@ import { DrawerItem } from "@layouts/main"; -import { Box, Flex, Link as A, Text } from "@livepeer/design-system"; +import { Box, Flex, Link as A } from "@livepeer/design-system"; +import { BRIDGE_LPT_URL, GET_LPT_URL } from "constants/links"; import { IS_L2 } from "lib/chains"; import Link from "next/link"; import Router, { useRouter } from "next/router"; import { useEffect } from "react"; import Account from "../Account"; -import LlamaswapModal from "../LlamaswapModal"; +import EmbedModal from "../EmbedModal"; import Logo from "../Logo"; const Index = ({ @@ -159,15 +160,20 @@ const Index = ({ Docs - Get LPT @@ -176,15 +182,49 @@ const Index = ({ > - + + + + Bridge LPT + + } + > + + { +const EmbedModal = ({ trigger, children }) => { return ( {trigger} @@ -11,4 +11,4 @@ const Index = ({ trigger, children }) => { ); }; -export default Index; +export default EmbedModal; diff --git a/constants/links.ts b/constants/links.ts new file mode 100644 index 00000000..4c82ec32 --- /dev/null +++ b/constants/links.ts @@ -0,0 +1,9 @@ +// LPT token addresses used to pre-fill external acquisition flows. +const ARBITRUM_LPT_ADDRESS = "0x289ba1701c2f088cf0faf8b3705246331cb8a839"; +const ETHEREUM_LPT_ADDRESS = "0x58b6a8a3302369daec383334672404ee733ab239"; + +// Swap ETH -> LPT on Arbitrum via the DefiLlama aggregator. +export const GET_LPT_URL = `https://swap.defillama.com/?chain=arbitrum&from=0x0000000000000000000000000000000000000000&to=${ARBITRUM_LPT_ADDRESS}`; + +// Bridge LPT from Ethereum to Arbitrum One via the Arbitrum bridge portal. +export const BRIDGE_LPT_URL = `https://portal.arbitrum.io/bridge?destinationChain=arbitrum-one&sourceChain=ethereum&token=${ETHEREUM_LPT_ADDRESS}`; diff --git a/layouts/main.tsx b/layouts/main.tsx index e3c203f2..9c7659de 100644 --- a/layouts/main.tsx +++ b/layouts/main.tsx @@ -39,6 +39,7 @@ import { useProtocolQuery, useTreasuryProposalsQuery, } from "apollo"; +import { BRIDGE_LPT_URL, GET_LPT_URL } from "constants/links"; import { BigNumber } from "ethers"; import { CHAIN_INFO, DEFAULT_CHAIN_ID } from "lib/chains"; import dynamic from "next/dynamic"; @@ -730,10 +731,16 @@ const Layout = ({ children, title = "Livepeer Explorer" }) => { Get LPT + + Bridge LPT +