rocketh 0.10.7 → 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/CHANGELOG.md +6 -0
- package/dist/{chunk-MEL67HDP.js → chunk-LUXDAM6F.js} +141 -2
- package/dist/chunk-LUXDAM6F.js.map +1 -0
- package/dist/cli.cjs +146 -9
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +143 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/src/environment/utils/chains.ts +43 -1
- package/src/environment/utils/extra-chains/ancient8.ts +44 -0
- package/src/environment/utils/extra-chains/ancient8Sepolia.ts +44 -0
- package/src/environment/utils/extra-chains/index.ts +2 -0
- package/dist/chunk-MEL67HDP.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ 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,
|
|
@@ -90,7 +91,7 @@ var import_node_fs4 = __toESM(require("fs"), 1);
|
|
|
90
91
|
|
|
91
92
|
// src/environment/index.ts
|
|
92
93
|
var import_node_fs3 = __toESM(require("fs"), 1);
|
|
93
|
-
var
|
|
94
|
+
var import_viem3 = require("viem");
|
|
94
95
|
var import_eip_1193_jsonrpc_provider = require("eip-1193-jsonrpc-provider");
|
|
95
96
|
var import_node_path3 = __toESM(require("path"), 1);
|
|
96
97
|
|
|
@@ -260,11 +261,144 @@ function log(message) {
|
|
|
260
261
|
|
|
261
262
|
// src/environment/utils/chains.ts
|
|
262
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 = {};
|
|
263
382
|
var chainById = {};
|
|
264
383
|
var allChains = import_chains.default.default || import_chains.default;
|
|
265
384
|
for (const key of Object.keys(allChains)) {
|
|
266
385
|
const chain = allChains[key];
|
|
267
|
-
|
|
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;
|
|
268
402
|
}
|
|
269
403
|
function getChain(id) {
|
|
270
404
|
const chain = chainById[id];
|
|
@@ -465,8 +599,8 @@ function displayTransaction(transaction) {
|
|
|
465
599
|
async function createEnvironment(config, providedContext) {
|
|
466
600
|
const rawProvider = "provider" in config.network ? config.network.provider : new import_eip_1193_jsonrpc_provider.JSONRPCHTTPProvider(config.network.nodeUrl);
|
|
467
601
|
const provider = new TransactionHashTracker(rawProvider);
|
|
468
|
-
const transport = (0,
|
|
469
|
-
const viemClient = (0,
|
|
602
|
+
const transport = (0, import_viem3.custom)(provider);
|
|
603
|
+
const viemClient = (0, import_viem3.createPublicClient)({ transport });
|
|
470
604
|
const chainId = (await viemClient.getChainId()).toString();
|
|
471
605
|
let genesisHash;
|
|
472
606
|
try {
|
|
@@ -1009,7 +1143,7 @@ async function getRoughGasPriceEstimate(provider, options) {
|
|
|
1009
1143
|
|
|
1010
1144
|
// src/executor/index.ts
|
|
1011
1145
|
var import_prompts = __toESM(require("prompts"), 1);
|
|
1012
|
-
var
|
|
1146
|
+
var import_viem4 = require("viem");
|
|
1013
1147
|
if (!process.env["ROCKETH_SKIP_ESBUILD"]) {
|
|
1014
1148
|
require("esbuild-register/dist/node").register();
|
|
1015
1149
|
}
|
|
@@ -1267,13 +1401,13 @@ async function executeDeployScripts(config, args) {
|
|
|
1267
1401
|
type: "confirm",
|
|
1268
1402
|
name: "proceed",
|
|
1269
1403
|
message: `gas price is currently in this range:
|
|
1270
|
-
slow: ${(0,
|
|
1404
|
+
slow: ${(0, import_viem4.formatEther)(gasPriceEstimate.slow.maxFeePerGas)} (priority: ${(0, import_viem4.formatEther)(
|
|
1271
1405
|
gasPriceEstimate.slow.maxPriorityFeePerGas
|
|
1272
1406
|
)})
|
|
1273
|
-
average: ${(0,
|
|
1407
|
+
average: ${(0, import_viem4.formatEther)(gasPriceEstimate.average.maxFeePerGas)} (priority: ${(0, import_viem4.formatEther)(
|
|
1274
1408
|
gasPriceEstimate.average.maxPriorityFeePerGas
|
|
1275
1409
|
)})
|
|
1276
|
-
fast: ${(0,
|
|
1410
|
+
fast: ${(0, import_viem4.formatEther)(gasPriceEstimate.fast.maxFeePerGas)} (priority: ${(0, import_viem4.formatEther)(
|
|
1277
1411
|
gasPriceEstimate.fast.maxPriorityFeePerGas
|
|
1278
1412
|
)})
|
|
1279
1413
|
|
|
@@ -1331,6 +1465,7 @@ Do you want to proceed (note that gas price can change for each tx)`
|
|
|
1331
1465
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1332
1466
|
0 && (module.exports = {
|
|
1333
1467
|
chainById,
|
|
1468
|
+
chainTypes,
|
|
1334
1469
|
execute,
|
|
1335
1470
|
executeDeployScripts,
|
|
1336
1471
|
extendEnvironment,
|