Skip to content
Merged
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
43 changes: 43 additions & 0 deletions components/BridgeContent/HyperlaneBridge/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React, { memo } from 'react';
import { Box, Button, Typography } from '@mui/material';
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
import { useTranslation } from 'react-i18next';

import { track } from 'utils/mixpanel';
import { EXA_BRIDGE_URL } from 'utils/const';

const HyperlaneBridge = () => {
const { t } = useTranslation();

return (
<Box
display="flex"
flexDirection={{ xs: 'column', sm: 'row' }}
alignItems={{ xs: 'start', sm: 'center' }}
justifyContent="space-between"
gap={2}
p={3}
borderRadius={1}
bgcolor="components.bg"
boxShadow="0px 3px 4px 0px #61666B1A"
>
<Typography fontSize={16}>
{t('Bridge your EXA tokens between OP Mainnet and Base, powered by Hyperlane.')}
</Typography>
<Button
component="a"
href={EXA_BRIDGE_URL}
target="_blank"
rel="noreferrer noopener"
variant="contained"
endIcon={<OpenInNewIcon sx={{ height: 14, width: 14 }} />}
sx={{ whiteSpace: 'nowrap', minWidth: 168 }}
onClick={() => track('Button Clicked', { location: 'Bridge', name: 'hyperlane bridge', href: EXA_BRIDGE_URL })}
>
{t('Bridge EXA')}
</Button>
</Box>
);
};

export default memo(HyperlaneBridge);
7 changes: 7 additions & 0 deletions components/BridgeContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ActiveRoute } from 'types/Bridge';
import { useWeb3 } from 'hooks/useWeb3';
import { fetchActiveRoutes } from './utils';
import SocketTxHistory from './SocketTxHistory';
import HyperlaneBridge from './HyperlaneBridge';

const BridgeContent = () => {
const [activeRoutes, setActiveRoutes] = useState<ActiveRoute[] | undefined>();
Expand All @@ -26,6 +27,12 @@ const BridgeContent = () => {

return (
<Box display="flex" justifyContent="center" flexDirection="column" mx="auto" mt={5} gap={2}>
<Box mb={4}>
<Typography variant="h2" fontSize={24} mb={2}>
{t('EXA Token Bridge')}
</Typography>
<HyperlaneBridge />
Comment thread
franm91 marked this conversation as resolved.
</Box>
<Box>
<Typography variant="h2" fontSize={24} mb={2}>
{t('Bridge & Swap')}
Expand Down
4 changes: 4 additions & 0 deletions i18n/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@
"Provide liquidity to the EXA/wETH pool.": "Proporciona liquidez al pool EXA/wETH.",
"Go to Velodrome": "Ir a Velodrome",
"Bridge & Swap with Socket": "Bridge & Swap con Socket",
"Bridge EXA with Hyperlane": "Pase EXA con Hyperlane",
"Bridge your EXA tokens between OP Mainnet and Base, powered by Hyperlane.": "Pase sus tokens EXA entre OP Mainnet y Base, impulsado por Hyperlane.",
"Bridge EXA": "Pase EXA",
"EXA Token Bridge": "EXA Token Bridge",
Comment thread
franm91 marked this conversation as resolved.
"Seamlessly bridge and swap assets to OP Mainnet from many different networks.": "Pase y cambie activos de manera fluida a OP Mainnet desde muchas redes diferentes.",
"Cross Network": "Multired",
"Featured Strategies": "Estrategias Destacadas",
Expand Down
26 changes: 26 additions & 0 deletions pages/strategies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { useWeb3 } from 'hooks/useWeb3';
import FeaturedStrategies from 'components/strategies/FeaturedStrategies';
import { useModal } from '../contexts/ModalContext';
import { track } from 'utils/mixpanel';
import { EXA_BRIDGE_URL } from 'utils/const';

const Strategies: NextPage = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -422,6 +423,31 @@ const Strategies: NextPage = () => {
const thirdPartyStrategies: (Strategy & { chainId?: number })[] = useMemo(
() =>
[
{
chainId: optimism.id,
title: t('Bridge EXA with Hyperlane'),
description: t('Bridge your EXA tokens between OP Mainnet and Base, powered by Hyperlane.'),
tags: [{ text: t('Cross Network') }, { text: t('Basic'), size: 'small' as const }],
button: (
<a href={EXA_BRIDGE_URL} target="_blank" rel="noreferrer noopener" style={{ width: '100%' }}>
<Button
Comment thread
franm91 marked this conversation as resolved.
Comment thread
franm91 marked this conversation as resolved.
fullWidth
variant="contained"
onClick={() =>
track('Button Clicked', {
location: 'Strategies',
name: 'exa bridge',
isNew: false,
href: EXA_BRIDGE_URL,
})
}
>
{t('Bridge EXA')}
</Button>
</a>
),
imgPath: '/img/strategies/hyperlane-logo.svg',
},
{
title: t('Bridge & Swap with Socket'),
description: t('Seamlessly bridge and swap assets to OP Mainnet from many different networks.'),
Expand Down
3 changes: 3 additions & 0 deletions public/img/strategies/hyperlane-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions utils/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ export const DEFAULT_AMOUNT = BigInt(numbers.defaultAmount);
export const ETH_ROUTER_SLIPPAGE = parseUnits(String(numbers.ethRouterSlippage), 18);

export const GAS_LIMIT_MULTIPLIER = parseUnits(String(numbers.gasLimitMultiplier), 18);

export const EXA_BRIDGE_URL = 'https://bridge.exact.ly/';
Loading