@vleap/warps-adapter-evm 0.2.0-alpha.4 → 0.2.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -26,7 +26,6 @@ __export(index_exports, {
26
26
  EthereumExplorers: () => EthereumExplorers,
27
27
  EvmExplorers: () => EvmExplorers,
28
28
  ExplorerUrls: () => ExplorerUrls,
29
- LocalExplorers: () => LocalExplorers,
30
29
  WarpEvmBuilder: () => WarpEvmBuilder,
31
30
  WarpEvmConstants: () => WarpEvmConstants,
32
31
  WarpEvmExecutor: () => WarpEvmExecutor,
@@ -39,91 +38,12 @@ __export(index_exports, {
39
38
  getEthereumAdapter: () => getEthereumAdapter,
40
39
  getEvmApiUrl: () => getEvmApiUrl,
41
40
  getEvmChainConfig: () => getEvmChainConfig,
42
- getEvmExplorerByName: () => getEvmExplorerByName,
43
- getEvmExplorerUrl: () => getEvmExplorerUrl,
44
- getEvmExplorerUrlByName: () => getEvmExplorerUrlByName,
45
- getEvmExplorers: () => getEvmExplorers,
46
- getPrimaryEvmExplorer: () => getPrimaryEvmExplorer
41
+ getEvmExplorerUrl: () => getEvmExplorerUrl
47
42
  });
48
43
  module.exports = __toCommonJS(index_exports);
49
44
 
50
- // src/constants.ts
51
- var WarpEvmConstants = {
52
- GasLimit: {
53
- Default: 21e3,
54
- ContractCall: 1e5,
55
- ContractDeploy: 5e5,
56
- Transfer: 21e3,
57
- Approve: 46e3,
58
- Swap: 2e5
59
- },
60
- GasPrice: {
61
- Default: "20000000000"
62
- },
63
- Validation: {
64
- MinGasLimit: 21e3,
65
- MaxGasLimit: 3e7
66
- }
67
- };
68
- var EthereumExplorers = /* @__PURE__ */ ((EthereumExplorers2) => {
69
- EthereumExplorers2["Etherscan"] = "etherscan";
70
- EthereumExplorers2["EtherscanSepolia"] = "etherscan_sepolia";
71
- EthereumExplorers2["Ethplorer"] = "ethplorer";
72
- EthereumExplorers2["Blockscout"] = "blockscout";
73
- EthereumExplorers2["BlockscoutSepolia"] = "blockscout_sepolia";
74
- return EthereumExplorers2;
75
- })(EthereumExplorers || {});
76
- var ArbitrumExplorers = /* @__PURE__ */ ((ArbitrumExplorers2) => {
77
- ArbitrumExplorers2["Arbiscan"] = "arbiscan";
78
- ArbitrumExplorers2["ArbiscanSepolia"] = "arbiscan_sepolia";
79
- ArbitrumExplorers2["BlockscoutArbitrum"] = "blockscout_arbitrum";
80
- ArbitrumExplorers2["BlockscoutArbitrumSepolia"] = "blockscout_arbitrum_sepolia";
81
- return ArbitrumExplorers2;
82
- })(ArbitrumExplorers || {});
83
- var BaseExplorers = /* @__PURE__ */ ((BaseExplorers2) => {
84
- BaseExplorers2["Basescan"] = "basescan";
85
- BaseExplorers2["BasescanSepolia"] = "basescan_sepolia";
86
- BaseExplorers2["BlockscoutBase"] = "blockscout_base";
87
- BaseExplorers2["BlockscoutBaseSepolia"] = "blockscout_base_sepolia";
88
- return BaseExplorers2;
89
- })(BaseExplorers || {});
90
- var LocalExplorers = /* @__PURE__ */ ((LocalExplorers2) => {
91
- LocalExplorers2["LocalBlockscout"] = "local_blockscout";
92
- return LocalExplorers2;
93
- })(LocalExplorers || {});
94
- var EvmExplorers = {
95
- ethereum: {
96
- mainnet: ["etherscan" /* Etherscan */, "ethplorer" /* Ethplorer */, "blockscout" /* Blockscout */],
97
- testnet: ["etherscan_sepolia" /* EtherscanSepolia */, "blockscout_sepolia" /* BlockscoutSepolia */],
98
- devnet: ["local_blockscout" /* LocalBlockscout */]
99
- },
100
- arbitrum: {
101
- mainnet: ["arbiscan" /* Arbiscan */, "blockscout_arbitrum" /* BlockscoutArbitrum */],
102
- testnet: ["arbiscan_sepolia" /* ArbiscanSepolia */, "blockscout_arbitrum_sepolia" /* BlockscoutArbitrumSepolia */],
103
- devnet: ["local_blockscout" /* LocalBlockscout */]
104
- },
105
- base: {
106
- mainnet: ["basescan" /* Basescan */, "blockscout_base" /* BlockscoutBase */],
107
- testnet: ["basescan_sepolia" /* BasescanSepolia */, "blockscout_base_sepolia" /* BlockscoutBaseSepolia */],
108
- devnet: ["local_blockscout" /* LocalBlockscout */]
109
- }
110
- };
111
- var ExplorerUrls = {
112
- ["etherscan" /* Etherscan */]: "https://etherscan.io",
113
- ["etherscan_sepolia" /* EtherscanSepolia */]: "https://sepolia.etherscan.io",
114
- ["ethplorer" /* Ethplorer */]: "https://ethplorer.io",
115
- ["blockscout" /* Blockscout */]: "https://eth.blockscout.com",
116
- ["blockscout_sepolia" /* BlockscoutSepolia */]: "https://sepolia.blockscout.com",
117
- ["arbiscan" /* Arbiscan */]: "https://arbiscan.io",
118
- ["arbiscan_sepolia" /* ArbiscanSepolia */]: "https://sepolia.arbiscan.io",
119
- ["blockscout_arbitrum" /* BlockscoutArbitrum */]: "https://arbitrum.blockscout.com",
120
- ["blockscout_arbitrum_sepolia" /* BlockscoutArbitrumSepolia */]: "https://sepolia.blockscout.com",
121
- ["basescan" /* Basescan */]: "https://basescan.org",
122
- ["basescan_sepolia" /* BasescanSepolia */]: "https://sepolia.basescan.org",
123
- ["blockscout_base" /* BlockscoutBase */]: "https://base.blockscout.com",
124
- ["blockscout_base_sepolia" /* BlockscoutBaseSepolia */]: "https://sepolia.blockscout.com",
125
- ["local_blockscout" /* LocalBlockscout */]: "http://localhost:4000"
126
- };
45
+ // src/WarpEvmBuilder.ts
46
+ var import_ethers = require("ethers");
127
47
 
128
48
  // src/config.ts
129
49
  var EVM_CHAIN_CONFIGS = {
@@ -134,7 +54,7 @@ var EVM_CHAIN_CONFIGS = {
134
54
  chainId: "1",
135
55
  registryAddress: "0x0000000000000000000000000000000000000000",
136
56
  nativeToken: "ETH",
137
- blockTime: 12
57
+ blockTime: 12e3
138
58
  },
139
59
  testnet: {
140
60
  apiUrl: "https://eth-sepolia.g.alchemy.com/v2/demo",
@@ -142,7 +62,7 @@ var EVM_CHAIN_CONFIGS = {
142
62
  chainId: "11155111",
143
63
  registryAddress: "0x0000000000000000000000000000000000000000",
144
64
  nativeToken: "ETH",
145
- blockTime: 12
65
+ blockTime: 12e3
146
66
  },
147
67
  devnet: {
148
68
  apiUrl: "http://localhost:8545",
@@ -150,7 +70,7 @@ var EVM_CHAIN_CONFIGS = {
150
70
  chainId: "1337",
151
71
  registryAddress: "0x0000000000000000000000000000000000000000",
152
72
  nativeToken: "ETH",
153
- blockTime: 12
73
+ blockTime: 12e3
154
74
  }
155
75
  },
156
76
  arbitrum: {
@@ -160,7 +80,7 @@ var EVM_CHAIN_CONFIGS = {
160
80
  chainId: "42161",
161
81
  registryAddress: "0x0000000000000000000000000000000000000000",
162
82
  nativeToken: "ETH",
163
- blockTime: 1
83
+ blockTime: 1e3
164
84
  },
165
85
  testnet: {
166
86
  apiUrl: "https://arb-sepolia.g.alchemy.com/v2/demo",
@@ -168,7 +88,7 @@ var EVM_CHAIN_CONFIGS = {
168
88
  chainId: "421614",
169
89
  registryAddress: "0x0000000000000000000000000000000000000000",
170
90
  nativeToken: "ETH",
171
- blockTime: 1
91
+ blockTime: 1e3
172
92
  },
173
93
  devnet: {
174
94
  apiUrl: "http://localhost:8545",
@@ -176,7 +96,7 @@ var EVM_CHAIN_CONFIGS = {
176
96
  chainId: "1337",
177
97
  registryAddress: "0x0000000000000000000000000000000000000000",
178
98
  nativeToken: "ETH",
179
- blockTime: 1
99
+ blockTime: 1e3
180
100
  }
181
101
  },
182
102
  base: {
@@ -186,7 +106,7 @@ var EVM_CHAIN_CONFIGS = {
186
106
  chainId: "8453",
187
107
  registryAddress: "0x0000000000000000000000000000000000000000",
188
108
  nativeToken: "ETH",
189
- blockTime: 2
109
+ blockTime: 2e3
190
110
  },
191
111
  testnet: {
192
112
  apiUrl: "https://sepolia.base.org",
@@ -194,7 +114,7 @@ var EVM_CHAIN_CONFIGS = {
194
114
  chainId: "84532",
195
115
  registryAddress: "0x0000000000000000000000000000000000000000",
196
116
  nativeToken: "ETH",
197
- blockTime: 2
117
+ blockTime: 2e3
198
118
  },
199
119
  devnet: {
200
120
  apiUrl: "http://localhost:8545",
@@ -202,7 +122,7 @@ var EVM_CHAIN_CONFIGS = {
202
122
  chainId: "1337",
203
123
  registryAddress: "0x0000000000000000000000000000000000000000",
204
124
  nativeToken: "ETH",
205
- blockTime: 2
125
+ blockTime: 2e3
206
126
  }
207
127
  }
208
128
  };
@@ -224,35 +144,8 @@ var getEvmApiUrl = (env, chain = DEFAULT_CHAIN) => {
224
144
  var getEvmExplorerUrl = (env, chain = DEFAULT_CHAIN) => {
225
145
  return getEvmChainConfig(chain, env).explorerUrl;
226
146
  };
227
- var getEvmExplorers = (chain = DEFAULT_CHAIN, env) => {
228
- const chainExplorers = EvmExplorers[chain];
229
- if (!chainExplorers) {
230
- throw new Error(`Unsupported EVM chain: ${chain}`);
231
- }
232
- const explorers = chainExplorers[env];
233
- if (!explorers) {
234
- throw new Error(`Unsupported environment ${env} for chain ${chain}`);
235
- }
236
- return explorers;
237
- };
238
- var getPrimaryEvmExplorer = (chain = DEFAULT_CHAIN, env) => {
239
- const explorers = getEvmExplorers(chain, env);
240
- return explorers[0];
241
- };
242
- var getEvmExplorerUrlByName = (explorerName) => {
243
- const url = ExplorerUrls[explorerName];
244
- if (!url) {
245
- throw new Error(`Unsupported explorer: ${explorerName}`);
246
- }
247
- return url;
248
- };
249
- var getEvmExplorerByName = (chain = DEFAULT_CHAIN, env, name) => {
250
- const explorers = getEvmExplorers(chain, env);
251
- return explorers.find((explorer) => explorer.toLowerCase() === name.toLowerCase());
252
- };
253
147
 
254
148
  // src/WarpEvmBuilder.ts
255
- var import_ethers = require("ethers");
256
149
  var WarpEvmBuilder = class {
257
150
  constructor(config) {
258
151
  this.config = config;
@@ -351,6 +244,79 @@ var WarpEvmBuilder = class {
351
244
  var import_warps3 = require("@vleap/warps");
352
245
  var import_ethers3 = require("ethers");
353
246
 
247
+ // src/constants.ts
248
+ var WarpEvmConstants = {
249
+ GasLimit: {
250
+ Default: 21e3,
251
+ ContractCall: 1e5,
252
+ ContractDeploy: 5e5,
253
+ Transfer: 21e3,
254
+ Approve: 46e3,
255
+ Swap: 2e5
256
+ },
257
+ GasPrice: {
258
+ Default: "20000000000"
259
+ },
260
+ Validation: {
261
+ MinGasLimit: 21e3,
262
+ MaxGasLimit: 3e7
263
+ }
264
+ };
265
+ var EthereumExplorers = /* @__PURE__ */ ((EthereumExplorers2) => {
266
+ EthereumExplorers2["Etherscan"] = "etherscan";
267
+ EthereumExplorers2["EtherscanSepolia"] = "etherscan_sepolia";
268
+ EthereumExplorers2["Ethplorer"] = "ethplorer";
269
+ EthereumExplorers2["Blockscout"] = "blockscout";
270
+ EthereumExplorers2["BlockscoutSepolia"] = "blockscout_sepolia";
271
+ return EthereumExplorers2;
272
+ })(EthereumExplorers || {});
273
+ var ArbitrumExplorers = /* @__PURE__ */ ((ArbitrumExplorers2) => {
274
+ ArbitrumExplorers2["Arbiscan"] = "arbiscan";
275
+ ArbitrumExplorers2["ArbiscanSepolia"] = "arbiscan_sepolia";
276
+ ArbitrumExplorers2["BlockscoutArbitrum"] = "blockscout_arbitrum";
277
+ ArbitrumExplorers2["BlockscoutArbitrumSepolia"] = "blockscout_arbitrum_sepolia";
278
+ return ArbitrumExplorers2;
279
+ })(ArbitrumExplorers || {});
280
+ var BaseExplorers = /* @__PURE__ */ ((BaseExplorers2) => {
281
+ BaseExplorers2["Basescan"] = "basescan";
282
+ BaseExplorers2["BasescanSepolia"] = "basescan_sepolia";
283
+ BaseExplorers2["BlockscoutBase"] = "blockscout_base";
284
+ BaseExplorers2["BlockscoutBaseSepolia"] = "blockscout_base_sepolia";
285
+ return BaseExplorers2;
286
+ })(BaseExplorers || {});
287
+ var EvmExplorers = {
288
+ ethereum: {
289
+ mainnet: ["etherscan" /* Etherscan */, "ethplorer" /* Ethplorer */, "blockscout" /* Blockscout */],
290
+ testnet: ["etherscan_sepolia" /* EtherscanSepolia */, "blockscout_sepolia" /* BlockscoutSepolia */],
291
+ devnet: ["etherscan_sepolia" /* EtherscanSepolia */, "blockscout_sepolia" /* BlockscoutSepolia */]
292
+ },
293
+ arbitrum: {
294
+ mainnet: ["arbiscan" /* Arbiscan */, "blockscout_arbitrum" /* BlockscoutArbitrum */],
295
+ testnet: ["arbiscan_sepolia" /* ArbiscanSepolia */, "blockscout_arbitrum_sepolia" /* BlockscoutArbitrumSepolia */],
296
+ devnet: ["arbiscan_sepolia" /* ArbiscanSepolia */, "blockscout_arbitrum_sepolia" /* BlockscoutArbitrumSepolia */]
297
+ },
298
+ base: {
299
+ mainnet: ["basescan" /* Basescan */, "blockscout_base" /* BlockscoutBase */],
300
+ testnet: ["basescan_sepolia" /* BasescanSepolia */, "blockscout_base_sepolia" /* BlockscoutBaseSepolia */],
301
+ devnet: ["basescan_sepolia" /* BasescanSepolia */, "blockscout_base_sepolia" /* BlockscoutBaseSepolia */]
302
+ }
303
+ };
304
+ var ExplorerUrls = {
305
+ ["etherscan" /* Etherscan */]: "https://etherscan.io",
306
+ ["etherscan_sepolia" /* EtherscanSepolia */]: "https://sepolia.etherscan.io",
307
+ ["ethplorer" /* Ethplorer */]: "https://ethplorer.io",
308
+ ["blockscout" /* Blockscout */]: "https://eth.blockscout.com",
309
+ ["blockscout_sepolia" /* BlockscoutSepolia */]: "https://sepolia.blockscout.com",
310
+ ["arbiscan" /* Arbiscan */]: "https://arbiscan.io",
311
+ ["arbiscan_sepolia" /* ArbiscanSepolia */]: "https://sepolia.arbiscan.io",
312
+ ["blockscout_arbitrum" /* BlockscoutArbitrum */]: "https://arbitrum.blockscout.com",
313
+ ["blockscout_arbitrum_sepolia" /* BlockscoutArbitrumSepolia */]: "https://sepolia.blockscout.com",
314
+ ["basescan" /* Basescan */]: "https://basescan.org",
315
+ ["basescan_sepolia" /* BasescanSepolia */]: "https://sepolia.basescan.org",
316
+ ["blockscout_base" /* BlockscoutBase */]: "https://base.blockscout.com",
317
+ ["blockscout_base_sepolia" /* BlockscoutBaseSepolia */]: "https://sepolia.blockscout.com"
318
+ };
319
+
354
320
  // src/WarpEvmResults.ts
355
321
  var import_warps2 = require("@vleap/warps");
356
322
 
@@ -594,7 +560,7 @@ var WarpEvmExecutor = class {
594
560
  return tx;
595
561
  }
596
562
  async createTransferTransaction(executable) {
597
- const userWallet = this.config.user?.wallets?.[executable.chain.name];
563
+ const userWallet = this.config.user?.wallets?.[executable.chain];
598
564
  if (!userWallet) throw new Error("WarpEvmExecutor: createTransfer - user address not set");
599
565
  if (!import_ethers3.ethers.isAddress(executable.destination)) {
600
566
  throw new Error(`WarpEvmExecutor: Invalid destination address: ${executable.destination}`);
@@ -610,7 +576,7 @@ var WarpEvmExecutor = class {
610
576
  return this.estimateGasAndSetDefaults(tx, userWallet);
611
577
  }
612
578
  async createContractCallTransaction(executable) {
613
- const userWallet = this.config.user?.wallets?.[executable.chain.name];
579
+ const userWallet = this.config.user?.wallets?.[executable.chain];
614
580
  if (!userWallet) throw new Error("WarpEvmExecutor: createContractCall - user address not set");
615
581
  const action = (0, import_warps3.getWarpActionByIndex)(executable.warp, executable.action);
616
582
  if (!action || !("func" in action) || !action.func) {
@@ -661,24 +627,12 @@ var WarpEvmExecutor = class {
661
627
  executable.action,
662
628
  executable.resolvedInputs
663
629
  );
664
- const mockAdapter = {
665
- chain: "ethereum",
666
- prefix: "eth",
667
- builder: () => ({}),
668
- executor: {},
669
- results: {},
670
- serializer: {},
671
- registry: {},
672
- explorer: () => ({}),
673
- abiBuilder: () => ({}),
674
- brandBuilder: () => ({})
675
- };
676
- const next = (0, import_warps3.getNextInfo)(this.config, mockAdapter, executable.warp, executable.action, results);
630
+ const next = (0, import_warps3.getNextInfo)(this.config, [], executable.warp, executable.action, results);
677
631
  return {
678
632
  success: isSuccess,
679
633
  warp: executable.warp,
680
634
  action: executable.action,
681
- user: this.config.user?.wallets?.[executable.chain.name] || null,
635
+ user: this.config.user?.wallets?.[executable.chain] || null,
682
636
  txHash: null,
683
637
  next,
684
638
  values,
@@ -690,7 +644,7 @@ var WarpEvmExecutor = class {
690
644
  success: false,
691
645
  warp: executable.warp,
692
646
  action: executable.action,
693
- user: this.config.user?.wallets?.[executable.chain.name] || null,
647
+ user: this.config.user?.wallets?.[executable.chain] || null,
694
648
  txHash: null,
695
649
  next: null,
696
650
  values: [],
@@ -784,8 +738,23 @@ var WarpEvmExplorer = class {
784
738
  this.chain = chain;
785
739
  this.config = config;
786
740
  }
741
+ getExplorers() {
742
+ const chainExplorers = EvmExplorers[this.chain];
743
+ if (!chainExplorers) {
744
+ return ["Default"];
745
+ }
746
+ const explorers = chainExplorers[this.config.env];
747
+ if (!explorers) {
748
+ return ["Default"];
749
+ }
750
+ return explorers;
751
+ }
752
+ getPrimaryExplorer() {
753
+ const explorers = this.getExplorers();
754
+ return explorers[0];
755
+ }
787
756
  getExplorerUrlByName(explorer) {
788
- const userPreference = this.chain.preferences?.explorers?.[this.chain.name];
757
+ const userPreference = this.config.preferences?.explorers?.[this.chain];
789
758
  if (userPreference && !explorer) {
790
759
  const url2 = ExplorerUrls[userPreference];
791
760
  if (url2) return url2;
@@ -794,9 +763,9 @@ var WarpEvmExplorer = class {
794
763
  const url2 = ExplorerUrls[explorer];
795
764
  if (url2) return url2;
796
765
  }
797
- const primaryExplorer = getPrimaryEvmExplorer(this.chain.name, this.config.env);
766
+ const primaryExplorer = this.getPrimaryExplorer();
798
767
  const url = ExplorerUrls[primaryExplorer];
799
- return url || getEvmExplorerUrl(this.config.env, this.chain.name);
768
+ return url || ExplorerUrls[primaryExplorer];
800
769
  }
801
770
  getAccountUrl(address, explorer) {
802
771
  const baseUrl = this.getExplorerUrlByName(explorer);
@@ -819,18 +788,11 @@ var WarpEvmExplorer = class {
819
788
  return `${baseUrl}/address/${contractAddress}`;
820
789
  }
821
790
  getAllExplorers() {
822
- try {
823
- return getEvmExplorers(this.chain.name, this.config.env);
824
- } catch {
825
- return ["Default"];
826
- }
791
+ return this.getExplorers();
827
792
  }
828
793
  getExplorerByName(name) {
829
- try {
830
- return getEvmExplorerByName(this.chain.name, this.config.env, name);
831
- } catch {
832
- return void 0;
833
- }
794
+ const explorers = this.getExplorers();
795
+ return explorers.find((explorer) => explorer.toLowerCase() === name.toLowerCase());
834
796
  }
835
797
  getAccountUrls(address) {
836
798
  const explorers = this.getAllExplorers();
@@ -856,32 +818,128 @@ var WarpEvmExplorer = class {
856
818
  }
857
819
  };
858
820
 
859
- // src/main.ts
860
- var getEthereumAdapter = createEvmAdapter("ethereum", "eth");
861
- var getArbitrumAdapter = createEvmAdapter("arbitrum", "arb");
862
- var getBaseAdapter = createEvmAdapter("base", "base");
863
- var getAllEvmAdapters = (config, fallback) => [
864
- getEthereumAdapter(config, fallback),
865
- getArbitrumAdapter(config, fallback),
866
- getBaseAdapter(config, fallback)
867
- ];
868
- function createEvmAdapter(chainName, chainPrefix) {
821
+ // src/chains/common.ts
822
+ var createEvmAdapter = (chainName, chainPrefix, chainInfos) => {
869
823
  return (config, fallback) => {
870
824
  if (!fallback) throw new Error(`${chainName} adapter requires a fallback adapter`);
871
825
  return {
872
826
  chain: chainName,
827
+ chainInfo: chainInfos[config.env],
873
828
  prefix: chainPrefix,
874
829
  builder: () => new WarpEvmBuilder(config),
875
830
  executor: new WarpEvmExecutor(config),
876
831
  results: new WarpEvmResults(config),
877
832
  serializer: new WarpEvmSerializer(),
878
833
  registry: fallback.registry,
879
- explorer: (chainInfo) => new WarpEvmExplorer(chainInfo, config),
834
+ explorer: new WarpEvmExplorer(chainInfos[config.env], config),
880
835
  abiBuilder: () => fallback.abiBuilder(),
881
836
  brandBuilder: () => fallback.brandBuilder()
882
837
  };
883
838
  };
884
- }
839
+ };
840
+
841
+ // src/chains/arbitrum.ts
842
+ var ChainName = "arbitrum";
843
+ var getArbitrumAdapter = createEvmAdapter(ChainName, "arb", {
844
+ devnet: {
845
+ name: ChainName,
846
+ displayName: "Arbitrum Devnet",
847
+ chainId: "421614",
848
+ blockTime: 1e3,
849
+ addressHrp: "0x",
850
+ apiUrl: "https://sepolia-rollup.arbitrum.io/rpc",
851
+ nativeToken: "ETH"
852
+ },
853
+ testnet: {
854
+ name: ChainName,
855
+ displayName: "Arbitrum Testnet",
856
+ chainId: "421613",
857
+ blockTime: 1e3,
858
+ addressHrp: "0x",
859
+ apiUrl: "https://goerli-rollup.arbitrum.io/rpc",
860
+ nativeToken: "ETH"
861
+ },
862
+ mainnet: {
863
+ name: ChainName,
864
+ displayName: "Arbitrum",
865
+ chainId: "42161",
866
+ blockTime: 1e3,
867
+ addressHrp: "0x",
868
+ apiUrl: "https://arb1.arbitrum.io/rpc",
869
+ nativeToken: "ETH"
870
+ }
871
+ });
872
+
873
+ // src/chains/base.ts
874
+ var ChainName2 = "base";
875
+ var getBaseAdapter = createEvmAdapter(ChainName2, "base", {
876
+ mainnet: {
877
+ name: ChainName2,
878
+ displayName: "Base",
879
+ chainId: "8453",
880
+ blockTime: 2e3,
881
+ addressHrp: "0x",
882
+ apiUrl: "https://mainnet.base.org",
883
+ nativeToken: "ETH"
884
+ },
885
+ testnet: {
886
+ name: ChainName2,
887
+ displayName: "Base",
888
+ chainId: "84531",
889
+ blockTime: 2e3,
890
+ addressHrp: "0x",
891
+ apiUrl: "https://goerli.base.org",
892
+ nativeToken: "ETH"
893
+ },
894
+ devnet: {
895
+ name: ChainName2,
896
+ displayName: "Base",
897
+ chainId: "84532",
898
+ blockTime: 2e3,
899
+ addressHrp: "0x",
900
+ apiUrl: "https://sepolia.base.org",
901
+ nativeToken: "ETH"
902
+ }
903
+ });
904
+
905
+ // src/chains/ethereum.ts
906
+ var ChainName3 = "ethereum";
907
+ var getEthereumAdapter = createEvmAdapter(ChainName3, "eth", {
908
+ devnet: {
909
+ name: ChainName3,
910
+ displayName: "Ethereum Devnet",
911
+ chainId: "11155111",
912
+ blockTime: 12e3,
913
+ addressHrp: "0x",
914
+ apiUrl: "https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY",
915
+ nativeToken: "ETH"
916
+ },
917
+ testnet: {
918
+ name: ChainName3,
919
+ displayName: "Ethereum Testnet",
920
+ chainId: "5",
921
+ blockTime: 12e3,
922
+ addressHrp: "0x",
923
+ apiUrl: "https://eth-goerli.g.alchemy.com/v2/YOUR_API_KEY",
924
+ nativeToken: "ETH"
925
+ },
926
+ mainnet: {
927
+ name: ChainName3,
928
+ displayName: "Ethereum Mainnet",
929
+ chainId: "1",
930
+ blockTime: 12e3,
931
+ addressHrp: "0x",
932
+ apiUrl: "https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY",
933
+ nativeToken: "ETH"
934
+ }
935
+ });
936
+
937
+ // src/chains/combined.ts
938
+ var getAllEvmAdapters = (config, fallback) => [
939
+ getEthereumAdapter(config, fallback),
940
+ getArbitrumAdapter(config, fallback),
941
+ getBaseAdapter(config, fallback)
942
+ ];
885
943
  // Annotate the CommonJS export names for ESM import in node:
886
944
  0 && (module.exports = {
887
945
  ArbitrumExplorers,
@@ -890,7 +948,6 @@ function createEvmAdapter(chainName, chainPrefix) {
890
948
  EthereumExplorers,
891
949
  EvmExplorers,
892
950
  ExplorerUrls,
893
- LocalExplorers,
894
951
  WarpEvmBuilder,
895
952
  WarpEvmConstants,
896
953
  WarpEvmExecutor,
@@ -903,10 +960,6 @@ function createEvmAdapter(chainName, chainPrefix) {
903
960
  getEthereumAdapter,
904
961
  getEvmApiUrl,
905
962
  getEvmChainConfig,
906
- getEvmExplorerByName,
907
- getEvmExplorerUrl,
908
- getEvmExplorerUrlByName,
909
- getEvmExplorers,
910
- getPrimaryEvmExplorer
963
+ getEvmExplorerUrl
911
964
  });
912
965
  //# sourceMappingURL=index.js.map