@bgd-labs/toolbox 0.0.43 → 0.0.45
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 +209 -1
- package/dist/index.d.ts +209 -1
- package/dist/index.js +149 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +145 -7
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +149 -7
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +145 -7
- package/dist/node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -157,12 +157,16 @@ __export(index_exports, {
|
|
|
157
157
|
routescanExplorers: () => routescanExplorers,
|
|
158
158
|
selfDestructStatusToString: () => selfDestructStatusToString,
|
|
159
159
|
setBits: () => setBits,
|
|
160
|
+
tenderlyExplorerMap: () => tenderlyExplorerMap,
|
|
161
|
+
tenderlyNetworkMap: () => tenderlyNetworkMap,
|
|
160
162
|
tenderly_createVnet: () => tenderly_createVnet,
|
|
161
163
|
tenderly_deleteVnet: () => tenderly_deleteVnet,
|
|
162
164
|
tenderly_getVnet: () => tenderly_getVnet,
|
|
163
165
|
tenderly_logsToAbiLogs: () => tenderly_logsToAbiLogs,
|
|
166
|
+
tenderly_pingExplorer: () => tenderly_pingExplorer,
|
|
164
167
|
tenderly_sim: () => tenderly_sim,
|
|
165
168
|
tenderly_simVnet: () => tenderly_simVnet,
|
|
169
|
+
toAddressLink: () => toAddressLink,
|
|
166
170
|
toBinaryString: () => toBinaryString,
|
|
167
171
|
toTxLink: () => toTxLink,
|
|
168
172
|
transformTenderlyStateDiff: () => transformTenderlyStateDiff,
|
|
@@ -13750,7 +13754,7 @@ async function getReserveConfigurations(client, pool, reserves) {
|
|
|
13750
13754
|
};
|
|
13751
13755
|
}
|
|
13752
13756
|
|
|
13753
|
-
// ../../node_modules/.pnpm/@bgd-labs+aave-address-book@4.29.3_viem@2.37.
|
|
13757
|
+
// ../../node_modules/.pnpm/@bgd-labs+aave-address-book@4.29.3_viem@2.37.6_typescript@5.8.3_zod@3.24.2_/node_modules/@bgd-labs/aave-address-book/dist/abis/IPayloadsControllerCore.mjs
|
|
13754
13758
|
var IPayloadsControllerCore_ABI = [
|
|
13755
13759
|
{
|
|
13756
13760
|
type: "function",
|
|
@@ -14255,7 +14259,7 @@ var IPayloadsControllerCore_ABI = [
|
|
|
14255
14259
|
}
|
|
14256
14260
|
];
|
|
14257
14261
|
|
|
14258
|
-
// ../../node_modules/.pnpm/@bgd-labs+aave-address-book@4.29.3_viem@2.37.
|
|
14262
|
+
// ../../node_modules/.pnpm/@bgd-labs+aave-address-book@4.29.3_viem@2.37.6_typescript@5.8.3_zod@3.24.2_/node_modules/@bgd-labs/aave-address-book/dist/abis/IGovernanceCore.mjs
|
|
14259
14263
|
var IGovernanceCore_ABI = [
|
|
14260
14264
|
{
|
|
14261
14265
|
type: "function",
|
|
@@ -15288,7 +15292,7 @@ var IGovernanceCore_ABI = [
|
|
|
15288
15292
|
}
|
|
15289
15293
|
];
|
|
15290
15294
|
|
|
15291
|
-
// ../../node_modules/.pnpm/@bgd-labs+aave-address-book@4.29.3_viem@2.37.
|
|
15295
|
+
// ../../node_modules/.pnpm/@bgd-labs+aave-address-book@4.29.3_viem@2.37.6_typescript@5.8.3_zod@3.24.2_/node_modules/@bgd-labs/aave-address-book/dist/abis/IPool.mjs
|
|
15292
15296
|
var IPool_ABI2 = [
|
|
15293
15297
|
{
|
|
15294
15298
|
type: "function",
|
|
@@ -18795,6 +18799,11 @@ function tenderly_logsToAbiLogs(logs) {
|
|
|
18795
18799
|
};
|
|
18796
18800
|
});
|
|
18797
18801
|
}
|
|
18802
|
+
function tenderly_pingExplorer(chainId, address) {
|
|
18803
|
+
return fetch(
|
|
18804
|
+
`https://dashboard.tenderly.co/contract/${tenderlyExplorerMap[chainId]}/${address}/txs/all`
|
|
18805
|
+
);
|
|
18806
|
+
}
|
|
18798
18807
|
|
|
18799
18808
|
// src/ecosystem/tenderly.types.ts
|
|
18800
18809
|
var SoltypeType = /* @__PURE__ */ ((SoltypeType2) => {
|
|
@@ -19045,8 +19054,6 @@ var tenderlyNetworkMap = {
|
|
|
19045
19054
|
2020: "ronin",
|
|
19046
19055
|
2021: "ronin-testnet",
|
|
19047
19056
|
2522: "fraxtal-holesky",
|
|
19048
|
-
2810: "morph-holesky",
|
|
19049
|
-
2818: "morph",
|
|
19050
19057
|
4202: "lisk-sepolia",
|
|
19051
19058
|
4801: "worldchain-sepolia",
|
|
19052
19059
|
5e3: "mantle",
|
|
@@ -19110,6 +19117,119 @@ var tenderlyNetworkMap = {
|
|
|
19110
19117
|
52085145: "converge-testnet",
|
|
19111
19118
|
531050104: "sophon-testnet"
|
|
19112
19119
|
};
|
|
19120
|
+
var tenderlyExplorerMap = {
|
|
19121
|
+
1: "mainnet",
|
|
19122
|
+
10: "optimistic",
|
|
19123
|
+
14: "flare",
|
|
19124
|
+
30: "rsk",
|
|
19125
|
+
31: "rsk-testnet",
|
|
19126
|
+
56: "bnb",
|
|
19127
|
+
71: "cfx-espace-testnet",
|
|
19128
|
+
97: "bnb-testnet",
|
|
19129
|
+
100: "gnosis-chain",
|
|
19130
|
+
130: "unichain",
|
|
19131
|
+
137: "polygon",
|
|
19132
|
+
146: "sonic",
|
|
19133
|
+
232: "lens",
|
|
19134
|
+
239: "tac",
|
|
19135
|
+
252: "fraxtal-mainnet",
|
|
19136
|
+
288: "boba-ethereum",
|
|
19137
|
+
300: "zksync-sepolia",
|
|
19138
|
+
324: "zksync",
|
|
19139
|
+
360: "shape",
|
|
19140
|
+
480: "worldchain-mainnet",
|
|
19141
|
+
1088: "metis-andromeda",
|
|
19142
|
+
1135: "lisk",
|
|
19143
|
+
1284: "moonbeam",
|
|
19144
|
+
1285: "moonriver",
|
|
19145
|
+
1287: "moonbase-alpha",
|
|
19146
|
+
1301: "unichain-sepolia",
|
|
19147
|
+
1315: "story-aeneid",
|
|
19148
|
+
1328: "sei-atlantic-2",
|
|
19149
|
+
1329: "sei-pacific-1",
|
|
19150
|
+
1439: "injective-testnet",
|
|
19151
|
+
1514: "story",
|
|
19152
|
+
1868: "soneium",
|
|
19153
|
+
1923: "swellchain",
|
|
19154
|
+
1924: "swellchain-sepolia",
|
|
19155
|
+
1946: "soneium-minato",
|
|
19156
|
+
2020: "ronin",
|
|
19157
|
+
2021: "ronin-testnet",
|
|
19158
|
+
2201: "stable-testnet",
|
|
19159
|
+
2391: "tac-spb-testnet",
|
|
19160
|
+
2522: "fraxtal-holesky",
|
|
19161
|
+
3338: "peaq",
|
|
19162
|
+
4202: "lisk-sepolia",
|
|
19163
|
+
4801: "worldchain-sepolia",
|
|
19164
|
+
5e3: "mantle",
|
|
19165
|
+
5003: "mantle-sepolia",
|
|
19166
|
+
7e3: "zetachain",
|
|
19167
|
+
7001: "zetachain-testnet",
|
|
19168
|
+
7887: "kinto",
|
|
19169
|
+
8008: "polynomial-mainnet",
|
|
19170
|
+
8453: "base",
|
|
19171
|
+
9069: "af-nexus-mainnet",
|
|
19172
|
+
9070: "af-nexus-testnet",
|
|
19173
|
+
9728: "boba-bnb-testnet",
|
|
19174
|
+
9745: "plasma",
|
|
19175
|
+
9746: "plasma-testnet",
|
|
19176
|
+
9990: "peaq-agung-testnet",
|
|
19177
|
+
11011: "shape-sepolia",
|
|
19178
|
+
11069: "interval-testnet",
|
|
19179
|
+
12739: "concrete",
|
|
19180
|
+
13371: "immutable",
|
|
19181
|
+
13473: "immutable-testnet",
|
|
19182
|
+
17e3: "holesky",
|
|
19183
|
+
28882: "boba-sepolia",
|
|
19184
|
+
33111: "curtis",
|
|
19185
|
+
33139: "apechain",
|
|
19186
|
+
37111: "lens-sepolia",
|
|
19187
|
+
42161: "arbitrum",
|
|
19188
|
+
42170: "arbitrum-nova",
|
|
19189
|
+
42220: "celo",
|
|
19190
|
+
43113: "avalanche-fuji",
|
|
19191
|
+
43114: "avalanche-mainnet",
|
|
19192
|
+
44787: "celo-alfajores-testnet",
|
|
19193
|
+
48898: "zircuit-garfield-testnet",
|
|
19194
|
+
48900: "zircuit",
|
|
19195
|
+
50104: "sophon",
|
|
19196
|
+
56288: "boba-bnb",
|
|
19197
|
+
57054: "sonic-blaze",
|
|
19198
|
+
57073: "ink",
|
|
19199
|
+
59141: "linea-sepolia",
|
|
19200
|
+
59144: "linea",
|
|
19201
|
+
59902: "metis-sepolia",
|
|
19202
|
+
60808: "bob",
|
|
19203
|
+
62576: "concrete-testnet",
|
|
19204
|
+
80002: "polygon-amoy",
|
|
19205
|
+
80008: "polynomial-sepolia",
|
|
19206
|
+
80069: "bepolia",
|
|
19207
|
+
80094: "berachain",
|
|
19208
|
+
81457: "blast",
|
|
19209
|
+
84532: "base-sepolia",
|
|
19210
|
+
98866: "plume",
|
|
19211
|
+
98867: "plume-testnet",
|
|
19212
|
+
129399: "katana-tatara",
|
|
19213
|
+
167e3: "taiko-mainnet",
|
|
19214
|
+
167009: "taiko-hekla",
|
|
19215
|
+
421614: "arbitrum-sepolia",
|
|
19216
|
+
534351: "scroll-sepolia",
|
|
19217
|
+
534352: "scroll-mainnet",
|
|
19218
|
+
560048: "hoodi",
|
|
19219
|
+
737373: "katana-bokuto",
|
|
19220
|
+
747474: "katana",
|
|
19221
|
+
763373: "ink-sepolia",
|
|
19222
|
+
808813: "bob-testnet",
|
|
19223
|
+
7777777: "zora",
|
|
19224
|
+
11155111: "sepolia",
|
|
19225
|
+
11155420: "optimistic-sepolia",
|
|
19226
|
+
13374202: "ethereal-testnet",
|
|
19227
|
+
21e6: "corn",
|
|
19228
|
+
21000001: "corn-testnet",
|
|
19229
|
+
52085145: "converge-testnet",
|
|
19230
|
+
531050104: "sophon-testnet",
|
|
19231
|
+
999999999: "zora-sepolia"
|
|
19232
|
+
};
|
|
19113
19233
|
|
|
19114
19234
|
// src/ecosystem/rpcs.ts
|
|
19115
19235
|
var publicRPCs = {
|
|
@@ -35804,7 +35924,7 @@ async function renderTenderlyReport({
|
|
|
35804
35924
|
- state: ${payload.state}(${HUMAN_READABLE_PAYLOAD_STATE[payload.state]})
|
|
35805
35925
|
- actions:
|
|
35806
35926
|
${payload.actions.map(
|
|
35807
|
-
(a) => ` - [${a.target}](${
|
|
35927
|
+
(a) => ` - [${a.target}](${toAddressLink(a.target, client)}), accessLevel: ${a.accessLevel}, withDelegateCall: ${a.withDelegateCall}, value: ${a.value}, signature: ${a.signature}, callData: ${a.callData}`
|
|
35808
35928
|
).join("\n")}
|
|
35809
35929
|
`;
|
|
35810
35930
|
if (createdLog) {
|
|
@@ -35880,10 +36000,25 @@ ${payload.actions.map(
|
|
|
35880
36000
|
client,
|
|
35881
36001
|
transformTenderlyStateDiff(sim.transaction.transaction_info.state_diff)
|
|
35882
36002
|
);
|
|
35883
|
-
|
|
36003
|
+
const unverified = verified.filter(
|
|
36004
|
+
(contract) => contract.status === 2 /* ERROR */
|
|
36005
|
+
);
|
|
36006
|
+
if (unverified.length !== 0) {
|
|
36007
|
+
try {
|
|
36008
|
+
await Promise.all(
|
|
36009
|
+
unverified.map(
|
|
36010
|
+
(ctr) => tenderly_pingExplorer(client.chain.id, ctr.address)
|
|
36011
|
+
)
|
|
36012
|
+
);
|
|
36013
|
+
} catch (e) {
|
|
36014
|
+
}
|
|
35884
36015
|
report += `:sos: Found unverified contracts!
|
|
35885
36016
|
|
|
35886
36017
|
`;
|
|
36018
|
+
report += unverified.map(
|
|
36019
|
+
(ctr) => ` - [${ctr.address}](${toAddressLink(ctr.address, client)})`
|
|
36020
|
+
).join("\n");
|
|
36021
|
+
report += "\n\n";
|
|
35887
36022
|
}
|
|
35888
36023
|
if (selfDestruct.find(
|
|
35889
36024
|
(contract) => contract.state === 5 /* SELF_DESTRUCT */
|
|
@@ -35944,6 +36079,9 @@ function renderUnixTime(time) {
|
|
|
35944
36079
|
function toTxLink(txn, client) {
|
|
35945
36080
|
return `${client.chain?.blockExplorers?.default.url}/tx/${txn}`;
|
|
35946
36081
|
}
|
|
36082
|
+
function toAddressLink(address, client) {
|
|
36083
|
+
return `${client.chain?.blockExplorers?.default.url}/address/${address}`;
|
|
36084
|
+
}
|
|
35947
36085
|
// Annotate the CommonJS export names for ESM import in node:
|
|
35948
36086
|
0 && (module.exports = {
|
|
35949
36087
|
AggregatorInterface_ABI,
|
|
@@ -36073,12 +36211,16 @@ function toTxLink(txn, client) {
|
|
|
36073
36211
|
routescanExplorers,
|
|
36074
36212
|
selfDestructStatusToString,
|
|
36075
36213
|
setBits,
|
|
36214
|
+
tenderlyExplorerMap,
|
|
36215
|
+
tenderlyNetworkMap,
|
|
36076
36216
|
tenderly_createVnet,
|
|
36077
36217
|
tenderly_deleteVnet,
|
|
36078
36218
|
tenderly_getVnet,
|
|
36079
36219
|
tenderly_logsToAbiLogs,
|
|
36220
|
+
tenderly_pingExplorer,
|
|
36080
36221
|
tenderly_sim,
|
|
36081
36222
|
tenderly_simVnet,
|
|
36223
|
+
toAddressLink,
|
|
36082
36224
|
toBinaryString,
|
|
36083
36225
|
toTxLink,
|
|
36084
36226
|
transformTenderlyStateDiff,
|