@bgd-labs/toolbox 0.0.19 → 0.0.21
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-BkYlywfa.d.mts → index-BygjJn_o.d.mts} +227 -105
- package/dist/{index-BkYlywfa.d.ts → index-BygjJn_o.d.ts} +227 -105
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +93 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +94 -7
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +93 -6
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +94 -7
- package/dist/node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node.mjs
CHANGED
|
@@ -14021,7 +14021,8 @@ import {
|
|
|
14021
14021
|
sonic,
|
|
14022
14022
|
zksync,
|
|
14023
14023
|
ink,
|
|
14024
|
-
soneium
|
|
14024
|
+
soneium,
|
|
14025
|
+
bob
|
|
14025
14026
|
} from "viem/chains";
|
|
14026
14027
|
var ChainId = {
|
|
14027
14028
|
celo: celo.id,
|
|
@@ -14051,7 +14052,8 @@ var ChainId = {
|
|
|
14051
14052
|
zksync: zksync.id,
|
|
14052
14053
|
linea: linea.id,
|
|
14053
14054
|
ink: ink.id,
|
|
14054
|
-
soneium: soneium.id
|
|
14055
|
+
soneium: soneium.id,
|
|
14056
|
+
bob: bob.id
|
|
14055
14057
|
};
|
|
14056
14058
|
var ChainList = {
|
|
14057
14059
|
[ChainId.mainnet]: mainnet,
|
|
@@ -14091,7 +14093,8 @@ var ChainList = {
|
|
|
14091
14093
|
[ChainId.zksync]: zksync,
|
|
14092
14094
|
[ChainId.linea]: linea,
|
|
14093
14095
|
[ChainId.ink]: ink,
|
|
14094
|
-
[ChainId.soneium]: soneium
|
|
14096
|
+
[ChainId.soneium]: soneium,
|
|
14097
|
+
[ChainId.bob]: bob
|
|
14095
14098
|
};
|
|
14096
14099
|
|
|
14097
14100
|
// src/ecosystem/rpcs.ts
|
|
@@ -14294,7 +14297,8 @@ var publicRPCs = {
|
|
|
14294
14297
|
[ChainId.zksync]: "https://mainnet.era.zksync.io",
|
|
14295
14298
|
[ChainId.fantom]: "https://rpc.ftm.tools",
|
|
14296
14299
|
[ChainId.avalanche]: "https://api.avax.network/ext/bc/C/rpc",
|
|
14297
|
-
[ChainId.linea]: "https://rpc.linea.build"
|
|
14300
|
+
[ChainId.linea]: "https://rpc.linea.build",
|
|
14301
|
+
[ChainId.bob]: "https://rpc.gobob.xyz"
|
|
14298
14302
|
};
|
|
14299
14303
|
var alchemySupportedChainIds = Object.values(ChainId).filter(
|
|
14300
14304
|
(id) => alchemyNetworkMap[id]
|
|
@@ -20589,7 +20593,7 @@ var chainlinkFeeds = {
|
|
|
20589
20593
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
20590
20594
|
"proxyAddress": null,
|
|
20591
20595
|
"decimals": 18,
|
|
20592
|
-
"name": "UNIBTC/BTC-ExRate-mainnet-production"
|
|
20596
|
+
"name": "UNIBTC/BTC-ExRate-Deprecated-mainnet-production"
|
|
20593
20597
|
},
|
|
20594
20598
|
{
|
|
20595
20599
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
@@ -21818,9 +21822,21 @@ var chainlinkFeeds = {
|
|
|
21818
21822
|
{
|
|
21819
21823
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
21820
21824
|
"proxyAddress": null,
|
|
21821
|
-
"decimals":
|
|
21825
|
+
"decimals": 0,
|
|
21822
21826
|
"name": "SYRUPUSDC/USDC-ExRate-mainnet-production"
|
|
21823
21827
|
},
|
|
21828
|
+
{
|
|
21829
|
+
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
21830
|
+
"proxyAddress": null,
|
|
21831
|
+
"decimals": 18,
|
|
21832
|
+
"name": "SyrupUSDC/USDC-ExRate-Deprecated-mainnet-production"
|
|
21833
|
+
},
|
|
21834
|
+
{
|
|
21835
|
+
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
21836
|
+
"proxyAddress": null,
|
|
21837
|
+
"decimals": 0,
|
|
21838
|
+
"name": "UNIBTC/BTC-ExRate-mainnet-production"
|
|
21839
|
+
},
|
|
21824
21840
|
{
|
|
21825
21841
|
"contractAddress": "0x01DD3Cf6118069DB13A2d64d7e1A09FECd587EDD",
|
|
21826
21842
|
"proxyAddress": "0x8d0CC5f38f9E802475f2CFf4F9fc7000C2E1557c",
|
|
@@ -23948,7 +23964,7 @@ var chainlinkFeeds = {
|
|
|
23948
23964
|
{
|
|
23949
23965
|
"contractAddress": "0x534a7FF707Bc862cAB0Dda546F1B817Be5235b66",
|
|
23950
23966
|
"proxyAddress": null,
|
|
23951
|
-
"decimals":
|
|
23967
|
+
"decimals": 0,
|
|
23952
23968
|
"name": "wstETH/USD-RefPrice-DS-Premium-Global-003"
|
|
23953
23969
|
},
|
|
23954
23970
|
{
|
|
@@ -26459,6 +26475,76 @@ function toTxLink(txn, client) {
|
|
|
26459
26475
|
return `${client.chain?.blockExplorers?.default.url}/tx/${txn}`;
|
|
26460
26476
|
}
|
|
26461
26477
|
|
|
26478
|
+
// src/seatbelt/state.ts
|
|
26479
|
+
import { getAddress as getAddress2 } from "viem";
|
|
26480
|
+
function transformTenderlyStateDiff(stateDiff) {
|
|
26481
|
+
const formattedDiffs = stateDiff.reduce(
|
|
26482
|
+
(diffs, diff) => {
|
|
26483
|
+
if (!diff.raw?.[0]) return diffs;
|
|
26484
|
+
const addr = getAddress2(diff.raw[0].address);
|
|
26485
|
+
if (!diffs[addr]) diffs[addr] = [diff];
|
|
26486
|
+
else diffs[addr].push(diff);
|
|
26487
|
+
return diffs;
|
|
26488
|
+
},
|
|
26489
|
+
{}
|
|
26490
|
+
);
|
|
26491
|
+
const allChanges = {};
|
|
26492
|
+
for (const [address, diffs] of Object.entries(formattedDiffs)) {
|
|
26493
|
+
const changes = [];
|
|
26494
|
+
for (const diff of diffs) {
|
|
26495
|
+
if (!diff.soltype) {
|
|
26496
|
+
for (const w of diff.raw) {
|
|
26497
|
+
const oldVal = JSON.stringify(w.original);
|
|
26498
|
+
const newVal = JSON.stringify(w.dirty);
|
|
26499
|
+
changes.push({
|
|
26500
|
+
before: oldVal,
|
|
26501
|
+
after: newVal,
|
|
26502
|
+
name: `Slot \`${w.key}\``
|
|
26503
|
+
});
|
|
26504
|
+
}
|
|
26505
|
+
} else if (diff.soltype.simple_type) {
|
|
26506
|
+
changes.push({
|
|
26507
|
+
before: diff.original,
|
|
26508
|
+
after: diff.dirty,
|
|
26509
|
+
name: diff.soltype.name,
|
|
26510
|
+
type: diff.soltype?.name
|
|
26511
|
+
});
|
|
26512
|
+
} else if (diff.soltype.type.startsWith("mapping")) {
|
|
26513
|
+
const keys = Array.from(
|
|
26514
|
+
/* @__PURE__ */ new Set([
|
|
26515
|
+
...Object.keys(diff.original || {}),
|
|
26516
|
+
...Object.keys(diff.dirty || {})
|
|
26517
|
+
])
|
|
26518
|
+
);
|
|
26519
|
+
const original = diff.original || {};
|
|
26520
|
+
const dirty = diff.dirty || {};
|
|
26521
|
+
for (const k of keys) {
|
|
26522
|
+
if (original[k] || dirty[k])
|
|
26523
|
+
changes.push({
|
|
26524
|
+
before: original[k],
|
|
26525
|
+
after: dirty[k],
|
|
26526
|
+
name: k,
|
|
26527
|
+
type: diff.soltype?.name
|
|
26528
|
+
});
|
|
26529
|
+
}
|
|
26530
|
+
} else {
|
|
26531
|
+
for (const w of diff.raw) {
|
|
26532
|
+
const oldVal = JSON.stringify(w.original);
|
|
26533
|
+
const newVal = JSON.stringify(w.dirty);
|
|
26534
|
+
changes.push({
|
|
26535
|
+
before: oldVal,
|
|
26536
|
+
after: newVal,
|
|
26537
|
+
name: w.key,
|
|
26538
|
+
type: "slot"
|
|
26539
|
+
});
|
|
26540
|
+
}
|
|
26541
|
+
}
|
|
26542
|
+
}
|
|
26543
|
+
allChanges[address] = changes;
|
|
26544
|
+
}
|
|
26545
|
+
return allChanges;
|
|
26546
|
+
}
|
|
26547
|
+
|
|
26462
26548
|
// src/ecosystem/foundry.ts
|
|
26463
26549
|
import { execSync } from "node:child_process";
|
|
26464
26550
|
import { createPatch as createPatch2 } from "diff";
|
|
@@ -26629,6 +26715,7 @@ export {
|
|
|
26629
26715
|
tenderly_sim,
|
|
26630
26716
|
tenderly_simVnet,
|
|
26631
26717
|
toTxLink,
|
|
26718
|
+
transformTenderlyStateDiff,
|
|
26632
26719
|
validateAip,
|
|
26633
26720
|
wadDiv,
|
|
26634
26721
|
wadToRay
|