rocketh 0.10.6 → 0.10.8

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.cjs CHANGED
@@ -31,10 +31,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  chainById: () => chainById,
34
+ chainTypes: () => chainTypes,
34
35
  execute: () => execute,
35
36
  executeDeployScripts: () => executeDeployScripts,
36
37
  extendEnvironment: () => extendEnvironment,
37
38
  getChain: () => getChain,
39
+ getGasPriceEstimate: () => getGasPriceEstimate,
40
+ getRoughGasPriceEstimate: () => getRoughGasPriceEstimate,
38
41
  handleSignerProtocol: () => handleSignerProtocol,
39
42
  loadAndExecuteDeployments: () => loadAndExecuteDeployments,
40
43
  loadDeployments: () => loadDeployments,
@@ -88,7 +91,7 @@ var import_node_fs4 = __toESM(require("fs"), 1);
88
91
 
89
92
  // src/environment/index.ts
90
93
  var import_node_fs3 = __toESM(require("fs"), 1);
91
- var import_viem = require("viem");
94
+ var import_viem3 = require("viem");
92
95
  var import_eip_1193_jsonrpc_provider = require("eip-1193-jsonrpc-provider");
93
96
  var import_node_path3 = __toESM(require("path"), 1);
94
97
 
@@ -258,11 +261,144 @@ function log(message) {
258
261
 
259
262
  // src/environment/utils/chains.ts
260
263
  var import_chains = __toESM(require("viem/chains"), 1);
264
+
265
+ // src/environment/utils/extra-chains/index.ts
266
+ var extra_chains_exports = {};
267
+ __export(extra_chains_exports, {
268
+ ancient8: () => ancient8,
269
+ ancient8Sepolia: () => ancient8Sepolia
270
+ });
271
+
272
+ // src/environment/utils/extra-chains/ancient8.ts
273
+ var import_viem = require("viem");
274
+ var import_op_stack = require("viem/op-stack");
275
+ var sourceId = 1;
276
+ var ancient8 = (0, import_viem.defineChain)({
277
+ ...import_op_stack.chainConfig,
278
+ id: 888888888,
279
+ name: "Ancient8",
280
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
281
+ rpcUrls: {
282
+ default: {
283
+ http: ["https://rpc.ancient8.gg"]
284
+ }
285
+ },
286
+ blockExplorers: {
287
+ default: {
288
+ name: "Ancient8 explorer",
289
+ url: "https://scan.ancient8.gg",
290
+ apiUrl: "https://scan.ancient8.gg/api"
291
+ }
292
+ },
293
+ contracts: {
294
+ ...import_op_stack.chainConfig.contracts,
295
+ l2OutputOracle: {
296
+ [sourceId]: {
297
+ address: "0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"
298
+ }
299
+ },
300
+ portal: {
301
+ [sourceId]: {
302
+ address: "0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",
303
+ blockCreated: 19070571
304
+ }
305
+ },
306
+ l1StandardBridge: {
307
+ [sourceId]: {
308
+ address: "0xd5e3eDf5b68135D559D572E26bF863FBC1950033",
309
+ blockCreated: 19070571
310
+ }
311
+ }
312
+ },
313
+ sourceId
314
+ });
315
+
316
+ // src/environment/utils/extra-chains/ancient8Sepolia.ts
317
+ var import_viem2 = require("viem");
318
+ var import_op_stack2 = require("viem/op-stack");
319
+ var sourceId2 = 11155111;
320
+ var ancient8Sepolia = (0, import_viem2.defineChain)({
321
+ ...import_op_stack2.chainConfig,
322
+ id: 28122024,
323
+ name: "Ancient8 Testnet",
324
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
325
+ rpcUrls: {
326
+ default: {
327
+ http: ["https://rpcv2-testnet.ancient8.gg"]
328
+ }
329
+ },
330
+ blockExplorers: {
331
+ default: {
332
+ name: "Ancient8 Celestia Testnet explorer",
333
+ url: "https://scanv2-testnet.ancient8.gg",
334
+ apiUrl: "https://scanv2-testnet.ancient8.gg/api"
335
+ }
336
+ },
337
+ contracts: {
338
+ ...import_op_stack2.chainConfig.contracts,
339
+ l2OutputOracle: {
340
+ [sourceId2]: {
341
+ address: "0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"
342
+ }
343
+ },
344
+ portal: {
345
+ [sourceId2]: {
346
+ address: "0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",
347
+ blockCreated: 4972908
348
+ }
349
+ },
350
+ l1StandardBridge: {
351
+ [sourceId2]: {
352
+ address: "0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",
353
+ blockCreated: 4972908
354
+ }
355
+ }
356
+ },
357
+ sourceId: sourceId2
358
+ });
359
+
360
+ // src/environment/utils/chains.ts
361
+ var chainTypesByNames = {
362
+ base: "op-stack",
363
+ baseGoerli: "op-stack",
364
+ baseSepolia: "op-stack",
365
+ optimism: "op-stack",
366
+ optimismGoerli: "op-stack",
367
+ optimismSepolia: "op-stack",
368
+ pgn: "op-stack",
369
+ pgnTestnet: "op-stack",
370
+ zora: "op-stack",
371
+ zoraSepolia: "op-stack",
372
+ zoraTestnet: "op-stack",
373
+ ancient8: "op-stack",
374
+ ancient8Sepolia: "op-stack",
375
+ celoAlfajores: "celo",
376
+ celo: "celo",
377
+ zkSync: "zksync",
378
+ zkSyncTestnet: "zksync",
379
+ zkSyncSepoliaTestnet: "zksync"
380
+ };
381
+ var chainTypes = {};
261
382
  var chainById = {};
262
383
  var allChains = import_chains.default.default || import_chains.default;
263
384
  for (const key of Object.keys(allChains)) {
264
385
  const chain = allChains[key];
265
- chainById[chain.id.toString()] = chain;
386
+ const chainId = chain.id.toString();
387
+ const specificChainType = chainTypesByNames[key];
388
+ if (specificChainType) {
389
+ chainTypes[chainId] = specificChainType;
390
+ }
391
+ chainById[chainId] = chain;
392
+ }
393
+ var moreChains = extra_chains_exports;
394
+ for (const key of Object.keys(moreChains)) {
395
+ const chain = moreChains[key];
396
+ const chainId = chain.id.toString();
397
+ const specificChainType = chainTypesByNames[key];
398
+ if (specificChainType) {
399
+ chainTypes[chainId] = specificChainType;
400
+ }
401
+ chainById[chainId] = chain;
266
402
  }
267
403
  function getChain(id) {
268
404
  const chain = chainById[id];
@@ -463,8 +599,8 @@ function displayTransaction(transaction) {
463
599
  async function createEnvironment(config, providedContext) {
464
600
  const rawProvider = "provider" in config.network ? config.network.provider : new import_eip_1193_jsonrpc_provider.JSONRPCHTTPProvider(config.network.nodeUrl);
465
601
  const provider = new TransactionHashTracker(rawProvider);
466
- const transport = (0, import_viem.custom)(provider);
467
- const viemClient = (0, import_viem.createPublicClient)({ transport });
602
+ const transport = (0, import_viem3.custom)(provider);
603
+ const viemClient = (0, import_viem3.createPublicClient)({ transport });
468
604
  const chainId = (await viemClient.getChainId()).toString();
469
605
  let genesisHash;
470
606
  try {
@@ -1007,7 +1143,7 @@ async function getRoughGasPriceEstimate(provider, options) {
1007
1143
 
1008
1144
  // src/executor/index.ts
1009
1145
  var import_prompts = __toESM(require("prompts"), 1);
1010
- var import_viem2 = require("viem");
1146
+ var import_viem4 = require("viem");
1011
1147
  if (!process.env["ROCKETH_SKIP_ESBUILD"]) {
1012
1148
  require("esbuild-register/dist/node").register();
1013
1149
  }
@@ -1265,13 +1401,13 @@ async function executeDeployScripts(config, args) {
1265
1401
  type: "confirm",
1266
1402
  name: "proceed",
1267
1403
  message: `gas price is currently in this range:
1268
- slow: ${(0, import_viem2.formatEther)(gasPriceEstimate.slow.maxFeePerGas)} (priority: ${(0, import_viem2.formatEther)(
1404
+ slow: ${(0, import_viem4.formatEther)(gasPriceEstimate.slow.maxFeePerGas)} (priority: ${(0, import_viem4.formatEther)(
1269
1405
  gasPriceEstimate.slow.maxPriorityFeePerGas
1270
1406
  )})
1271
- average: ${(0, import_viem2.formatEther)(gasPriceEstimate.average.maxFeePerGas)} (priority: ${(0, import_viem2.formatEther)(
1407
+ average: ${(0, import_viem4.formatEther)(gasPriceEstimate.average.maxFeePerGas)} (priority: ${(0, import_viem4.formatEther)(
1272
1408
  gasPriceEstimate.average.maxPriorityFeePerGas
1273
1409
  )})
1274
- fast: ${(0, import_viem2.formatEther)(gasPriceEstimate.fast.maxFeePerGas)} (priority: ${(0, import_viem2.formatEther)(
1410
+ fast: ${(0, import_viem4.formatEther)(gasPriceEstimate.fast.maxFeePerGas)} (priority: ${(0, import_viem4.formatEther)(
1275
1411
  gasPriceEstimate.fast.maxPriorityFeePerGas
1276
1412
  )})
1277
1413
 
@@ -1329,10 +1465,13 @@ Do you want to proceed (note that gas price can change for each tx)`
1329
1465
  // Annotate the CommonJS export names for ESM import in node:
1330
1466
  0 && (module.exports = {
1331
1467
  chainById,
1468
+ chainTypes,
1332
1469
  execute,
1333
1470
  executeDeployScripts,
1334
1471
  extendEnvironment,
1335
1472
  getChain,
1473
+ getGasPriceEstimate,
1474
+ getRoughGasPriceEstimate,
1336
1475
  handleSignerProtocol,
1337
1476
  loadAndExecuteDeployments,
1338
1477
  loadDeployments,