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

resurrect bridge and relay routes #12

Merged
merged 1 commit into from
Jul 8, 2024
Merged
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
728 changes: 247 additions & 481 deletions wormhole-connect/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wormhole-connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"@reduxjs/toolkit": "^1.9.1",
"@solana/wallet-adapter-wallets": "^0.19.25",
"@solana/web3.js": "^1.73.0",
"@wormhole-foundation/sdk": "^0.7.0-beta.3",
"@wormhole-foundation/sdk-definitions": "^0.7.0-beta.3",
"@wormhole-foundation/sdk": "^0.7.3-beta.0",
"@wormhole-foundation/sdk-definitions": "^0.7.3-beta.0",
"@wormhole-foundation/sdk-definitions-ntt": "^0.0.1-beta.5",
"@wormhole-foundation/sdk-icons": "^0.6.8",
"@xlabs-libs/wallet-aggregator-aptos": "^0.0.1-alpha.14",
Expand Down
5 changes: 4 additions & 1 deletion wormhole-connect/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ export function buildConfig(
: true;
}),
gasEstimates: networkData.gasEstimates,
routes: customConfig?.routes ?? Object.values(Route),
// TODO: disabling all routes except Bridge and Relay until they are fully implemented
routes: (customConfig?.routes ?? Object.values(Route)).filter((r) =>
[Route.Bridge, Route.Relay].includes(r as Route),
),

// UI details
cta: customConfig?.cta,
Expand Down
53 changes: 0 additions & 53 deletions wormhole-connect/src/config/testnet/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,6 @@ import { ChainsConfig, Icon } from '../types';
const { chains } = CONFIG.TESTNET;

export const TESTNET_CHAINS: ChainsConfig = {
goerli: {
...chains.goerli!,
displayName: 'Goerli',
explorerUrl: 'https://goerli.etherscan.io/',
explorerName: 'Etherscan',
gasToken: 'ETH',
chainId: 5,
icon: Icon.ETH,
automaticRelayer: true,
maxBlockSearch: 2000,
},
mumbai: {
...chains.mumbai!,
displayName: 'Mumbai',
explorerUrl: 'https://mumbai.polygonscan.com/',
explorerName: 'Polygonscan',
gasToken: 'MATIC',
chainId: 80001,
icon: Icon.POLYGON,
automaticRelayer: true,
maxBlockSearch: 1000,
},
bsc: {
...chains.bsc!,
displayName: 'BSC',
Expand Down Expand Up @@ -113,17 +91,6 @@ export const TESTNET_CHAINS: ChainsConfig = {
icon: Icon.APT,
maxBlockSearch: 0,
},
basegoerli: {
...chains.basegoerli!,
displayName: 'Base Goerli',
explorerUrl: 'https://goerli.basescan.org/',
explorerName: 'BaseScan',
gasToken: 'ETHbase',
chainId: 84531,
icon: Icon.BASE,
automaticRelayer: true,
maxBlockSearch: 2000,
},
klaytn: {
...chains.klaytn!,
displayName: 'Klaytn',
Expand Down Expand Up @@ -167,26 +134,6 @@ export const TESTNET_CHAINS: ChainsConfig = {
automaticRelayer: false,
maxBlockSearch: 0,
},
arbitrumgoerli: {
...chains.arbitrumgoerli!,
displayName: 'Arbitrum Goerli',
explorerUrl: 'https://testnet.arbiscan.io/',
explorerName: 'Arbitrum Goerli Explorer',
gasToken: 'ETHarbitrum',
chainId: 421613,
icon: Icon.ARBITRUM,
maxBlockSearch: 2000,
},
optimismgoerli: {
...chains.optimismgoerli!,
displayName: 'Optimism Goerli',
explorerUrl: 'https://goerli-optimism.etherscan.io/',
explorerName: 'Optimistic Goerli Explorer',
gasToken: 'ETHoptimism',
chainId: 420,
icon: Icon.OPTIMISM,
maxBlockSearch: 2000,
},
cosmoshub: {
...chains.cosmoshub!,
displayName: 'Cosmoshub',
Expand Down
93 changes: 0 additions & 93 deletions wormhole-connect/src/config/testnet/gasEstimates.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
import { GasEstimates, Route } from '../types';

export const TESTNET_GAS_ESTIMATES: GasEstimates = {
goerli: {
[Route.Bridge]: {
sendNative: 100000,
sendToken: 150000,
claim: 200000,
},
[Route.Relay]: {
sendNative: 200000,
sendToken: 300000,
},
[Route.CCTPManual]: {
sendToken: 150000,
claim: 300000,
},
[Route.CCTPRelay]: {
sendToken: 300000,
},
[Route.TBTC]: {
sendToken: 150000,
claim: 200000,
},
},
mumbai: {
[Route.Bridge]: {
sendNative: 200000,
sendToken: 150000,
claim: 200000,
},
[Route.Relay]: {
sendNative: 200000,
sendToken: 250000,
},
[Route.TBTC]: {
sendToken: 200000,
claim: 300000,
},
},
bsc: {
[Route.Bridge]: {
sendNative: 100000,
Expand Down Expand Up @@ -151,28 +114,6 @@ export const TESTNET_GAS_ESTIMATES: GasEstimates = {
claim: 1000000,
},
},
basegoerli: {
[Route.Bridge]: {
sendNative: 100000,
sendToken: 1000000,
claim: 1000000,
},
[Route.Relay]: {
sendNative: 300000,
sendToken: 300000,
},
[Route.CCTPManual]: {
sendToken: 300000,
claim: 500000,
},
[Route.CCTPRelay]: {
sendToken: 300000,
},
[Route.TBTC]: {
sendToken: 300000,
claim: 500000,
},
},
klaytn: {
[Route.Bridge]: {
sendNative: 2000000,
Expand All @@ -194,40 +135,6 @@ export const TESTNET_GAS_ESTIMATES: GasEstimates = {
claim: 0,
},
},
arbitrumgoerli: {
[Route.Bridge]: {
sendNative: 100000,
sendToken: 150000,
claim: 150000,
},
[Route.CCTPManual]: {
sendToken: 150000,
},
[Route.CCTPRelay]: {
sendToken: 300000,
},
[Route.TBTC]: {
sendToken: 150000,
claim: 300000,
},
},
optimismgoerli: {
[Route.Bridge]: {
sendNative: 100000,
sendToken: 100000,
claim: 100000,
},
[Route.CCTPManual]: {
sendToken: 150000,
},
[Route.CCTPRelay]: {
sendToken: 300000,
},
[Route.TBTC]: {
sendToken: 150000,
claim: 300000,
},
},
cosmoshub: {
[Route.Bridge]: {
sendNative: 0,
Expand Down
10 changes: 0 additions & 10 deletions wormhole-connect/src/config/testnet/rpcs.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { populateRpcField } from '../utils';
const {
REACT_APP_GOERLI_RPC,
REACT_APP_SEPOLIA_RPC,
REACT_APP_MUMBAI_RPC,
REACT_APP_BSC_TESTNET_RPC,
REACT_APP_FUJI_RPC,
REACT_APP_FANTOM_TESTNET_RPC,
Expand All @@ -12,7 +10,6 @@ const {
REACT_APP_SUI_TESTNET_RPC,
REACT_APP_APTOS_TESTNET_RPC,
REACT_APP_SEI_TESTNET_RPC,
REACT_APP_BASE_GOERLI_RPC,
REACT_APP_BASE_SEPOLIA_RPC,
REACT_APP_OSMOSIS_TESTNET_RPC,
REACT_APP_INJECTIVE_TESTNET_RPC,
Expand All @@ -23,9 +20,7 @@ const {
REACT_APP_KLAYTN_TESTNET_RPC,
REACT_APP_SEI_REST,
REACT_APP_EVMOS_REST,
REACT_APP_ARBITRUM_GOERLI_RPC,
REACT_APP_ARBITRUM_SEPOLIA_RPC,
REACT_APP_OPTIMISM_GOERLI_RPC,
REACT_APP_OPTIMISM_SEPOLIA_RPC,
REACT_APP_APTOS_TESTNET_GRAPHQL,
REACT_APP_SCROLL_TESTNET_RPC,
Expand All @@ -34,9 +29,7 @@ const {
} = import.meta.env;

export const TESTNET_RPC_MAPPING = {
...populateRpcField('goerli', REACT_APP_GOERLI_RPC),
...populateRpcField('sepolia', REACT_APP_SEPOLIA_RPC),
...populateRpcField('mumbai', REACT_APP_MUMBAI_RPC),
...populateRpcField('bsc', REACT_APP_BSC_TESTNET_RPC),
...populateRpcField('fuji', REACT_APP_FUJI_RPC),
...populateRpcField('fantom', REACT_APP_FANTOM_TESTNET_RPC),
Expand All @@ -46,13 +39,10 @@ export const TESTNET_RPC_MAPPING = {
...populateRpcField('sui', REACT_APP_SUI_TESTNET_RPC),
...populateRpcField('aptos', REACT_APP_APTOS_TESTNET_RPC),
...populateRpcField('sei', REACT_APP_SEI_TESTNET_RPC),
...populateRpcField('basegoerli', REACT_APP_BASE_GOERLI_RPC),
...populateRpcField('base_sepolia', REACT_APP_BASE_SEPOLIA_RPC),
...populateRpcField('osmosis', REACT_APP_OSMOSIS_TESTNET_RPC),
...populateRpcField('wormchain', REACT_APP_WORMCHAIN_TESTNET_RPC),
...populateRpcField('arbitrumgoerli', REACT_APP_ARBITRUM_GOERLI_RPC),
...populateRpcField('arbitrum_sepolia', REACT_APP_ARBITRUM_SEPOLIA_RPC),
...populateRpcField('optimismgoerli', REACT_APP_OPTIMISM_GOERLI_RPC),
...populateRpcField('optimism_sepolia', REACT_APP_OPTIMISM_SEPOLIA_RPC),
...populateRpcField('cosmoshub', REACT_APP_COSMOSHUB_TESTNET_RPC),
...populateRpcField('evmos', REACT_APP_EVMOS_TESTNET_RPC),
Expand Down
Loading
Loading