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

Add RPC Holesky #1141

Open
wants to merge 2 commits into
base: main
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 .github/workflows/testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
name: testnet
separator: T
advanced-tools-branch: advanced-tools
advanced-tools-branch: feature/holesky
environment: Cloudflare-Testnet
public-url: "/${{ needs.branch-sha.outputs.value }}"
project-branch: ${{ github.event.pull_request.head.ref }}
Expand Down
6 changes: 6 additions & 0 deletions apps/connect-v1/src/env/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ export const MAINNET_RPCS = {
solana: "https://wormhole.rpcpool.com/",
};

export const TESTNET_RPCS = {
holesky: asRpcHost('ethereum-testnet'),
aptos: asRpcHost('aptos-testnet'),
sui: asRpcHost('sui-testnet'),
};

export const PUBLIC_URL = envVars.VITE_PUBLIC_URL || "";

export const CLUSTER = envVars.VITE_APP_CLUSTER || "testnet";
Expand Down
3 changes: 2 additions & 1 deletion apps/connect-v1/src/env/tbtc-bridge.testnet.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { ENV as ENV_BASE } from "./tbtc-bridge";
import { mergeDeep } from "../utils/mergeDeep";
import type { WormholeConnectConfig } from "@wormhole-foundation/wormhole-connect";
import { Env } from "./common";
import { Env, TESTNET_RPCS } from "./common";

export const ENV: Env = {
...ENV_BASE,
wormholeConnectConfig: mergeDeep<WormholeConnectConfig>(
ENV_BASE.wormholeConnectConfig,
{
rpcs: TESTNET_RPCS,
networks: [
"goerli",
"mumbai",
Expand Down
3 changes: 2 additions & 1 deletion apps/connect-v1/src/env/token-bridge.testnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { ALGORAND, ACALA, MORE, ENV as ENV_BASE } from "./token-bridge";
import { mergeDeep } from "../utils/mergeDeep";
import { TESTNET } from "@wormhole-foundation/wormhole-connect";
import type { WormholeConnectConfig } from "@wormhole-foundation/wormhole-connect";
import { Env } from "./common";
import { Env, TESTNET_RPCS } from "./common";

export const ENV: Env = {
...ENV_BASE,
wormholeConnectConfig: mergeDeep<WormholeConnectConfig>(
ENV_BASE.wormholeConnectConfig,
{
rpcs: TESTNET_RPCS,
networks: [...Object.keys(TESTNET.chains)],
moreNetworks: {
networks: [ALGORAND, ACALA, MORE],
Expand Down
32 changes: 31 additions & 1 deletion apps/connect/src/env/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { WormholeConnectConfig } from "@wormhole-foundation/wormhole-connect";
import type { Chain, WormholeConnectConfig } from "@wormhole-foundation/wormhole-connect";
import { envVars } from "./env-vars";

const rpcs = (chains: string[], template: (chain: string) => string) =>
Expand Down Expand Up @@ -29,12 +29,42 @@ export const chains = [
"Mantle",
];

export const chainsTestnet: Chain[] = [
"Wormchain",
"Osmosis",
"Sepolia",
"Holesky",
"Sui",
"Aptos",
"Kujira",
"Evmos",
"Bsc",
"Avalanche",
"Fantom",
"Celo",
"Moonbeam",
"Scroll",
"Xlayer",
"Mantle",
"ArbitrumSepolia",
"OptimismSepolia",
"BaseSepolia",
"PolygonSepolia",
"Solana",
];

export const MAINNET_RPCS = {
...rpcs(chains, asRpcHost),
Klaytn: "https://public-en.node.kaia.io/",
Solana: "https://wormhole.rpcpool.com/",
};

export const TESTNET_RPCS = {
Holesky: asRpcHost('ethereum-testnet'),
Aptos: asRpcHost('aptos-testnet'),
Sui: asRpcHost('sui-testnet'),
};

export const PUBLIC_URL = envVars.VITE_PUBLIC_URL || "";

export const CLUSTER = envVars.VITE_APP_CLUSTER || "Testnet";
Expand Down
4 changes: 3 additions & 1 deletion apps/connect/src/env/token-bridge.testnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
nttRoutes,
type WormholeConnectConfig,
} from "@wormhole-foundation/wormhole-connect";
import { Env } from "./common";
import { chainsTestnet, Env, TESTNET_RPCS } from "./common";

export const ENV: Env = {
...ENV_BASE,
Expand All @@ -15,6 +15,8 @@ export const ENV: Env = {
// ui: {
// moreChains: { chains: [ALGORAND, ACALA, MORE] },
// } as NonNullable<WormholeConnectConfig["ui"]>,
rpcs: TESTNET_RPCS,
chains: chainsTestnet,
tokensConfig: {
Wsolana: {
key: "Wsolana",
Expand Down
3 changes: 2 additions & 1 deletion apps/connect/src/env/usdc-bridge.testnet.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { ENV as ENV_BASE } from "./usdc-bridge";
import { mergeDeep } from "../utils/mergeDeep";
import type { WormholeConnectConfig } from "@wormhole-foundation/wormhole-connect";
import { Env } from "./common";
import { Env, TESTNET_RPCS } from "./common";

export const ENV: Env = {
...ENV_BASE,
wormholeConnectConfig: mergeDeep<WormholeConnectConfig>(
ENV_BASE.wormholeConnectConfig,
{
rpcs: TESTNET_RPCS,
chains: [
"Sepolia",
"Avalanche",
Expand Down
Loading