@bgd-labs/toolbox 0.0.50 → 0.0.52
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.d.mts +28 -31
- package/dist/index.d.ts +28 -31
- package/dist/index.js +47 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -32
- package/dist/index.mjs.map +1 -1
- package/dist/node.js +47 -31
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +49 -32
- package/dist/node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -395,7 +395,19 @@ type BlockscoutStyleSourceCode = {
|
|
|
395
395
|
EVMVersion: string;
|
|
396
396
|
OptimizationUsed: string;
|
|
397
397
|
};
|
|
398
|
-
declare function getSourceCode(params: GetSourceCodeParams): Promise<
|
|
398
|
+
declare function getSourceCode(params: GetSourceCodeParams): Promise<BlockscoutStyleSourceCode | {
|
|
399
|
+
SourceCode: any;
|
|
400
|
+
ABI: any;
|
|
401
|
+
CompilerVersion: any;
|
|
402
|
+
ContractName: any;
|
|
403
|
+
EVMVersion: any;
|
|
404
|
+
Implementation: any;
|
|
405
|
+
Library: any;
|
|
406
|
+
LicenseType: any;
|
|
407
|
+
OptimizationUsed: any;
|
|
408
|
+
Proxy: any;
|
|
409
|
+
Runs: any;
|
|
410
|
+
}>;
|
|
399
411
|
declare function parseEtherscanStyleSourceCode(sourceCode: string): StandardJsonInput;
|
|
400
412
|
declare function parseBlockscoutStyleSourceCode(sourceCode: BlockscoutStyleSourceCode): StandardJsonInput;
|
|
401
413
|
|
|
@@ -717,6 +729,7 @@ declare const ChainId: {
|
|
|
717
729
|
readonly soneium: 1868;
|
|
718
730
|
readonly bob: 60808;
|
|
719
731
|
readonly plasma: 9745;
|
|
732
|
+
readonly xLayer: 196;
|
|
720
733
|
};
|
|
721
734
|
declare const ChainList: Record<valueOf<typeof ChainId>, Chain>;
|
|
722
735
|
|
|
@@ -742,8 +755,8 @@ declare const publicRPCs: {
|
|
|
742
755
|
readonly 9745: "https://rpc.plasma.to";
|
|
743
756
|
readonly 57073: "https://ink-public.nodies.app";
|
|
744
757
|
};
|
|
745
|
-
declare const alchemySupportedChainIds: (1 | 10 | 56 | 100 | 137 | 146 | 324 |
|
|
746
|
-
declare const getNetworkEnv: (chainId: SupportedChainIds) => "RPC_BNB" | "RPC_CELO" | "RPC_METIS" | "RPC_BOB" | "RPC_BASE" | "RPC_SCROLL" | "RPC_MAINNET" | "RPC_POLYGON" | "RPC_POLYGON_AMOY" | "RPC_AVALANCHE" | "RPC_AVALANCHE_FUJI" | "RPC_ARBITRUM" | "RPC_ARBITRUM_SEPOLIA" | "RPC_FANTOM" | "RPC_FANTOM_TESTNET" | "RPC_OPTIMISM" | "RPC_OPTIMISM_SEPOLIA" | "RPC_HARMONY" | "RPC_SEPOLIA" | "RPC_SCROLL_SEPOLIA" | "RPC_SONIC" | "RPC_MANTLE" | "RPC_BASE_SEPOLIA" | "RPC_GNOSIS" | "RPC_ZKEVM" | "RPC_ZKSYNC" | "RPC_LINEA" | "RPC_INK" | "RPC_SONEIUM" | "RPC_PLASMA";
|
|
758
|
+
declare const alchemySupportedChainIds: (1 | 10 | 56 | 100 | 137 | 146 | 324 | 5000 | 8453 | 42161 | 42220 | 43113 | 43114 | 59144 | 80002 | 84532 | 421614 | 534351 | 534352 | 11155111 | 11155420 | 1088 | 9745 | 57073 | 250 | 1868 | 60808 | 1666600000 | 4002 | 1101 | 196)[];
|
|
759
|
+
declare const getNetworkEnv: (chainId: SupportedChainIds) => "RPC_BNB" | "RPC_CELO" | "RPC_METIS" | "RPC_BOB" | "RPC_BASE" | "RPC_SCROLL" | "RPC_MAINNET" | "RPC_POLYGON" | "RPC_POLYGON_AMOY" | "RPC_AVALANCHE" | "RPC_AVALANCHE_FUJI" | "RPC_ARBITRUM" | "RPC_ARBITRUM_SEPOLIA" | "RPC_FANTOM" | "RPC_FANTOM_TESTNET" | "RPC_OPTIMISM" | "RPC_OPTIMISM_SEPOLIA" | "RPC_HARMONY" | "RPC_SEPOLIA" | "RPC_SCROLL_SEPOLIA" | "RPC_SONIC" | "RPC_MANTLE" | "RPC_BASE_SEPOLIA" | "RPC_GNOSIS" | "RPC_ZKEVM" | "RPC_ZKSYNC" | "RPC_LINEA" | "RPC_INK" | "RPC_SONEIUM" | "RPC_PLASMA" | "RPC_XLAYER";
|
|
747
760
|
declare function getExplicitRPC(chainId: SupportedChainIds): string;
|
|
748
761
|
declare function getAlchemyRPC(chainId: SupportedChainIds, alchemyKey: string): string;
|
|
749
762
|
declare function getPublicRpc(chainId: SupportedChainIds): "https://mainnet.era.zksync.io" | "https://api.avax.network/ext/bc/C/rpc" | "https://rpc.linea.build" | "https://rpc.scroll.io" | "https://andromeda.metis.io/?owner=1088" | "https://rpc.plasma.to" | "https://rpc.gobob.xyz" | "https://eth.llamarpc.com" | "https://polygon.llamarpc.com" | "https://base.llamarpc.com" | "https://binance.llamarpc.com" | "https://rpc.ankr.com/gnosis" | "https://rpc.ftm.tools" | "https://ink-public.nodies.app";
|
|
@@ -1176,10 +1189,6 @@ declare const etherscanExplorers: {
|
|
|
1176
1189
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1177
1190
|
readonly explorer: "https://testnet.bttcscan.com/";
|
|
1178
1191
|
};
|
|
1179
|
-
readonly 1101: {
|
|
1180
|
-
readonly api: "https://api.etherscan.io/v2/api";
|
|
1181
|
-
readonly explorer: "https://zkevm.polygonscan.com/";
|
|
1182
|
-
};
|
|
1183
1192
|
readonly 1284: {
|
|
1184
1193
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1185
1194
|
readonly explorer: "https://moonbeam.moonscan.io/";
|
|
@@ -1212,10 +1221,6 @@ declare const etherscanExplorers: {
|
|
|
1212
1221
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1213
1222
|
readonly explorer: "https://sepolia.swellchainscan.io/";
|
|
1214
1223
|
};
|
|
1215
|
-
readonly 2442: {
|
|
1216
|
-
readonly api: "https://api.etherscan.io/v2/api";
|
|
1217
|
-
readonly explorer: "https://cardona-zkevm.polygonscan.com/";
|
|
1218
|
-
};
|
|
1219
1224
|
readonly 2522: {
|
|
1220
1225
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1221
1226
|
readonly explorer: "https://holesky.fraxscan.com/";
|
|
@@ -1292,10 +1297,6 @@ declare const etherscanExplorers: {
|
|
|
1292
1297
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1293
1298
|
readonly explorer: "https://testnet.memecorescan.io/";
|
|
1294
1299
|
};
|
|
1295
|
-
readonly 44787: {
|
|
1296
|
-
readonly api: "https://api.etherscan.io/v2/api";
|
|
1297
|
-
readonly explorer: "https://alfajores.celoscan.io/";
|
|
1298
|
-
};
|
|
1299
1300
|
readonly 50104: {
|
|
1300
1301
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1301
1302
|
readonly explorer: "https://sophscan.xyz/";
|
|
@@ -1332,9 +1333,9 @@ declare const etherscanExplorers: {
|
|
|
1332
1333
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1333
1334
|
readonly explorer: "https://taikoscan.io/";
|
|
1334
1335
|
};
|
|
1335
|
-
readonly
|
|
1336
|
+
readonly 167012: {
|
|
1336
1337
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1337
|
-
readonly explorer: "https://
|
|
1338
|
+
readonly explorer: "https://hoodi.taikoscan.io/";
|
|
1338
1339
|
};
|
|
1339
1340
|
readonly 421614: {
|
|
1340
1341
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
@@ -1352,10 +1353,18 @@ declare const etherscanExplorers: {
|
|
|
1352
1353
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1353
1354
|
readonly explorer: "https://hoodi.etherscan.io/";
|
|
1354
1355
|
};
|
|
1356
|
+
readonly 737373: {
|
|
1357
|
+
readonly api: "https://api.etherscan.io/v2/api";
|
|
1358
|
+
readonly explorer: "https://bokuto.katanascan.com/";
|
|
1359
|
+
};
|
|
1355
1360
|
readonly 747474: {
|
|
1356
1361
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1357
1362
|
readonly explorer: "https://katanascan.com/";
|
|
1358
1363
|
};
|
|
1364
|
+
readonly 11142220: {
|
|
1365
|
+
readonly api: "https://api.etherscan.io/v2/api";
|
|
1366
|
+
readonly explorer: "https://sepolia.celoscan.io/";
|
|
1367
|
+
};
|
|
1359
1368
|
readonly 11155111: {
|
|
1360
1369
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1361
1370
|
readonly explorer: "https://sepolia.etherscan.io/";
|
|
@@ -1539,10 +1548,6 @@ declare const routescanExplorers: {
|
|
|
1539
1548
|
readonly api: "https://api.routescan.io/v2/network/testnet/evm/2233/etherscan";
|
|
1540
1549
|
readonly explorer: "2233.routescan.io";
|
|
1541
1550
|
};
|
|
1542
|
-
readonly 2368: {
|
|
1543
|
-
readonly api: "https://api.routescan.io/v2/network/testnet/evm/2368/etherscan";
|
|
1544
|
-
readonly explorer: "2368.routescan.io";
|
|
1545
|
-
};
|
|
1546
1551
|
readonly 2522: {
|
|
1547
1552
|
readonly api: "https://api.routescan.io/v2/network/testnet/evm/2522/etherscan";
|
|
1548
1553
|
readonly explorer: "2522.routescan.io";
|
|
@@ -1643,10 +1648,6 @@ declare const routescanExplorers: {
|
|
|
1643
1648
|
readonly api: "https://api.routescan.io/v2/network/testnet/evm/6911/etherscan";
|
|
1644
1649
|
readonly explorer: "6911.routescan.io";
|
|
1645
1650
|
};
|
|
1646
|
-
readonly 7171: {
|
|
1647
|
-
readonly api: "https://api.routescan.io/v2/network/mainnet/evm/7171/etherscan";
|
|
1648
|
-
readonly explorer: "7171.routescan.io";
|
|
1649
|
-
};
|
|
1650
1651
|
readonly 7894: {
|
|
1651
1652
|
readonly api: "https://api.routescan.io/v2/network/testnet/evm/7894/etherscan";
|
|
1652
1653
|
readonly explorer: "7894.routescan.io";
|
|
@@ -1763,10 +1764,6 @@ declare const routescanExplorers: {
|
|
|
1763
1764
|
readonly api: "https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan";
|
|
1764
1765
|
readonly explorer: "34443.routescan.io";
|
|
1765
1766
|
};
|
|
1766
|
-
readonly 42069: {
|
|
1767
|
-
readonly api: "https://api.routescan.io/v2/network/mainnet/evm/42069/etherscan";
|
|
1768
|
-
readonly explorer: "42069.routescan.io";
|
|
1769
|
-
};
|
|
1770
1767
|
readonly 42161: {
|
|
1771
1768
|
readonly api: "https://api.routescan.io/v2/network/mainnet/evm/42161/etherscan";
|
|
1772
1769
|
readonly explorer: "42161.routescan.io";
|
|
@@ -3299,8 +3296,8 @@ declare const blockscoutExplorers: {
|
|
|
3299
3296
|
readonly explorer: "https://testnet3.cypherscan.ai/";
|
|
3300
3297
|
};
|
|
3301
3298
|
readonly 10200: {
|
|
3302
|
-
readonly api: "https://gnosis.blockscout.com/api";
|
|
3303
|
-
readonly explorer: "https://gnosis.blockscout.com/";
|
|
3299
|
+
readonly api: "https://gnosis-chiado.blockscout.com/api";
|
|
3300
|
+
readonly explorer: "https://gnosis-chiado.blockscout.com/";
|
|
3304
3301
|
};
|
|
3305
3302
|
readonly 10245: {
|
|
3306
3303
|
readonly api: "https://capxscan.com/api";
|
package/dist/index.d.ts
CHANGED
|
@@ -395,7 +395,19 @@ type BlockscoutStyleSourceCode = {
|
|
|
395
395
|
EVMVersion: string;
|
|
396
396
|
OptimizationUsed: string;
|
|
397
397
|
};
|
|
398
|
-
declare function getSourceCode(params: GetSourceCodeParams): Promise<
|
|
398
|
+
declare function getSourceCode(params: GetSourceCodeParams): Promise<BlockscoutStyleSourceCode | {
|
|
399
|
+
SourceCode: any;
|
|
400
|
+
ABI: any;
|
|
401
|
+
CompilerVersion: any;
|
|
402
|
+
ContractName: any;
|
|
403
|
+
EVMVersion: any;
|
|
404
|
+
Implementation: any;
|
|
405
|
+
Library: any;
|
|
406
|
+
LicenseType: any;
|
|
407
|
+
OptimizationUsed: any;
|
|
408
|
+
Proxy: any;
|
|
409
|
+
Runs: any;
|
|
410
|
+
}>;
|
|
399
411
|
declare function parseEtherscanStyleSourceCode(sourceCode: string): StandardJsonInput;
|
|
400
412
|
declare function parseBlockscoutStyleSourceCode(sourceCode: BlockscoutStyleSourceCode): StandardJsonInput;
|
|
401
413
|
|
|
@@ -717,6 +729,7 @@ declare const ChainId: {
|
|
|
717
729
|
readonly soneium: 1868;
|
|
718
730
|
readonly bob: 60808;
|
|
719
731
|
readonly plasma: 9745;
|
|
732
|
+
readonly xLayer: 196;
|
|
720
733
|
};
|
|
721
734
|
declare const ChainList: Record<valueOf<typeof ChainId>, Chain>;
|
|
722
735
|
|
|
@@ -742,8 +755,8 @@ declare const publicRPCs: {
|
|
|
742
755
|
readonly 9745: "https://rpc.plasma.to";
|
|
743
756
|
readonly 57073: "https://ink-public.nodies.app";
|
|
744
757
|
};
|
|
745
|
-
declare const alchemySupportedChainIds: (1 | 10 | 56 | 100 | 137 | 146 | 324 |
|
|
746
|
-
declare const getNetworkEnv: (chainId: SupportedChainIds) => "RPC_BNB" | "RPC_CELO" | "RPC_METIS" | "RPC_BOB" | "RPC_BASE" | "RPC_SCROLL" | "RPC_MAINNET" | "RPC_POLYGON" | "RPC_POLYGON_AMOY" | "RPC_AVALANCHE" | "RPC_AVALANCHE_FUJI" | "RPC_ARBITRUM" | "RPC_ARBITRUM_SEPOLIA" | "RPC_FANTOM" | "RPC_FANTOM_TESTNET" | "RPC_OPTIMISM" | "RPC_OPTIMISM_SEPOLIA" | "RPC_HARMONY" | "RPC_SEPOLIA" | "RPC_SCROLL_SEPOLIA" | "RPC_SONIC" | "RPC_MANTLE" | "RPC_BASE_SEPOLIA" | "RPC_GNOSIS" | "RPC_ZKEVM" | "RPC_ZKSYNC" | "RPC_LINEA" | "RPC_INK" | "RPC_SONEIUM" | "RPC_PLASMA";
|
|
758
|
+
declare const alchemySupportedChainIds: (1 | 10 | 56 | 100 | 137 | 146 | 324 | 5000 | 8453 | 42161 | 42220 | 43113 | 43114 | 59144 | 80002 | 84532 | 421614 | 534351 | 534352 | 11155111 | 11155420 | 1088 | 9745 | 57073 | 250 | 1868 | 60808 | 1666600000 | 4002 | 1101 | 196)[];
|
|
759
|
+
declare const getNetworkEnv: (chainId: SupportedChainIds) => "RPC_BNB" | "RPC_CELO" | "RPC_METIS" | "RPC_BOB" | "RPC_BASE" | "RPC_SCROLL" | "RPC_MAINNET" | "RPC_POLYGON" | "RPC_POLYGON_AMOY" | "RPC_AVALANCHE" | "RPC_AVALANCHE_FUJI" | "RPC_ARBITRUM" | "RPC_ARBITRUM_SEPOLIA" | "RPC_FANTOM" | "RPC_FANTOM_TESTNET" | "RPC_OPTIMISM" | "RPC_OPTIMISM_SEPOLIA" | "RPC_HARMONY" | "RPC_SEPOLIA" | "RPC_SCROLL_SEPOLIA" | "RPC_SONIC" | "RPC_MANTLE" | "RPC_BASE_SEPOLIA" | "RPC_GNOSIS" | "RPC_ZKEVM" | "RPC_ZKSYNC" | "RPC_LINEA" | "RPC_INK" | "RPC_SONEIUM" | "RPC_PLASMA" | "RPC_XLAYER";
|
|
747
760
|
declare function getExplicitRPC(chainId: SupportedChainIds): string;
|
|
748
761
|
declare function getAlchemyRPC(chainId: SupportedChainIds, alchemyKey: string): string;
|
|
749
762
|
declare function getPublicRpc(chainId: SupportedChainIds): "https://mainnet.era.zksync.io" | "https://api.avax.network/ext/bc/C/rpc" | "https://rpc.linea.build" | "https://rpc.scroll.io" | "https://andromeda.metis.io/?owner=1088" | "https://rpc.plasma.to" | "https://rpc.gobob.xyz" | "https://eth.llamarpc.com" | "https://polygon.llamarpc.com" | "https://base.llamarpc.com" | "https://binance.llamarpc.com" | "https://rpc.ankr.com/gnosis" | "https://rpc.ftm.tools" | "https://ink-public.nodies.app";
|
|
@@ -1176,10 +1189,6 @@ declare const etherscanExplorers: {
|
|
|
1176
1189
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1177
1190
|
readonly explorer: "https://testnet.bttcscan.com/";
|
|
1178
1191
|
};
|
|
1179
|
-
readonly 1101: {
|
|
1180
|
-
readonly api: "https://api.etherscan.io/v2/api";
|
|
1181
|
-
readonly explorer: "https://zkevm.polygonscan.com/";
|
|
1182
|
-
};
|
|
1183
1192
|
readonly 1284: {
|
|
1184
1193
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1185
1194
|
readonly explorer: "https://moonbeam.moonscan.io/";
|
|
@@ -1212,10 +1221,6 @@ declare const etherscanExplorers: {
|
|
|
1212
1221
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1213
1222
|
readonly explorer: "https://sepolia.swellchainscan.io/";
|
|
1214
1223
|
};
|
|
1215
|
-
readonly 2442: {
|
|
1216
|
-
readonly api: "https://api.etherscan.io/v2/api";
|
|
1217
|
-
readonly explorer: "https://cardona-zkevm.polygonscan.com/";
|
|
1218
|
-
};
|
|
1219
1224
|
readonly 2522: {
|
|
1220
1225
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1221
1226
|
readonly explorer: "https://holesky.fraxscan.com/";
|
|
@@ -1292,10 +1297,6 @@ declare const etherscanExplorers: {
|
|
|
1292
1297
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1293
1298
|
readonly explorer: "https://testnet.memecorescan.io/";
|
|
1294
1299
|
};
|
|
1295
|
-
readonly 44787: {
|
|
1296
|
-
readonly api: "https://api.etherscan.io/v2/api";
|
|
1297
|
-
readonly explorer: "https://alfajores.celoscan.io/";
|
|
1298
|
-
};
|
|
1299
1300
|
readonly 50104: {
|
|
1300
1301
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1301
1302
|
readonly explorer: "https://sophscan.xyz/";
|
|
@@ -1332,9 +1333,9 @@ declare const etherscanExplorers: {
|
|
|
1332
1333
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1333
1334
|
readonly explorer: "https://taikoscan.io/";
|
|
1334
1335
|
};
|
|
1335
|
-
readonly
|
|
1336
|
+
readonly 167012: {
|
|
1336
1337
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1337
|
-
readonly explorer: "https://
|
|
1338
|
+
readonly explorer: "https://hoodi.taikoscan.io/";
|
|
1338
1339
|
};
|
|
1339
1340
|
readonly 421614: {
|
|
1340
1341
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
@@ -1352,10 +1353,18 @@ declare const etherscanExplorers: {
|
|
|
1352
1353
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1353
1354
|
readonly explorer: "https://hoodi.etherscan.io/";
|
|
1354
1355
|
};
|
|
1356
|
+
readonly 737373: {
|
|
1357
|
+
readonly api: "https://api.etherscan.io/v2/api";
|
|
1358
|
+
readonly explorer: "https://bokuto.katanascan.com/";
|
|
1359
|
+
};
|
|
1355
1360
|
readonly 747474: {
|
|
1356
1361
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1357
1362
|
readonly explorer: "https://katanascan.com/";
|
|
1358
1363
|
};
|
|
1364
|
+
readonly 11142220: {
|
|
1365
|
+
readonly api: "https://api.etherscan.io/v2/api";
|
|
1366
|
+
readonly explorer: "https://sepolia.celoscan.io/";
|
|
1367
|
+
};
|
|
1359
1368
|
readonly 11155111: {
|
|
1360
1369
|
readonly api: "https://api.etherscan.io/v2/api";
|
|
1361
1370
|
readonly explorer: "https://sepolia.etherscan.io/";
|
|
@@ -1539,10 +1548,6 @@ declare const routescanExplorers: {
|
|
|
1539
1548
|
readonly api: "https://api.routescan.io/v2/network/testnet/evm/2233/etherscan";
|
|
1540
1549
|
readonly explorer: "2233.routescan.io";
|
|
1541
1550
|
};
|
|
1542
|
-
readonly 2368: {
|
|
1543
|
-
readonly api: "https://api.routescan.io/v2/network/testnet/evm/2368/etherscan";
|
|
1544
|
-
readonly explorer: "2368.routescan.io";
|
|
1545
|
-
};
|
|
1546
1551
|
readonly 2522: {
|
|
1547
1552
|
readonly api: "https://api.routescan.io/v2/network/testnet/evm/2522/etherscan";
|
|
1548
1553
|
readonly explorer: "2522.routescan.io";
|
|
@@ -1643,10 +1648,6 @@ declare const routescanExplorers: {
|
|
|
1643
1648
|
readonly api: "https://api.routescan.io/v2/network/testnet/evm/6911/etherscan";
|
|
1644
1649
|
readonly explorer: "6911.routescan.io";
|
|
1645
1650
|
};
|
|
1646
|
-
readonly 7171: {
|
|
1647
|
-
readonly api: "https://api.routescan.io/v2/network/mainnet/evm/7171/etherscan";
|
|
1648
|
-
readonly explorer: "7171.routescan.io";
|
|
1649
|
-
};
|
|
1650
1651
|
readonly 7894: {
|
|
1651
1652
|
readonly api: "https://api.routescan.io/v2/network/testnet/evm/7894/etherscan";
|
|
1652
1653
|
readonly explorer: "7894.routescan.io";
|
|
@@ -1763,10 +1764,6 @@ declare const routescanExplorers: {
|
|
|
1763
1764
|
readonly api: "https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan";
|
|
1764
1765
|
readonly explorer: "34443.routescan.io";
|
|
1765
1766
|
};
|
|
1766
|
-
readonly 42069: {
|
|
1767
|
-
readonly api: "https://api.routescan.io/v2/network/mainnet/evm/42069/etherscan";
|
|
1768
|
-
readonly explorer: "42069.routescan.io";
|
|
1769
|
-
};
|
|
1770
1767
|
readonly 42161: {
|
|
1771
1768
|
readonly api: "https://api.routescan.io/v2/network/mainnet/evm/42161/etherscan";
|
|
1772
1769
|
readonly explorer: "42161.routescan.io";
|
|
@@ -3299,8 +3296,8 @@ declare const blockscoutExplorers: {
|
|
|
3299
3296
|
readonly explorer: "https://testnet3.cypherscan.ai/";
|
|
3300
3297
|
};
|
|
3301
3298
|
readonly 10200: {
|
|
3302
|
-
readonly api: "https://gnosis.blockscout.com/api";
|
|
3303
|
-
readonly explorer: "https://gnosis.blockscout.com/";
|
|
3299
|
+
readonly api: "https://gnosis-chiado.blockscout.com/api";
|
|
3300
|
+
readonly explorer: "https://gnosis-chiado.blockscout.com/";
|
|
3304
3301
|
};
|
|
3305
3302
|
readonly 10245: {
|
|
3306
3303
|
readonly api: "https://capxscan.com/api";
|
package/dist/index.js
CHANGED
|
@@ -19833,10 +19833,6 @@ var etherscanExplorers = {
|
|
|
19833
19833
|
api: "https://api.etherscan.io/v2/api",
|
|
19834
19834
|
explorer: "https://testnet.bttcscan.com/"
|
|
19835
19835
|
},
|
|
19836
|
-
1101: {
|
|
19837
|
-
api: "https://api.etherscan.io/v2/api",
|
|
19838
|
-
explorer: "https://zkevm.polygonscan.com/"
|
|
19839
|
-
},
|
|
19840
19836
|
1284: {
|
|
19841
19837
|
api: "https://api.etherscan.io/v2/api",
|
|
19842
19838
|
explorer: "https://moonbeam.moonscan.io/"
|
|
@@ -19869,10 +19865,6 @@ var etherscanExplorers = {
|
|
|
19869
19865
|
api: "https://api.etherscan.io/v2/api",
|
|
19870
19866
|
explorer: "https://sepolia.swellchainscan.io/"
|
|
19871
19867
|
},
|
|
19872
|
-
2442: {
|
|
19873
|
-
api: "https://api.etherscan.io/v2/api",
|
|
19874
|
-
explorer: "https://cardona-zkevm.polygonscan.com/"
|
|
19875
|
-
},
|
|
19876
19868
|
2522: {
|
|
19877
19869
|
api: "https://api.etherscan.io/v2/api",
|
|
19878
19870
|
explorer: "https://holesky.fraxscan.com/"
|
|
@@ -19949,10 +19941,6 @@ var etherscanExplorers = {
|
|
|
19949
19941
|
api: "https://api.etherscan.io/v2/api",
|
|
19950
19942
|
explorer: "https://testnet.memecorescan.io/"
|
|
19951
19943
|
},
|
|
19952
|
-
44787: {
|
|
19953
|
-
api: "https://api.etherscan.io/v2/api",
|
|
19954
|
-
explorer: "https://alfajores.celoscan.io/"
|
|
19955
|
-
},
|
|
19956
19944
|
50104: {
|
|
19957
19945
|
api: "https://api.etherscan.io/v2/api",
|
|
19958
19946
|
explorer: "https://sophscan.xyz/"
|
|
@@ -19989,9 +19977,9 @@ var etherscanExplorers = {
|
|
|
19989
19977
|
api: "https://api.etherscan.io/v2/api",
|
|
19990
19978
|
explorer: "https://taikoscan.io/"
|
|
19991
19979
|
},
|
|
19992
|
-
|
|
19980
|
+
167012: {
|
|
19993
19981
|
api: "https://api.etherscan.io/v2/api",
|
|
19994
|
-
explorer: "https://
|
|
19982
|
+
explorer: "https://hoodi.taikoscan.io/"
|
|
19995
19983
|
},
|
|
19996
19984
|
421614: {
|
|
19997
19985
|
api: "https://api.etherscan.io/v2/api",
|
|
@@ -20009,10 +19997,18 @@ var etherscanExplorers = {
|
|
|
20009
19997
|
api: "https://api.etherscan.io/v2/api",
|
|
20010
19998
|
explorer: "https://hoodi.etherscan.io/"
|
|
20011
19999
|
},
|
|
20000
|
+
737373: {
|
|
20001
|
+
api: "https://api.etherscan.io/v2/api",
|
|
20002
|
+
explorer: "https://bokuto.katanascan.com/"
|
|
20003
|
+
},
|
|
20012
20004
|
747474: {
|
|
20013
20005
|
api: "https://api.etherscan.io/v2/api",
|
|
20014
20006
|
explorer: "https://katanascan.com/"
|
|
20015
20007
|
},
|
|
20008
|
+
11142220: {
|
|
20009
|
+
api: "https://api.etherscan.io/v2/api",
|
|
20010
|
+
explorer: "https://sepolia.celoscan.io/"
|
|
20011
|
+
},
|
|
20016
20012
|
11155111: {
|
|
20017
20013
|
api: "https://api.etherscan.io/v2/api",
|
|
20018
20014
|
explorer: "https://sepolia.etherscan.io/"
|
|
@@ -20197,10 +20193,6 @@ var routescanExplorers = {
|
|
|
20197
20193
|
api: "https://api.routescan.io/v2/network/testnet/evm/2233/etherscan",
|
|
20198
20194
|
explorer: "2233.routescan.io"
|
|
20199
20195
|
},
|
|
20200
|
-
2368: {
|
|
20201
|
-
api: "https://api.routescan.io/v2/network/testnet/evm/2368/etherscan",
|
|
20202
|
-
explorer: "2368.routescan.io"
|
|
20203
|
-
},
|
|
20204
20196
|
2522: {
|
|
20205
20197
|
api: "https://api.routescan.io/v2/network/testnet/evm/2522/etherscan",
|
|
20206
20198
|
explorer: "2522.routescan.io"
|
|
@@ -20301,10 +20293,6 @@ var routescanExplorers = {
|
|
|
20301
20293
|
api: "https://api.routescan.io/v2/network/testnet/evm/6911/etherscan",
|
|
20302
20294
|
explorer: "6911.routescan.io"
|
|
20303
20295
|
},
|
|
20304
|
-
7171: {
|
|
20305
|
-
api: "https://api.routescan.io/v2/network/mainnet/evm/7171/etherscan",
|
|
20306
|
-
explorer: "7171.routescan.io"
|
|
20307
|
-
},
|
|
20308
20296
|
7894: {
|
|
20309
20297
|
api: "https://api.routescan.io/v2/network/testnet/evm/7894/etherscan",
|
|
20310
20298
|
explorer: "7894.routescan.io"
|
|
@@ -20421,10 +20409,6 @@ var routescanExplorers = {
|
|
|
20421
20409
|
api: "https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan",
|
|
20422
20410
|
explorer: "34443.routescan.io"
|
|
20423
20411
|
},
|
|
20424
|
-
42069: {
|
|
20425
|
-
api: "https://api.routescan.io/v2/network/mainnet/evm/42069/etherscan",
|
|
20426
|
-
explorer: "42069.routescan.io"
|
|
20427
|
-
},
|
|
20428
20412
|
42161: {
|
|
20429
20413
|
api: "https://api.routescan.io/v2/network/mainnet/evm/42161/etherscan",
|
|
20430
20414
|
explorer: "42161.routescan.io"
|
|
@@ -20706,6 +20690,9 @@ function getExplorer(chainId) {
|
|
|
20706
20690
|
throw new Error(`No explorer found for chainId: ${chainId}`);
|
|
20707
20691
|
}
|
|
20708
20692
|
async function getSourceCode(params) {
|
|
20693
|
+
if (params.chainId === ChainId.xLayer) {
|
|
20694
|
+
return getXLayerSourceCode(params);
|
|
20695
|
+
}
|
|
20709
20696
|
const payload = {
|
|
20710
20697
|
chainid: String(params.chainId),
|
|
20711
20698
|
address: params.address,
|
|
@@ -20718,7 +20705,7 @@ async function getSourceCode(params) {
|
|
|
20718
20705
|
console.log(url);
|
|
20719
20706
|
const request = await fetch(url);
|
|
20720
20707
|
const { status, message, result } = await request.json();
|
|
20721
|
-
if (status
|
|
20708
|
+
if (status !== "1") {
|
|
20722
20709
|
throw new Error(result);
|
|
20723
20710
|
}
|
|
20724
20711
|
return result[0];
|
|
@@ -20747,6 +20734,33 @@ function parseBlockscoutStyleSourceCode(sourceCode) {
|
|
|
20747
20734
|
};
|
|
20748
20735
|
return result;
|
|
20749
20736
|
}
|
|
20737
|
+
async function getXLayerSourceCode(params) {
|
|
20738
|
+
const payload = {
|
|
20739
|
+
chainShortName: "xlayer",
|
|
20740
|
+
contractAddress: params.address
|
|
20741
|
+
};
|
|
20742
|
+
const formattedPayload = new URLSearchParams(payload).toString();
|
|
20743
|
+
const apiUrl = "https://www.oklink.com/api/v5/explorer/contract/verify-contract-info";
|
|
20744
|
+
const url = `${apiUrl}?${formattedPayload}`;
|
|
20745
|
+
const request = await fetch(url);
|
|
20746
|
+
const { data, message } = await request.json();
|
|
20747
|
+
if (data.length === 0) {
|
|
20748
|
+
throw new Error(message);
|
|
20749
|
+
}
|
|
20750
|
+
return {
|
|
20751
|
+
SourceCode: data[0].sourceCode,
|
|
20752
|
+
ABI: data[0].contractAbi,
|
|
20753
|
+
CompilerVersion: data[0].compilerVersion,
|
|
20754
|
+
ContractName: data[0].contractName,
|
|
20755
|
+
EVMVersion: data[0].evmVersion,
|
|
20756
|
+
Implementation: data[0].implementation,
|
|
20757
|
+
Library: data[0].libraryInfo,
|
|
20758
|
+
LicenseType: data[0].licenseType,
|
|
20759
|
+
OptimizationUsed: data[0].optimization,
|
|
20760
|
+
Proxy: data[0].proxy,
|
|
20761
|
+
Runs: data[0].optimizationRuns
|
|
20762
|
+
};
|
|
20763
|
+
}
|
|
20750
20764
|
|
|
20751
20765
|
// src/ecosystem/tenderly.ts
|
|
20752
20766
|
var import_viem5 = require("viem");
|
|
@@ -20783,7 +20797,8 @@ var ChainId = {
|
|
|
20783
20797
|
ink: import_chains.ink.id,
|
|
20784
20798
|
soneium: import_chains.soneium.id,
|
|
20785
20799
|
bob: import_chains.bob.id,
|
|
20786
|
-
plasma: import_chains.plasma.id
|
|
20800
|
+
plasma: import_chains.plasma.id,
|
|
20801
|
+
xLayer: import_chains.xLayer.id
|
|
20787
20802
|
};
|
|
20788
20803
|
var ChainList = {
|
|
20789
20804
|
[ChainId.mainnet]: import_chains.mainnet,
|
|
@@ -20825,7 +20840,8 @@ var ChainList = {
|
|
|
20825
20840
|
[ChainId.ink]: import_chains.ink,
|
|
20826
20841
|
[ChainId.soneium]: import_chains.soneium,
|
|
20827
20842
|
[ChainId.bob]: import_chains.bob,
|
|
20828
|
-
[ChainId.plasma]: import_chains.plasma
|
|
20843
|
+
[ChainId.plasma]: import_chains.plasma,
|
|
20844
|
+
[ChainId.xLayer]: import_chains.xLayer
|
|
20829
20845
|
};
|
|
20830
20846
|
|
|
20831
20847
|
// src/ecosystem/tenderly.ts
|
|
@@ -23164,8 +23180,8 @@ var blockscoutExplorers = {
|
|
|
23164
23180
|
explorer: "https://testnet3.cypherscan.ai/"
|
|
23165
23181
|
},
|
|
23166
23182
|
10200: {
|
|
23167
|
-
api: "https://gnosis.blockscout.com/api",
|
|
23168
|
-
explorer: "https://gnosis.blockscout.com/"
|
|
23183
|
+
api: "https://gnosis-chiado.blockscout.com/api",
|
|
23184
|
+
explorer: "https://gnosis-chiado.blockscout.com/"
|
|
23169
23185
|
},
|
|
23170
23186
|
10245: {
|
|
23171
23187
|
api: "https://capxscan.com/api",
|