@bgd-labs/toolbox 0.0.44 → 0.0.46
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 +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +31 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -3
- 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 +31 -3
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +29 -3
- package/dist/node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node.mjs
CHANGED
|
@@ -18674,6 +18674,11 @@ function tenderly_logsToAbiLogs(logs) {
|
|
|
18674
18674
|
};
|
|
18675
18675
|
});
|
|
18676
18676
|
}
|
|
18677
|
+
function tenderly_pingExplorer(chainId, address) {
|
|
18678
|
+
return fetch(
|
|
18679
|
+
`https://dashboard.tenderly.co/contract/${tenderlyExplorerMap[chainId]}/${address}/txs/all`
|
|
18680
|
+
);
|
|
18681
|
+
}
|
|
18677
18682
|
|
|
18678
18683
|
// src/ecosystem/tenderly.types.ts
|
|
18679
18684
|
var SoltypeType = /* @__PURE__ */ ((SoltypeType2) => {
|
|
@@ -19119,7 +19124,8 @@ var publicRPCs = {
|
|
|
19119
19124
|
[ChainId.avalanche]: "https://api.avax.network/ext/bc/C/rpc",
|
|
19120
19125
|
[ChainId.linea]: "https://rpc.linea.build",
|
|
19121
19126
|
[ChainId.bob]: "https://rpc.gobob.xyz",
|
|
19122
|
-
[ChainId.plasma]: "https://rpc.plasma.to"
|
|
19127
|
+
[ChainId.plasma]: "https://rpc.plasma.to",
|
|
19128
|
+
[ChainId.ink]: "https://ink-public.nodies.app"
|
|
19123
19129
|
};
|
|
19124
19130
|
var alchemySupportedChainIds = Object.values(ChainId).filter(
|
|
19125
19131
|
(id) => alchemyNetworkMap[id]
|
|
@@ -35810,7 +35816,7 @@ async function renderTenderlyReport({
|
|
|
35810
35816
|
- state: ${payload.state}(${HUMAN_READABLE_PAYLOAD_STATE[payload.state]})
|
|
35811
35817
|
- actions:
|
|
35812
35818
|
${payload.actions.map(
|
|
35813
|
-
(a) => ` - [${a.target}](${
|
|
35819
|
+
(a) => ` - [${a.target}](${toAddressLink(a.target, client)}), accessLevel: ${a.accessLevel}, withDelegateCall: ${a.withDelegateCall}, value: ${a.value}, signature: ${a.signature}, callData: ${a.callData}`
|
|
35814
35820
|
).join("\n")}
|
|
35815
35821
|
`;
|
|
35816
35822
|
if (createdLog) {
|
|
@@ -35886,10 +35892,25 @@ ${payload.actions.map(
|
|
|
35886
35892
|
client,
|
|
35887
35893
|
transformTenderlyStateDiff(sim.transaction.transaction_info.state_diff)
|
|
35888
35894
|
);
|
|
35889
|
-
|
|
35895
|
+
const unverified = verified.filter(
|
|
35896
|
+
(contract) => contract.status === 2 /* ERROR */
|
|
35897
|
+
);
|
|
35898
|
+
if (unverified.length !== 0) {
|
|
35899
|
+
try {
|
|
35900
|
+
await Promise.all(
|
|
35901
|
+
unverified.map(
|
|
35902
|
+
(ctr) => tenderly_pingExplorer(client.chain.id, ctr.address)
|
|
35903
|
+
)
|
|
35904
|
+
);
|
|
35905
|
+
} catch (e) {
|
|
35906
|
+
}
|
|
35890
35907
|
report += `:sos: Found unverified contracts!
|
|
35891
35908
|
|
|
35892
35909
|
`;
|
|
35910
|
+
report += unverified.map(
|
|
35911
|
+
(ctr) => ` - [${ctr.address}](${toAddressLink(ctr.address, client)})`
|
|
35912
|
+
).join("\n");
|
|
35913
|
+
report += "\n\n";
|
|
35893
35914
|
}
|
|
35894
35915
|
if (selfDestruct.find(
|
|
35895
35916
|
(contract) => contract.state === 5 /* SELF_DESTRUCT */
|
|
@@ -35950,6 +35971,9 @@ function renderUnixTime(time) {
|
|
|
35950
35971
|
function toTxLink(txn, client) {
|
|
35951
35972
|
return `${client.chain?.blockExplorers?.default.url}/tx/${txn}`;
|
|
35952
35973
|
}
|
|
35974
|
+
function toAddressLink(address, client) {
|
|
35975
|
+
return `${client.chain?.blockExplorers?.default.url}/address/${address}`;
|
|
35976
|
+
}
|
|
35953
35977
|
|
|
35954
35978
|
// src/ecosystem/foundry.ts
|
|
35955
35979
|
import { execSync } from "node:child_process";
|
|
@@ -36145,8 +36169,10 @@ export {
|
|
|
36145
36169
|
tenderly_deleteVnet,
|
|
36146
36170
|
tenderly_getVnet,
|
|
36147
36171
|
tenderly_logsToAbiLogs,
|
|
36172
|
+
tenderly_pingExplorer,
|
|
36148
36173
|
tenderly_sim,
|
|
36149
36174
|
tenderly_simVnet,
|
|
36175
|
+
toAddressLink,
|
|
36150
36176
|
toBinaryString,
|
|
36151
36177
|
toTxLink,
|
|
36152
36178
|
transformTenderlyStateDiff,
|