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 NTT wstETH #879

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 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
23 changes: 23 additions & 0 deletions apps/connect/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ const wcPackageJson = readPackageVersion('@wormhole-foundation/wormhole-connect'

const rpcs = (chains: string[], template: (chain: string) => string) => chains.map((chain: string) => ({ [chain]: template(chain) })).reduce((acc, cur) => ({ ...acc, ...cur }), {});
const asRpcHost = (chain: string) => `https://and76cjzpa.execute-api.us-east-2.amazonaws.com/${chain}/`;

export const testnetChains = [
"wormchain",
"osmosis",
"ethereum",
"sui",
"aptos",
"kujira",
"evmos",
"bsc",
"polygon",
"avalanche",
"fantom",
"celo",
"moonbeam",
"base",
"arbitrum",
"optimism",
"scroll",
"xlayer",
"sepolia"
]

export const chains = [
"wormchain",
"osmosis",
Expand Down
63 changes: 61 additions & 2 deletions apps/connect/vite.token-bridge.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'vite'
import viteConfig, { chains } from './vite.config'
import viteConfig, { chains, testnetChains } from './vite.config'
import type { WormholeConnectConfig } from '@wormhole-foundation/wormhole-connect'

const PUBLIC_URL = viteConfig.base;
Expand Down Expand Up @@ -38,6 +38,7 @@ const MAINNET_MORE_NETWORKS = [ALGORAND, ACALA, SEI, MORE];
const TESTNET_MORE_NETWORKS = [ALGORAND, ACALA, MORE];

const TESTNET_TOKEN_CONFIG: WormholeConnectConfig = {
env: 'testnet',
tokensConfig: {
Wsolana: {
key: 'Wsolana',
Expand Down Expand Up @@ -109,6 +110,38 @@ const TESTNET_TOKEN_CONFIG: WormholeConnectConfig = {
default: 18,
},
},
wstETHsepolia: {
key: "wstETHsepolia",
symbol: "wstETH (NTT)",
nativeChain: "sepolia",
tokenId: {
chain: "sepolia",
address: "0xB82381A3fBD3FaFA77B3a7bE693342618240067b"
},
icon: "https://assets.coingecko.com/coins/images/18834/standard/wstETH.png",
coinGeckoId: "wrapped-steth",
color: "#3AA3FF",
decimals: {
default: 8,
Ethereum: 18
}
},
wstETHbsc: {
key: "wstETHbsc",
symbol: "wstETH (NTT)",
nativeChain: "bsc",
tokenId: {
chain: "bsc",
address: "0x0B15635FCF5316EdFD2a9A0b0dC3700aeA4D09E6"
},
icon: "https://assets.coingecko.com/coins/images/18834/standard/wstETH.png",
coinGeckoId: "wrapped-steth",
color: "#3AA3FF",
decimals: {
default: 8,
Ethereum: 18
}
}
},
nttGroups: {
W: {
Expand Down Expand Up @@ -171,6 +204,32 @@ const TESTNET_TOKEN_CONFIG: WormholeConnectConfig = {
},
],
},
wstETH: {
nttManagers: [
{
chainName: "sepolia",
address: "0x8B715EAf61A7DdF61C67d5D46687c796D1f47146",
tokenKey: "wstETHsepolia",
transceivers: [
{
address: "0xF2bc73502283fcaC4b047dfE45366d8744daaC5B",
type: "wormhole"
}
]
},
{
chainName: "bsc",
address: "0x66Cb5a992570EF01b522Bc59A056a64A84Bd0aAa",
tokenKey: "wstETHbsc",
transceivers: [
{
address: "0x3a84364d27Ed3D16022Da0f603f3E0F74826c707",
type: "wormhole"
}
]
}
]
}
},
}

Expand Down Expand Up @@ -525,7 +584,7 @@ export default defineConfig({
cctpWarning: {
href: USDC_BRIDGE_HREF
},
networks: [...chains, "solana", "injective", "klaytn"],
networks: [...(process.env.VITE_APP_CLUSTER === 'mainnet' ? chains : testnetChains), "solana", "injective", "klaytn"],
moreNetworks: {
href: ADVANCE_TOOLS_HREF_TEMPLATE,
target: "_blank",
Expand Down
Loading