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

Eclipsetestnet #121

Open
wants to merge 1 commit into
base: trevor/eclipsedevnet
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/components/nav/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function Footer() {
</div>
<div className="hidden sm:flex flex-col ml-3">
<p className="leading-6">
Bridge with the Eclipse Devnet Bridge
Bridge with the Eclipse Testnet Bridge
<br />
Build with <Link href="https://www.hyperlane.xyz">Hyperlane</Link>
</p>
Expand Down
72 changes: 44 additions & 28 deletions src/consts/chains.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChainMap, ChainMetadata, ExplorerFamily, chainMetadata } from '@hyperlane-xyz/sdk';
import { ChainMap, ChainMetadata, ExplorerFamily } from '@hyperlane-xyz/sdk';
import { chainMetadata, etherToken, solToken } from '@hyperlane-xyz/sdk/dist/consts/chainMetadata';
import { ProtocolType } from '@hyperlane-xyz/utils';

// A map of chain names to ChainMetadata
export const chains: ChainMap<ChainMetadata & { mailbox?: Address }> = {
// ----------- Add your chains here -----------------
Expand Down Expand Up @@ -40,40 +40,56 @@ export const chains: ChainMap<ChainMetadata & { mailbox?: Address }> = {
mailbox: 'Ge9atjAc3Ltu91VTbNpJDCjZ9CFxFyck4h3YBcTF9XPq',
},
solanatestnet: {
...chainMetadata.solanatestnet,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the destructure here? Seems like most of the solanatestnet values are the same as the SDK const?

mailbox: 'TODO',
},
solanadevnet: {
...chainMetadata.solanadevnet,
mailbox: '4v25Dz9RccqUrTzmfHzJMsjd1iVoNrWzeJ4o6GYuJrVn',
},
eclipsedevnet: {
protocol: ProtocolType.Sealevel,
chainId: 3131313,
domainId: 3131313,
name: 'eclipsedevnet',
displayName: 'Eclipse Devnet',
nativeToken: {
"name": "Eclipse",
"symbol": "ECLIPSE",
"decimals": 9
},
rpcUrls: [{ http: 'https://staging-rpc.dev2.eclipsenetwork.xyz' }],
blockExplorers: [
// {
// name: 'Solana Explorer',
// url: 'https://explorer.solana.com',
// apiUrl: 'https://explorer.solana.com',
// family: ExplorerFamily.Other,
// },
{
apiUrl: 'https://explorer.solana.com',
family: ExplorerFamily.Other,
name: 'Solana Explorer',
url: 'https://explorer.solana.com',
},
],
blocks: {
confirmations: 1,
estimateBlockTime: 0.4,
reorgPeriod: 0,
},
chainId: 1399811150,
displayName: 'Solana Testnet',
displayNameShort: 'Sol Testnet',
domainId: 1399811150,
isTestnet: true,
name: 'solanatestnet',
nativeToken: solToken,
protocol: ProtocolType.Sealevel,
rpcUrls: [{ http: 'https://api.testnet.solana.com' }],
mailbox: '75HBBLae3ddeneJVrZeyrDfv6vb7SMC3aCpBucSXS5aR'
},
eclipsetestnet: {
blockExplorers: [
{
apiUrl: 'https://testnet.dev2.eclipsenetwork.xyz',
family: ExplorerFamily.Other,
name: 'Eclipse Testnet Explorer',
url: 'https://explorer.dev.eclipsenetwork.xyz/?cluster=testnet',
},
],
blocks: {
confirmations: 1,
estimateBlockTime: 0.4,
reorgPeriod: 0,
},
chainId: 239092742,
displayName: 'Eclipse Testnet',
domainId: 239092742,
isTestnet: true,
mailbox: 'AATtwuHptB6ruozdwc3XUFwGCuPfZL6jwPid955RoL6N',
name: 'eclipsetestnet',
nativeToken: {
...etherToken,
decimals: 9,
},
protocol: ProtocolType.Sealevel,
rpcUrls: [{ http: 'https://testnet.dev2.eclipsenetwork.xyz' }],
mailbox: '75HBBLae3ddeneJVrZeyrDfv6vb7SMC3aCpBucSXS5aR'
},
proteustestnet: {
chainId: 88002,
Expand Down
10 changes: 5 additions & 5 deletions src/consts/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export const tokenList: WarpTokenConfig = [
// logoURI: '/logos/zebec.png',
// },

// solanadevnet to eclipse
// solanatestnet to eclipsetestnet
{
type: 'native',
chainId: 1399811151,
chainId: 1399811150,
// address: 'wzbcJyhGhQDLTV1S99apZiiBdE4jmYfbw99saMMdP59',
hypNativeAddress: '62V5Sv2HeLZ4RqwxwYjaBQ7K9cqHbfert9pVtjfrxgYG',
name: 'Devnet SOL',
symbol: 'devSOL',
hypNativeAddress: 'DF99ZiHj8aN4ETbKmpMoMsRTSbm7gtL5j6sKKLC5mkTS',
name: 'Testnet SOL',
symbol: 'testSOL',
decimals: 9,
// isSpl2022: false,
logoURI: '/logos/solana.svg',
Expand Down
2 changes: 1 addition & 1 deletion src/features/wallet/SolanaWalletContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { logger } from '../../utils/logger';

export function SolanaWalletContext({ children }: PropsWithChildren<unknown>) {
// TODO support multiple networks
const network = WalletAdapterNetwork.Devnet;
const network = WalletAdapterNetwork.Testnet;
const endpoint = useMemo(() => clusterApiUrl(network), [network]);
const wallets = useMemo(
() => [
Expand Down