Skip to content

Commit fd262f9

Browse files
authored
Removed unused configs, properties, and env variables (#3260)
1 parent 7120c4e commit fd262f9

File tree

17 files changed

+20
-297
lines changed

17 files changed

+20
-297
lines changed

wormhole-connect/src/config/devnet/chains.ts

-8
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ export const DEVNET_CHAINS: ChainsConfig = {
1010
displayName: 'EVM',
1111
explorerUrl: '',
1212
explorerName: '',
13-
gasToken: 'ETH',
1413
wrappedGasToken: '0xDDb64fE46a91D46ee29420539FC25FD07c5FEa3E',
1514
chainId: 1,
1615
icon: 'Ethereum',
17-
maxBlockSearch: 0,
1816
symbol: 'ETH',
1917
},
2018
Osmosis: {
@@ -23,11 +21,9 @@ export const DEVNET_CHAINS: ChainsConfig = {
2321
sdkName: 'Osmosis',
2422
explorerUrl: '',
2523
explorerName: '',
26-
gasToken: 'OSMO',
2724
wrappedGasToken: '',
2825
chainId: 'osmosis-1002',
2926
icon: 'Osmosis',
30-
maxBlockSearch: 0,
3127
symbol: 'OSMO',
3228
},
3329
Wormchain: {
@@ -36,11 +32,9 @@ export const DEVNET_CHAINS: ChainsConfig = {
3632
displayName: 'Wormchain',
3733
explorerUrl: '',
3834
explorerName: '',
39-
gasToken: 'WORM',
4035
wrappedGasToken: '',
4136
chainId: 'wormchain-1',
4237
icon: 'Osmosis',
43-
maxBlockSearch: 0,
4438
symbol: 'OSMO',
4539
},
4640
Terra2: {
@@ -49,11 +43,9 @@ export const DEVNET_CHAINS: ChainsConfig = {
4943
displayName: 'Terra',
5044
explorerUrl: '',
5145
explorerName: '',
52-
gasToken: 'LUNA',
5346
wrappedGasToken: '',
5447
chainId: 'localterra',
5548
icon: 'Terra2',
56-
maxBlockSearch: 0,
5749
symbol: 'OSMO',
5850
},
5951
};

wormhole-connect/src/config/devnet/index.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { NetworkData } from 'config/types';
22
import { DEVNET_CHAINS } from './chains';
3-
import {
4-
DEVNET_GRAPHQL_MAPPING,
5-
DEVNET_REST_MAPPING,
6-
DEVNET_RPC_MAPPING,
7-
} from './rpcs';
3+
import { DEVNET_RPC_MAPPING } from './rpcs';
84
import { DEVNET_TOKENS } from './tokens';
95

106
export * from './chains';
@@ -16,8 +12,6 @@ const DEVNET: NetworkData = {
1612
tokens: DEVNET_TOKENS,
1713
wrappedTokens: {},
1814
rpcs: DEVNET_RPC_MAPPING,
19-
rest: DEVNET_REST_MAPPING,
20-
graphql: DEVNET_GRAPHQL_MAPPING,
2115
guardianSet: {
2216
index: 0,
2317
keys: ['0x13947Bd48b18E53fdAeEe77F3473391aC727C638'],
+1-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
import { populateRpcField } from '../utils';
2-
const {
3-
REACT_APP_ETHEREUM_DEVNET_RPC,
4-
REACT_APP_OSMOSIS_DEVNET_RPC,
5-
REACT_APP_WORMCHAIN_DEVNET_RPC,
6-
REACT_APP_TERRA2_DEVNET_RPC,
7-
REACT_APP_SEI_REST,
8-
REACT_APP_APTOS_DEVNET_REST,
9-
} = import.meta.env;
2+
const { REACT_APP_ETHEREUM_DEVNET_RPC } = import.meta.env;
103

114
export const DEVNET_RPC_MAPPING = {
125
...populateRpcField('Ethereum', REACT_APP_ETHEREUM_DEVNET_RPC),
13-
...populateRpcField('Osmosis', REACT_APP_OSMOSIS_DEVNET_RPC),
14-
...populateRpcField('Wormchain', REACT_APP_WORMCHAIN_DEVNET_RPC),
15-
...populateRpcField('Terra2', REACT_APP_TERRA2_DEVNET_RPC),
16-
};
17-
18-
export const DEVNET_REST_MAPPING = {
19-
...populateRpcField('Sei', REACT_APP_SEI_REST),
20-
};
21-
22-
export const DEVNET_GRAPHQL_MAPPING = {
23-
...populateRpcField('Aptos', REACT_APP_APTOS_DEVNET_REST),
246
};

wormhole-connect/src/config/index.ts

-7
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,6 @@ export function buildConfig(
100100

101101
// External resources
102102
rpcs,
103-
rest: Object.assign(
104-
{},
105-
sdkConfig.rest,
106-
networkData.rest,
107-
customConfig.rest,
108-
),
109-
graphql: Object.assign({}, networkData.graphql, customConfig.graphql),
110103
mayanApi: 'https://explorer-api.mayan.finance',
111104
wormholeApi: {
112105
Mainnet: 'https://api.wormholescan.io/',

wormhole-connect/src/config/mainnet/chains.ts

-38
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
1010
sdkName: 'Ethereum',
1111
explorerUrl: 'https://etherscan.io/',
1212
explorerName: 'Etherscan',
13-
gasToken: 'ETH',
1413
chainId: 1,
1514
icon: 'Ethereum',
16-
maxBlockSearch: 2000,
1715
symbol: 'ETH',
1816
wrappedGasToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
1917
},
@@ -23,10 +21,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
2321
sdkName: 'Bsc',
2422
explorerUrl: 'https://bscscan.com/',
2523
explorerName: 'BscScan',
26-
gasToken: 'BNB',
2724
chainId: 56,
2825
icon: 'Bsc',
29-
maxBlockSearch: 2000,
3026
symbol: 'BSC',
3127
wrappedGasToken: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
3228
},
@@ -36,10 +32,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
3632
sdkName: 'Polygon',
3733
explorerUrl: 'https://polygonscan.com/',
3834
explorerName: 'PolygonScan',
39-
gasToken: 'POL',
4035
chainId: 137,
4136
icon: 'Polygon',
42-
maxBlockSearch: 1000,
4337
symbol: 'POL',
4438
wrappedGasToken: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
4539
},
@@ -49,10 +43,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
4943
sdkName: 'Avalanche',
5044
explorerUrl: 'https://avascan.info/blockchain/c/',
5145
explorerName: 'Avascan',
52-
gasToken: 'AVAX',
5346
chainId: 43114,
5447
icon: 'Avalanche',
55-
maxBlockSearch: 2000,
5648
symbol: 'AVAX',
5749
wrappedGasToken: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
5850
},
@@ -62,10 +54,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
6254
sdkName: 'Fantom',
6355
explorerUrl: 'https://ftmscan.com/',
6456
explorerName: 'FTMscan',
65-
gasToken: 'FTM',
6657
chainId: 250,
6758
icon: 'Fantom',
68-
maxBlockSearch: 2000,
6959
symbol: 'FTM',
7060
wrappedGasToken: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83',
7161
},
@@ -75,10 +65,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
7565
sdkName: 'Celo',
7666
explorerUrl: 'https://explorer.celo.org/mainnet/',
7767
explorerName: 'Celo Explorer',
78-
gasToken: 'CELO',
7968
chainId: 42220,
8069
icon: 'Celo',
81-
maxBlockSearch: 2000,
8270
symbol: 'CELO',
8371
},
8472
Moonbeam: {
@@ -87,10 +75,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
8775
sdkName: 'Moonbeam',
8876
explorerUrl: 'https://moonscan.io/',
8977
explorerName: 'Moonscan',
90-
gasToken: 'GLMR',
9178
chainId: 1284,
9279
icon: 'Moonbeam',
93-
maxBlockSearch: 2000,
9480
symbol: 'GLMR',
9581
wrappedGasToken: '0xAcc15dC74880C9944775448304B263D191c6077F',
9682
},
@@ -100,10 +86,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
10086
sdkName: 'Solana',
10187
explorerUrl: 'https://explorer.solana.com/',
10288
explorerName: 'Solana Explorer',
103-
gasToken: 'SOL',
10489
chainId: 0,
10590
icon: 'Solana',
106-
maxBlockSearch: 2000,
10791
symbol: 'SOL',
10892
wrappedGasToken: 'So11111111111111111111111111111111111111112',
10993
},
@@ -113,10 +97,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
11397
sdkName: 'Sui',
11498
explorerUrl: 'https://suiscan.xyz/',
11599
explorerName: 'Suiscan',
116-
gasToken: 'SUI',
117100
chainId: 0,
118101
icon: 'Sui',
119-
maxBlockSearch: 0,
120102
symbol: 'SUI',
121103
},
122104
Aptos: {
@@ -125,10 +107,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
125107
sdkName: 'Aptos',
126108
explorerUrl: 'https://explorer.aptoslabs.com/',
127109
explorerName: 'Aptos Explorer',
128-
gasToken: 'APT',
129110
chainId: 0,
130111
icon: 'Aptos',
131-
maxBlockSearch: 0,
132112
symbol: 'APT',
133113
},
134114
Base: {
@@ -137,10 +117,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
137117
sdkName: 'Base',
138118
explorerUrl: 'https://basescan.org/',
139119
explorerName: 'BaseScan',
140-
gasToken: 'ETHbase',
141120
chainId: 8453,
142121
icon: 'Base',
143-
maxBlockSearch: 2000,
144122
symbol: 'BASE',
145123
wrappedGasToken: '0x4200000000000000000000000000000000000006',
146124
},
@@ -150,10 +128,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
150128
sdkName: 'Arbitrum',
151129
explorerUrl: 'https://arbiscan.io/',
152130
explorerName: 'Arbitrum Explorer',
153-
gasToken: 'ETHarbitrum',
154131
chainId: 42161,
155132
icon: 'Arbitrum',
156-
maxBlockSearch: 2000,
157133
symbol: 'ARB',
158134
wrappedGasToken: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
159135
},
@@ -163,10 +139,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
163139
sdkName: 'Optimism',
164140
explorerUrl: 'https://optimistic.etherscan.io/',
165141
explorerName: 'Optimistic Etherscan',
166-
gasToken: 'ETHoptimism',
167142
chainId: 10,
168143
icon: 'Optimism',
169-
maxBlockSearch: 2000,
170144
symbol: 'OP',
171145
wrappedGasToken: '0x4200000000000000000000000000000000000006',
172146
},
@@ -176,10 +150,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
176150
sdkName: 'Klaytn',
177151
explorerUrl: 'https://kaiascope.com/',
178152
explorerName: 'Kaia Scope',
179-
gasToken: 'KLAY',
180153
chainId: 8217,
181154
icon: 'Klaytn',
182-
maxBlockSearch: 2000,
183155
symbol: 'KLAY',
184156
wrappedGasToken: '0xe4f05A66Ec68B54A58B17c22107b02e0232cC817',
185157
},
@@ -189,10 +161,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
189161
sdkName: 'Scroll',
190162
explorerUrl: 'https://scrollscan.com/',
191163
explorerName: 'Scrollscan',
192-
gasToken: 'ETHscroll',
193164
chainId: 534352,
194165
icon: 'Scroll',
195-
maxBlockSearch: 2000,
196166
symbol: 'SCR',
197167
wrappedGasToken: '0x5300000000000000000000000000000000000004',
198168
},
@@ -202,10 +172,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
202172
sdkName: 'Blast',
203173
explorerUrl: 'https://blastscan.io/',
204174
explorerName: 'Blastscan',
205-
gasToken: 'ETHblast',
206175
chainId: 81457,
207176
icon: 'Blast',
208-
maxBlockSearch: 2000,
209177
symbol: 'BLAST',
210178
wrappedGasToken: '0x9D020B1697035d9d54f115194c9e04a1e4Eb9aF7',
211179
},
@@ -215,10 +183,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
215183
sdkName: 'Xlayer',
216184
explorerUrl: 'https://www.okx.com/web3/explorer/xlayer/',
217185
explorerName: 'OKX Explorer',
218-
gasToken: 'OKB',
219186
chainId: 196,
220187
icon: 'Xlayer',
221-
maxBlockSearch: 2000,
222188
symbol: 'OKX',
223189
wrappedGasToken: '0xe538905cf8410324e03A5A23C1c177a474D59b2b',
224190
},
@@ -228,10 +194,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
228194
sdkName: 'Mantle',
229195
explorerUrl: 'https://explorer.mantle.xyz/',
230196
explorerName: 'Mantle Explorer',
231-
gasToken: 'MNT',
232197
chainId: 5000,
233198
icon: 'Mantle',
234-
maxBlockSearch: 2000,
235199
symbol: 'MNT',
236200
wrappedGasToken: '0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8',
237201
},
@@ -241,10 +205,8 @@ export const MAINNET_CHAINS: ChainsConfig = {
241205
sdkName: 'Worldchain',
242206
explorerUrl: 'https://worldscan.org/',
243207
explorerName: 'World Scan',
244-
gasToken: 'ETHworldchain',
245208
chainId: 480,
246209
icon: 'Worldchain',
247-
maxBlockSearch: 2000,
248210
symbol: 'WORLD',
249211
},
250212
};

wormhole-connect/src/config/mainnet/index.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { NetworkData } from 'config/types';
22
import { MAINNET_CHAINS } from './chains';
3-
import {
4-
MAINNET_GRAPHQL_MAPPING,
5-
MAINNET_REST_MAPPING,
6-
MAINNET_RPC_MAPPING,
7-
} from './rpcs';
3+
import { MAINNET_RPC_MAPPING } from './rpcs';
84
import { MAINNET_TOKENS } from './tokens';
95
import { MAINNET_WRAPPED_TOKENS } from './wrappedTokens';
106

@@ -17,8 +13,6 @@ const MAINNET: NetworkData = {
1713
tokens: MAINNET_TOKENS,
1814
wrappedTokens: MAINNET_WRAPPED_TOKENS,
1915
rpcs: MAINNET_RPC_MAPPING,
20-
rest: MAINNET_REST_MAPPING,
21-
graphql: MAINNET_GRAPHQL_MAPPING,
2216
// From VAA https://wormholescan.io/#/tx/1/0000000000000000000000000000000000000000000000000000000000000004/18252082506122526004
2317
guardianSet: {
2418
index: 4,

wormhole-connect/src/config/mainnet/rpcs.ts

-24
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,10 @@ const {
1010
REACT_APP_MOONBEAM_RPC,
1111
REACT_APP_SUI_RPC,
1212
REACT_APP_APTOS_RPC,
13-
REACT_APP_SEI_RPC,
1413
REACT_APP_BASE_RPC,
15-
REACT_APP_OSMOSIS_RPC,
16-
REACT_APP_INJECTIVE_RPC,
17-
REACT_APP_WORMCHAIN_RPC,
18-
REACT_APP_EVMOS_RPC,
19-
REACT_APP_KUJIRA_RPC,
2014
REACT_APP_KLAYTN_RPC,
21-
REACT_APP_SEI_REST,
22-
REACT_APP_EVMOS_REST,
2315
REACT_APP_ARBITRUM_RPC,
2416
REACT_APP_OPTIMISM_RPC,
25-
REACT_APP_APTOS_GRAPHQL,
2617
REACT_APP_SCROLL_RPC,
2718
REACT_APP_BLAST_RPC,
2819
REACT_APP_XLAYER_RPC,
@@ -41,28 +32,13 @@ export const MAINNET_RPC_MAPPING = {
4132
...populateRpcField('Moonbeam', REACT_APP_MOONBEAM_RPC),
4233
...populateRpcField('Sui', REACT_APP_SUI_RPC),
4334
...populateRpcField('Aptos', REACT_APP_APTOS_RPC),
44-
...populateRpcField('Sei', REACT_APP_SEI_RPC),
4535
...populateRpcField('Base', REACT_APP_BASE_RPC),
46-
...populateRpcField('Osmosis', REACT_APP_OSMOSIS_RPC),
47-
...populateRpcField('Wormchain', REACT_APP_WORMCHAIN_RPC),
4836
...populateRpcField('Arbitrum', REACT_APP_ARBITRUM_RPC),
4937
...populateRpcField('Optimism', REACT_APP_OPTIMISM_RPC),
50-
...populateRpcField('Evmos', REACT_APP_EVMOS_RPC),
51-
...populateRpcField('Kujira', REACT_APP_KUJIRA_RPC),
52-
...populateRpcField('Injective', REACT_APP_INJECTIVE_RPC),
5338
...populateRpcField('Klaytn', REACT_APP_KLAYTN_RPC),
5439
...populateRpcField('Scroll', REACT_APP_SCROLL_RPC),
5540
...populateRpcField('Blast', REACT_APP_BLAST_RPC),
5641
...populateRpcField('Xlayer', REACT_APP_XLAYER_RPC),
5742
...populateRpcField('Mantle', REACT_APP_MANTLE_RPC),
5843
...populateRpcField('Worldchain', REACT_APP_WORLDCHAIN_RPC),
5944
};
60-
61-
export const MAINNET_REST_MAPPING = {
62-
...populateRpcField('Sei', REACT_APP_SEI_REST),
63-
...populateRpcField('Evmos', REACT_APP_EVMOS_REST),
64-
};
65-
66-
export const MAINNET_GRAPHQL_MAPPING = {
67-
...populateRpcField('Aptos', REACT_APP_APTOS_GRAPHQL),
68-
};

0 commit comments

Comments
 (0)