diff --git a/CUSTOMIZE.md b/CUSTOMIZE.md index 1c3f84dc..9c27db9e 100644 --- a/CUSTOMIZE.md +++ b/CUSTOMIZE.md @@ -43,7 +43,6 @@ The links used in the footer can be found here: `./src/consts/links.ts` ### Public assets / Favicons The images and manifest files under `./public` should also be updated. -The current collection was generated with [RealFaviconGenerator](https://realfavicongenerator.net) ### Fonts diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png index a6e60be2..cc5e1bfb 100644 Binary files a/public/android-chrome-192x192.png and b/public/android-chrome-192x192.png differ diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png index 2f14c8d6..2bad607c 100644 Binary files a/public/android-chrome-512x512.png and b/public/android-chrome-512x512.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png index e34a3529..4ae4eefe 100644 Binary files a/public/apple-touch-icon.png and b/public/apple-touch-icon.png differ diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png index eb2b0584..4f1da62c 100644 Binary files a/public/favicon-16x16.png and b/public/favicon-16x16.png differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png index d2c62c00..6d7b10d4 100644 Binary files a/public/favicon-32x32.png and b/public/favicon-32x32.png differ diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index bac1b941..00000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 00000000..6d0e36c1 Binary files /dev/null and b/public/favicon.png differ diff --git a/public/icon.png b/public/icon.png index 2f14c8d6..6d0e36c1 100644 Binary files a/public/icon.png and b/public/icon.png differ diff --git a/public/logos/POSE.jpg b/public/logos/POSE.jpg new file mode 100644 index 00000000..8d8828d7 Binary files /dev/null and b/public/logos/POSE.jpg differ diff --git a/public/logos/USDC.svg b/public/logos/USDC.svg new file mode 100644 index 00000000..697dfda9 --- /dev/null +++ b/public/logos/USDC.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/public/logos/bitcoin.svg b/public/logos/bitcoin.svg new file mode 100644 index 00000000..f9926c31 --- /dev/null +++ b/public/logos/bitcoin.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/public/logos/tether.svg b/public/logos/tether.svg new file mode 100644 index 00000000..533bcaa1 --- /dev/null +++ b/public/logos/tether.svg @@ -0,0 +1 @@ +tether-usdt \ No newline at end of file diff --git a/src/components/layout/AppLayout.tsx b/src/components/layout/AppLayout.tsx index ad7db5f9..6d5703f0 100644 --- a/src/components/layout/AppLayout.tsx +++ b/src/components/layout/AppLayout.tsx @@ -10,7 +10,7 @@ export function AppLayout({ children }: PropsWithChildren) { {/* https://nextjs.org/docs/messages/no-document-viewport-meta */} - Hyperlane Warp Route Template UI + Nautilus Bridge
diff --git a/src/components/nav/Footer.tsx b/src/components/nav/Footer.tsx index 7af62209..41fb214b 100644 --- a/src/components/nav/Footer.tsx +++ b/src/components/nav/Footer.tsx @@ -18,9 +18,9 @@ export function Footer() {

- Go interchain + Bridge ZBC with the Nautilus Chain Bridge
- with Hyperlane + Build with Hyperlane

diff --git a/src/components/nav/Header.tsx b/src/components/nav/Header.tsx index 96eae461..e22f343e 100644 --- a/src/components/nav/Header.tsx +++ b/src/components/nav/Header.tsx @@ -2,8 +2,6 @@ import Image from 'next/image'; import Link from 'next/link'; import { WalletControlBar } from '../../features/wallet/WalletControlBar'; -import Logo from '../../images/logos/app-logo.svg'; -import Name from '../../images/logos/app-name.svg'; import Title from '../../images/logos/app-title.svg'; export function Header() { @@ -11,8 +9,6 @@ export function Header() {
- -
diff --git a/src/components/tip/TipCard.tsx b/src/components/tip/TipCard.tsx index 0b1c69c0..8009b2f7 100644 --- a/src/components/tip/TipCard.tsx +++ b/src/components/tip/TipCard.tsx @@ -1,40 +1,12 @@ -import Image from 'next/image'; -import { useState } from 'react'; - -import { IconButton } from '../../components/buttons/IconButton'; -import { config } from '../../consts/config'; -import { links } from '../../consts/links'; -import InfoCircle from '../../images/icons/info-circle.svg'; -import XCircle from '../../images/icons/x-circle.svg'; - export function TipCard() { - const [show, setShow] = useState(config.showTipBox); - if (!show) return null; return ( -
-

Bridge Tokens with Hyperlane Warp Routes!

+
+

⚠️ Nautilus Chain is shutting down September 6

-

- Warp Routes make it easy to permissionlessly take your tokens interchain. Fork this - template to get started! +

+ You must move your funds from Nautilus Chain to BSC or Solana, otherwise the funds will be + lost.

- - - Learn More - -
-
- setShow(false)} - title="Hide tip" - classes="hover:rotate-90" - />
); diff --git a/src/consts/chains.ts b/src/consts/chains.ts index 47843a46..3ad71c2a 100644 --- a/src/consts/chains.ts +++ b/src/consts/chains.ts @@ -1,4 +1,5 @@ -import { ChainMap, ChainMetadata, chainMetadata } from '@hyperlane-xyz/sdk'; +import { ChainMap, ChainMetadata, ExplorerFamily, chainMetadata } from '@hyperlane-xyz/sdk'; +import { ProtocolType } from '@hyperlane-xyz/utils'; // A map of chain names to ChainMetadata export const chains: ChainMap = { @@ -36,7 +37,7 @@ export const chains: ChainMap = { http: process.env.NEXT_PUBLIC_SOLANA_RPC_URL || 'https://api.mainnet-beta.solana.com', }, ], - mailbox: 'TODO', + mailbox: 'Ge9atjAc3Ltu91VTbNpJDCjZ9CFxFyck4h3YBcTF9XPq', }, solanatestnet: { ...chainMetadata.solanatestnet, @@ -46,4 +47,55 @@ export const chains: ChainMap = { ...chainMetadata.solanadevnet, mailbox: '4v25Dz9RccqUrTzmfHzJMsjd1iVoNrWzeJ4o6GYuJrVn', }, + proteustestnet: { + chainId: 88002, + domainId: 88002, + name: 'proteustestnet', + protocol: ProtocolType.Ethereum, + displayName: 'Proteus Testnet', + displayNameShort: 'Proteus', + nativeToken: { + name: 'Zebec', + symbol: 'ZBC', + decimals: 18, + }, + rpcUrls: [ + { + http: 'https://api.proteus.nautchain.xyz/solana', + }, + ], + blockExplorers: [ + { + name: 'Proteus Explorer', + url: 'https://proteus.nautscan.com/proteus', + apiUrl: 'https://proteus.nautscan.com/proteus', + family: ExplorerFamily.Other, + }, + ], + mailbox: '0x918D3924Fad8F71551D9081172e9Bb169745461e', + }, + nautilus: { + chainId: 22222, + domainId: 22222, + name: 'nautilus', + protocol: ProtocolType.Ethereum, + displayName: 'Nautilus', + logoURI: 'https://www.nautchain.xyz/media/nuatchain_media_kit/naut_sq.png', + nativeToken: { + name: 'Zebec', + symbol: 'ZBC', + decimals: 18, + }, + rpcUrls: [ + { + http: 'https://api.evm.nautilus.prod.eclipsenetwork.xyz', + }, + ], + blocks: { + confirmations: 1, + reorgPeriod: 1, + estimateBlockTime: 1, + }, + mailbox: '0xF59557dfacDc5a1cb8A36Af43aA4819a6A891e88', + }, }; diff --git a/src/consts/config.ts b/src/consts/config.ts index 39fa836b..60f63b52 100644 --- a/src/consts/config.ts +++ b/src/consts/config.ts @@ -4,6 +4,7 @@ const explorerApiKeys = JSON.parse(process?.env?.EXPLORER_API_KEYS || '{}'); const walletConnectProjectId = process?.env?.NEXT_PUBLIC_WALLET_CONNECT_ID || ''; const withdrawalWhitelist = process?.env?.NEXT_PUBLIC_BLOCK_WITHDRAWAL_WHITELIST || ''; const transferBlacklist = process?.env?.NEXT_PUBLIC_TRANSFER_BLACKLIST || ''; +const destinationBlacklist = process?.env?.NEXT_PUBLIC_DESTINATION_BLACKLIST || ''; interface Config { debug: boolean; // Enables some debug features in the app @@ -14,15 +15,18 @@ interface Config { walletConnectProjectId: string; // Project ID provided by walletconnect withdrawalWhitelist: string; // comma-separated list of CAIP2 chain IDs to which transfers are supported transferBlacklist: string; // comma-separated list of routes between which transfers are disabled. Expects Caip2Id-Caip2Id (e.g. ethereum:1-sealevel:1399811149) + // This is slightly redundant with the transfer blacklist above but we want to block transfers INTO nautilus but not out, which is different + destinationBlacklist: string; // comma-separated list of CAIP2 chain IDs to which transfers are disabled } export const config: Config = Object.freeze({ debug: isDevMode, version, explorerApiKeys, - showTipBox: true, - showDisabledTokens: true, + showTipBox: !!withdrawalWhitelist, + showDisabledTokens: false, walletConnectProjectId, withdrawalWhitelist, transferBlacklist, + destinationBlacklist, }); diff --git a/src/consts/links.ts b/src/consts/links.ts index cd25d672..aad2c7ff 100644 --- a/src/consts/links.ts +++ b/src/consts/links.ts @@ -6,6 +6,6 @@ export const links = { docs: 'https://docs.hyperlane.xyz', gasDocs: 'https://docs.hyperlane.xyz/docs/protocol/interchain-gas-payments', chains: 'https://docs.hyperlane.xyz/docs/resources/domains', - twitter: 'https://twitter.com/hyperlane_xyz', + twitter: 'https://twitter.com/hyperlane', blog: 'https://medium.com/hyperlane', }; diff --git a/src/consts/tokens.ts b/src/consts/tokens.ts index 3194d124..fcb975be 100644 --- a/src/consts/tokens.ts +++ b/src/consts/tokens.ts @@ -1,38 +1,95 @@ import { WarpTokenConfig } from '../features/tokens/types'; export const tokenList: WarpTokenConfig = [ - // Example collateral token for an EVM chain + // bsc { type: 'collateral', - chainId: 5, - address: '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6', - hypCollateralAddress: '0x145de8760021c4ac6676376691b78038d3DE9097', - name: 'Weth', - symbol: 'WETH', - decimals: 18, - logoURI: '/logos/weth.png', // See public/logos/ + chainId: 56, + address: '0x37a56cdcD83Dce2868f721De58cB3830C44C6303', + hypCollateralAddress: '0xC27980812E2E66491FD457D488509b7E04144b98', + name: 'Zebec', + symbol: 'ZBC', + decimals: 9, + logoURI: '/logos/zebec.png', }, - // Example native token for an EVM chain + // nautilus { type: 'native', - chainId: 11155111, - name: 'Ether', + chainId: 22222, + hypNativeAddress: '0x4501bBE6e731A4bC5c60C03A77435b2f6d5e9Fe7', + name: 'Zebec', + symbol: 'ZBC', + decimals: 18, + logoURI: '/logos/zebec.png', + }, + + // solana + { + type: 'collateral', + chainId: 1399811149, + address: 'wzbcJyhGhQDLTV1S99apZiiBdE4jmYfbw99saMMdP59', + hypCollateralAddress: 'EJqwFjvVJSAxH8Ur2PYuMfdvoJeutjmH6GkoEFQ4MdSa', + name: 'Zebec', + symbol: 'wZBC', + decimals: 9, + isSpl2022: false, + logoURI: '/logos/zebec.png', + }, + + { + chainId: 56, + name: 'Ethereum Token', symbol: 'ETH', decimals: 18, - hypNativeAddress: '0xEa44A29da87B5464774978e6A4F4072A4c048949', + type: 'collateral', + address: '0x2170ed0880ac9a755fd29b2688956bd959f933f8', + hypCollateralAddress: '0x2a6822dc5639b3fe70de6b65b9ff872e554162fa', + isNft: false, logoURI: '/logos/weth.png', }, - - // Example NFT (ERC721) token for an EVM chain { - chainId: 5, - name: 'Test721', - symbol: 'TEST721', - decimals: 0, + chainId: 56, + name: 'USD Coin', + symbol: 'USDC', + decimals: 18, + type: 'collateral', + address: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d', + hypCollateralAddress: '0x6937a62f93a56D2AE9392Fa1649b830ca37F3ea4', + isNft: false, + logoURI: '/logos/USDC.svg', + }, + { + chainId: 56, + name: 'Tether USD', + symbol: 'USDT', + decimals: 18, + type: 'collateral', + address: '0x55d398326f99059ff775485246999027b3197955', + hypCollateralAddress: '0xb7d36720a16A1F9Cfc1f7910Ac49f03965401a36', + isNft: false, + logoURI: '/logos/tether.svg', + }, + { + chainId: 56, + name: 'BTCB Token', + symbol: 'BTCB', + decimals: 18, + type: 'collateral', + address: '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c', + hypCollateralAddress: '0xB3545006A532E8C23ebC4e33d5ab2232Cafc35Ad', + isNft: false, + logoURI: '/logos/bitcoin.svg', + }, + { + chainId: 22222, + name: 'PoseiSwap Token', + symbol: 'POSE', + decimals: 18, type: 'collateral', - address: '0x77566D540d1E207dFf8DA205ed78750F9a1e7c55', - hypCollateralAddress: '0xDcbc0faAA269Cf649AC8950838664BB7B355BD6B', - isNft: true, + address: '0xB883935B47B0508b479CEE642DB4b9E2de387920', + hypCollateralAddress: '0x79B1257BDBCaeF98Da685A7c225b6e61a119Cb7a', + isNft: false, + logoURI: '/logos/POSE.jpg', }, ]; diff --git a/src/features/transfer/TransferTokenForm.tsx b/src/features/transfer/TransferTokenForm.tsx index 96ef5b41..260b2db9 100644 --- a/src/features/transfer/TransferTokenForm.tsx +++ b/src/features/transfer/TransferTokenForm.tsx @@ -538,6 +538,13 @@ function validateFormValues( return { destinationCaip2Id: 'Route is not currently allowed' }; } + if ( + config.destinationBlacklist && + config.destinationBlacklist.split(',').includes(destinationCaip2Id) + ) { + return { destinationCaip2Id: 'Transfers to this chain are not allowed' }; + } + return {}; } @@ -550,8 +557,8 @@ function useFormInitialValues( (routes) => routes.length, )[0][0]; return { - originCaip2Id: firstRoute.originCaip2Id, - destinationCaip2Id: firstRoute.destCaip2Id, + originCaip2Id: firstRoute.destCaip2Id, + destinationCaip2Id: firstRoute.originCaip2Id, amount: '', tokenCaip19Id: '' as TokenCaip19Id, recipientAddress: '', diff --git a/src/features/wallet/EvmWalletContext.tsx b/src/features/wallet/EvmWalletContext.tsx index b675c4cb..438a57b7 100644 --- a/src/features/wallet/EvmWalletContext.tsx +++ b/src/features/wallet/EvmWalletContext.tsx @@ -3,8 +3,7 @@ import '@rainbow-me/rainbowkit/styles.css'; import { argentWallet, coinbaseWallet, - injectedWallet, - ledgerWallet, + injectedWallet, // ledgerWallet, metaMaskWallet, omniWallet, rainbowWallet, @@ -35,7 +34,7 @@ const connectors = connectorsForWallets([ metaMaskWallet(connectorConfig), injectedWallet(connectorConfig), walletConnectWallet(connectorConfig), - ledgerWallet(connectorConfig), + // ledgerWallet(connectorConfig), ], }, { diff --git a/src/features/wallet/SolanaWalletContext.tsx b/src/features/wallet/SolanaWalletContext.tsx index 09e88382..0a960731 100644 --- a/src/features/wallet/SolanaWalletContext.tsx +++ b/src/features/wallet/SolanaWalletContext.tsx @@ -16,7 +16,7 @@ import { logger } from '../../utils/logger'; export function SolanaWalletContext({ children }: PropsWithChildren) { // TODO support multiple networks - const network = WalletAdapterNetwork.Devnet; + const network = WalletAdapterNetwork.Mainnet; const endpoint = useMemo(() => clusterApiUrl(network), [network]); const wallets = useMemo( () => [ diff --git a/src/images/logos/app-logo.svg b/src/images/logos/app-logo.svg index 39b16cad..6f04b152 100644 --- a/src/images/logos/app-logo.svg +++ b/src/images/logos/app-logo.svg @@ -1 +1,31 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/images/logos/app-title.svg b/src/images/logos/app-title.svg index 073c8aae..5721172e 100644 --- a/src/images/logos/app-title.svg +++ b/src/images/logos/app-title.svg @@ -1 +1,26 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index fe391a3f..a095b645 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -11,32 +11,23 @@ export default function Document() { - + - - - + + + - + - + - +
diff --git a/src/utils/links.ts b/src/utils/links.ts index 9045e9b8..babdec26 100644 --- a/src/utils/links.ts +++ b/src/utils/links.ts @@ -7,6 +7,8 @@ import { getMultiProvider } from '../features/multiProvider'; // TODO test with solana chain config, or disallow it export function getHypExplorerLink(originCaip2Id: ChainCaip2Id, msgId?: string) { + // TODO Disabling this for eclipse for now + if ('true') return null; if (!originCaip2Id || !msgId) return null; const baseLink = `${links.explorer}/message/${msgId}`; if (isPermissionlessChain(originCaip2Id)) {