Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Eclipse tokens and chains #43

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0294a61
Make name, symbol, decimals optional in config
jmrossy Aug 10, 2023
eaf3793
Revert token config changes
jmrossy Aug 10, 2023
efe3bec
Use chain metadata for token protocol
jmrossy Aug 13, 2023
940a211
Update tokendata schema
jmrossy Aug 13, 2023
fc1596b
Setup Eclipse tokens and chains
jmrossy Aug 13, 2023
898bcd6
Fix solanadevnet token config
jmrossy Aug 13, 2023
eb0b2a1
Fetch remote router decimal values during init
jmrossy Aug 13, 2023
ec3a863
Merge branch 'rossy/multi-collateral' into eclipse
jmrossy Aug 13, 2023
a36f1c9
ZBC symbol, hide routes we don't want to see, fix Solana remote balan…
tkporter Aug 14, 2023
fb7da5a
Fix check if there's sufficient collateral at the dest
tkporter Aug 14, 2023
07531fd
Remove Hyperlane explorer link
jmrossy Aug 14, 2023
9aa7126
Merge pull request #44 from hyperlane-xyz/trevor/eclipse-testnet
nambrot Aug 14, 2023
1066e3f
Merge branch 'eclipse' into rossy/eclipse-fixes
nambrot Aug 14, 2023
1c4cdeb
Merge pull request #45 from hyperlane-xyz/rossy/eclipse-fixes
nambrot Aug 14, 2023
35c7246
Catch destination balance checking
nambrot Aug 14, 2023
9a63c29
Merge pull request #46 from hyperlane-xyz/nambrot/catch-destination-b…
nambrot Aug 14, 2023
3f9b6a5
Fix lint
nambrot Aug 14, 2023
8cf1808
Brand Nautilus
nambrot Aug 14, 2023
577670d
Merge pull request #47 from hyperlane-xyz/nambrot/brand-naut
nambrot Aug 14, 2023
5a6e13d
Support deposit-only mode
nambrot Aug 14, 2023
b02b4d6
Reverse direction
nambrot Aug 15, 2023
af7ddaf
Fix collateral checking to Solana; fix nautilus tx explorer url
tkporter Aug 15, 2023
30f7a02
Set Rainbowkit initialChain to Proteus
jmrossy Aug 15, 2023
5e99116
Merge pull request #48 from hyperlane-xyz/nambrot/deposit-only-mode
nambrot Aug 15, 2023
a5f960b
Merge branch 'main' into eclipse
jmrossy Aug 21, 2023
0ebb55f
Merge branch 'eclipse' of github.com:hyperlane-xyz/hyperlane-warp-ui-…
jmrossy Aug 21, 2023
49cda5b
Fix build error in balances
jmrossy Aug 21, 2023
1014966
Setup Jest unit testing
jmrossy Aug 22, 2023
4d4dffe
Port fixes for collateral balance checking
jmrossy Aug 22, 2023
994b7e0
Merge branch 'improved-multi-collateral' into eclipse
jmrossy Aug 22, 2023
c2bd6da
Remove balance and route hacks
jmrossy Aug 22, 2023
c9e2e1b
Remove dead const
jmrossy Aug 22, 2023
e791e29
Fix build error from merge conflict
jmrossy Aug 22, 2023
41f93b4
Merge branch 'main' into eclipse
jmrossy Aug 25, 2023
0235fc0
Update zebec token name and logo
jmrossy Aug 25, 2023
11acfbd
Merge branch 'main' into eclipse
jmrossy Aug 25, 2023
a2205f9
Merge branch 'main' into eclipse
jmrossy Sep 5, 2023
8386af1
Merge branch 'main' into eclipse
jmrossy Sep 13, 2023
38bb74e
Merge branch 'main' into eclipse
jmrossy Sep 15, 2023
a2f2895
Merge branch 'main' into eclipse
jmrossy Oct 2, 2023
4c4b1e0
Merge branch 'main' into eclipse
jmrossy Oct 3, 2023
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
4 changes: 2 additions & 2 deletions src/components/nav/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export function Footer() {
</div>
<div className="hidden sm:flex flex-col ml-3">
<p className="leading-6">
Go interchain
Bridge ZBC with the Nautilus Chain Bridge
<br />
with Hyperlane
Build with <Link href="https://www.hyperlane.xyz">Hyperlane</Link>
</p>
</div>
</div>
Expand Down
4 changes: 0 additions & 4 deletions src/components/nav/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@ 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() {
return (
<header className="pt-3 pb-2 w-full">
<div className="flex items-start justify-between">
<Link href="/" className="py-2 flex items-center">
<Image src={Logo} width={19} alt="" />
<Image src={Name} width={110} alt="" className="hidden sm:block mt-0.5 ml-2" />
<Image src={Title} width={185} alt="" className="mt-0.5 ml-2 pb-px" />
</Link>
<div className="flex flex-col items-end md:flex-row-reverse md:items-start gap-2">
Expand Down
6 changes: 3 additions & 3 deletions src/components/tip/TipCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export function TipCard() {
if (!show) return null;
return (
<div className="relative px-3 py-3 w-100 sm:w-[31rem] bg-blue-500 shadow-lg rounded opacity-95">
<h2 className="text-white sm:text-lg">Bridge Tokens with Hyperlane Warp Routes!</h2>
<h2 className="text-white sm:text-lg"> ⚠️ Nautilus Bridge is in deposit-only mode.</h2>
<div className="flex items-end justify-between">
<p className="text-white mt-1.5 text-xs sm:text-sm max-w-[70%]">
Warp Routes make it easy to permissionlessly take your tokens interchain. Fork this
template to get started!
Currently, you can bridge from BSC and Solana to Nautilus. Transfers originating Nautilus
are expected to go live September 1st.
</p>
<a
href={links.github}
Expand Down
30 changes: 29 additions & 1 deletion src/consts/chains.ts
Original file line number Diff line number Diff line change
@@ -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<ChainMetadata & { mailbox?: Address }> = {
Expand Down Expand Up @@ -46,4 +47,31 @@ export const chains: ChainMap<ChainMetadata & { mailbox?: Address }> = {
...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',
},
};
4 changes: 2 additions & 2 deletions src/consts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const config: Config = Object.freeze({
debug: isDevMode,
version,
explorerApiKeys,
showTipBox: true,
showDisabledTokens: true,
showTipBox: !!withdrawalWhitelist,
showDisabledTokens: false,
walletConnectProjectId,
withdrawalWhitelist,
});
43 changes: 22 additions & 21 deletions src/consts/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
import { WarpTokenConfig } from '../features/tokens/types';

export const tokenList: WarpTokenConfig = [
// Example collateral token for an EVM chain
// bsctestnet
{
type: 'collateral',
chainId: 5,
address: '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6',
hypCollateralAddress: '0x145de8760021c4ac6676376691b78038d3DE9097',
name: 'Weth',
symbol: 'WETH',
chainId: 97,
address: '0x64544969ed7ebf5f083679233325356ebe738930',
hypCollateralAddress: '0x31b5234A896FbC4b3e2F7237592D054716762131',
symbol: 'wZBC',
name: 'Zebec',
decimals: 18,
logoURI: '/logos/weth.png', // See public/logos/
logoURI: '/logos/zebec.png',
},

// Example native token for an EVM chain
// proteustestnet
{
type: 'native',
chainId: 11155111,
name: 'Ether',
symbol: 'ETH',
chainId: 88002,
hypNativeAddress: '0x34A9af13c5555BAD0783C220911b9ef59CfDBCEf',
symbol: 'wZBC',
name: 'Zebec',
decimals: 18,
hypNativeAddress: '0xEa44A29da87B5464774978e6A4F4072A4c048949',
logoURI: '/logos/weth.png',
logoURI: '/logos/zebec.png',
},

// Example NFT (ERC721) token for an EVM chain
// solanadevnet
{
chainId: 5,
name: 'Test721',
symbol: 'TEST721',
decimals: 0,
type: 'collateral',
address: '0x77566D540d1E207dFf8DA205ed78750F9a1e7c55',
hypCollateralAddress: '0xDcbc0faAA269Cf649AC8950838664BB7B355BD6B',
isNft: true,
chainId: 1399811151,
address: 'Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr',
hypCollateralAddress: 'PJH5QAbxAqrrnSXfH3GHR8icua8CDFZmo97z91xmpvx',
name: 'Zebec',
symbol: 'wZBC',
decimals: 6,
isSpl2022: false,
logoURI: '/logos/zebec.png',
},
];
4 changes: 2 additions & 2 deletions src/features/transfer/TransferTokenForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,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: '',
Expand Down
32 changes: 31 additions & 1 deletion src/images/logos/app-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 26 additions & 1 deletion src/images/logos/app-title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Document() {
<meta name="msapplication-TileColor" content="#025aa1" />
<meta name="theme-color" content="#ffffff" />

<meta name="application-name" content="Hyperlane Warp Template UI" />
<meta name="application-name" content="Nautilus Bridge" />
<meta
name="keywords"
content="Hyperlane Warp Route Template UI Token Bridge Interchain App"
Expand All @@ -26,11 +26,11 @@ export default function Document() {
/>

<meta name="HandheldFriendly" content="true" />
<meta name="apple-mobile-web-app-title" content="Hyperlane Warp Template UI" />
<meta name="apple-mobile-web-app-title" content="Nautilus Bridge" />
<meta name="apple-mobile-web-app-capable" content="yes" />

<meta property="og:url" content="https://warp.hyperlane.xyz" />
<meta property="og:title" content="Hyperlane Warp Template UI" />
<meta property="og:title" content="Nautilus Bridge" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://warp.hyperlane.xyz/icon.png" />
<meta
Expand Down
2 changes: 2 additions & 0 deletions src/utils/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down