@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.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StandardJsonInput } from './index-
|
|
2
|
-
export {
|
|
1
|
+
import { S as StandardJsonInput } from './index-BygjJn_o.mjs';
|
|
2
|
+
export { bd as AggregatorInterface_ABI, a0 as Aip, aG as BundleParams, aq as ChainId, ar as ChainList, b1 as Change, af as ContractObject, ap as EVENT_DB, a2 as ExplorerConfig, aV as GenericIndexerArgs, X as GovernanceContract, u as HALF_RAY, H as HALF_WAD, I as HUMAN_READABLE_PAYLOAD_STATE, V as HUMAN_READABLE_PROPOSAL_STATE, b5 as IAToken_ABI, ba as IAaveOracle_ABI, be as IAaveV3ConfigEngine_ABI, bk as IAuthorizedForwarder_ABI, bb as ICollector_ABI, b9 as IDualAggregator_ABI, bh as IERC20Metadata_ABI, bj as IERC20_ABI, bf as IEmissionManager_ABI, b7 as IPoolAddressesProvider_ABI, bi as IPoolConfigurator_ABI, bc as IPool_ABI, b3 as IReserveInterestRateStrategy_ABI, bg as IRewardsController_ABI, b4 as IStataTokenFactory_ABI, b8 as IStataTokenV2_ABI, b6 as IWrappedTokenGatewayV3_ABI, aU as IndexerTopicState, ah as Input, L as LTV_PRECISION, P as Payload, G as PayloadState, J as PayloadsControllerContract, T as Proposal, U as ProposalState, t as RAY, R as ReserveConfiguration, e as SECONDS_PER_YEAR, aY as SelfdestuctCheckState, ac as SoltypeElement, ad as StateDiff, ae as StateObject, as as SupportedChainIds, ak as TenderlyLog, aj as TenderlyLogRaw, ag as TenderlySimRequest, ao as TenderlySimulationResponse, an as TenderlySimulationResponseObject, al as TenderlyStackTrace, a6 as Tenderly_createVnetParamsResponse, ai as Trace, am as TransactionInfo, W as WAD, v as WAD_RAY_RATIO, f as aaveAddressesProvider_IncentivesControllerSlot, aL as alchemyNetworkMap, au as alchemySupportedChainIds, q as assetToBase, b as bitmapToIndexes, o as calculateAvailableBorrowsMarketReferenceCurrency, h as calculateCompoundedInterest, r as calculateHealthFactor, n as calculateHealthFactorFromBalances, i as calculateLinearInterest, aP as chainlinkFeeds, aZ as checkForSelfdestruct, a as decodeReserveConfiguration, c as decodeReserveConfigurationV2, d as decodeUserConfiguration, aT as diffCode, aS as erc1967_AdminSlot, aR as erc1967_ImplementationSlot, aN as etherscanExplorers, B as fetchImmutablePoolAddresses, C as fetchMutablePoolAddresses, D as fetchPoolAddresses, aI as flashbotsClientExtension, aH as flashbotsOnFetchRequest, aW as genericIndexer, ax as getAlchemyRPC, g as getBits, aC as getClient, aF as getContractDeploymentBlock, m as getCurrentDebtBalance, l as getCurrentLiquidityBalance, aw as getExplicitRPC, a3 as getExplorer, Y as getGovernance, az as getHyperRPC, aD as getImplementationSlot, aE as getLogsRecursive, p as getMarketReferenceCurrencyAndUsdBalance, av as getNetworkEnv, Q as getNonFinalizedPayloads, $ as getNonFinalizedProposals, k as getNormalizedDebt, j as getNormalizedIncome, M as getPayloadStorageOverrides, K as getPayloadsController, ay as getPublicRpc, aA as getQuicknodeRpc, aB as getRPCUrl, F as getReserveConfigurations, E as getReserveTokens, a4 as getSourceCode, b0 as getVerificationStatus, aQ as hyperRPCSupportedNetworks, O as isPayloadFinal, _ as isProposalFinal, N as makePayloadExecutableOnTestClient, Z as makeProposalExecutableOnTestClient, aJ as onMevHandler, a5 as parseEtherscanStyleSourceCode, aX as parseLogs, aK as priceUpdateDecoder, at as publicRPCs, aM as quicknodeNetworkMap, x as rayDiv, w as rayMul, y as rayToWad, a_ as renderTenderlyReport, aO as routescanExplorers, s as setBits, aa as tenderly_createVnet, a7 as tenderly_deleteVnet, a9 as tenderly_getVnet, ab as tenderly_sim, a8 as tenderly_simVnet, a$ as toTxLink, b2 as transformTenderlyStateDiff, a1 as validateAip, A as wadDiv, z as wadToRay } from './index-BygjJn_o.mjs';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import '@bgd-labs/aave-address-book/abis';
|
|
5
5
|
import 'arktype/internal/methods/object.ts';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StandardJsonInput } from './index-
|
|
2
|
-
export {
|
|
1
|
+
import { S as StandardJsonInput } from './index-BygjJn_o.js';
|
|
2
|
+
export { bd as AggregatorInterface_ABI, a0 as Aip, aG as BundleParams, aq as ChainId, ar as ChainList, b1 as Change, af as ContractObject, ap as EVENT_DB, a2 as ExplorerConfig, aV as GenericIndexerArgs, X as GovernanceContract, u as HALF_RAY, H as HALF_WAD, I as HUMAN_READABLE_PAYLOAD_STATE, V as HUMAN_READABLE_PROPOSAL_STATE, b5 as IAToken_ABI, ba as IAaveOracle_ABI, be as IAaveV3ConfigEngine_ABI, bk as IAuthorizedForwarder_ABI, bb as ICollector_ABI, b9 as IDualAggregator_ABI, bh as IERC20Metadata_ABI, bj as IERC20_ABI, bf as IEmissionManager_ABI, b7 as IPoolAddressesProvider_ABI, bi as IPoolConfigurator_ABI, bc as IPool_ABI, b3 as IReserveInterestRateStrategy_ABI, bg as IRewardsController_ABI, b4 as IStataTokenFactory_ABI, b8 as IStataTokenV2_ABI, b6 as IWrappedTokenGatewayV3_ABI, aU as IndexerTopicState, ah as Input, L as LTV_PRECISION, P as Payload, G as PayloadState, J as PayloadsControllerContract, T as Proposal, U as ProposalState, t as RAY, R as ReserveConfiguration, e as SECONDS_PER_YEAR, aY as SelfdestuctCheckState, ac as SoltypeElement, ad as StateDiff, ae as StateObject, as as SupportedChainIds, ak as TenderlyLog, aj as TenderlyLogRaw, ag as TenderlySimRequest, ao as TenderlySimulationResponse, an as TenderlySimulationResponseObject, al as TenderlyStackTrace, a6 as Tenderly_createVnetParamsResponse, ai as Trace, am as TransactionInfo, W as WAD, v as WAD_RAY_RATIO, f as aaveAddressesProvider_IncentivesControllerSlot, aL as alchemyNetworkMap, au as alchemySupportedChainIds, q as assetToBase, b as bitmapToIndexes, o as calculateAvailableBorrowsMarketReferenceCurrency, h as calculateCompoundedInterest, r as calculateHealthFactor, n as calculateHealthFactorFromBalances, i as calculateLinearInterest, aP as chainlinkFeeds, aZ as checkForSelfdestruct, a as decodeReserveConfiguration, c as decodeReserveConfigurationV2, d as decodeUserConfiguration, aT as diffCode, aS as erc1967_AdminSlot, aR as erc1967_ImplementationSlot, aN as etherscanExplorers, B as fetchImmutablePoolAddresses, C as fetchMutablePoolAddresses, D as fetchPoolAddresses, aI as flashbotsClientExtension, aH as flashbotsOnFetchRequest, aW as genericIndexer, ax as getAlchemyRPC, g as getBits, aC as getClient, aF as getContractDeploymentBlock, m as getCurrentDebtBalance, l as getCurrentLiquidityBalance, aw as getExplicitRPC, a3 as getExplorer, Y as getGovernance, az as getHyperRPC, aD as getImplementationSlot, aE as getLogsRecursive, p as getMarketReferenceCurrencyAndUsdBalance, av as getNetworkEnv, Q as getNonFinalizedPayloads, $ as getNonFinalizedProposals, k as getNormalizedDebt, j as getNormalizedIncome, M as getPayloadStorageOverrides, K as getPayloadsController, ay as getPublicRpc, aA as getQuicknodeRpc, aB as getRPCUrl, F as getReserveConfigurations, E as getReserveTokens, a4 as getSourceCode, b0 as getVerificationStatus, aQ as hyperRPCSupportedNetworks, O as isPayloadFinal, _ as isProposalFinal, N as makePayloadExecutableOnTestClient, Z as makeProposalExecutableOnTestClient, aJ as onMevHandler, a5 as parseEtherscanStyleSourceCode, aX as parseLogs, aK as priceUpdateDecoder, at as publicRPCs, aM as quicknodeNetworkMap, x as rayDiv, w as rayMul, y as rayToWad, a_ as renderTenderlyReport, aO as routescanExplorers, s as setBits, aa as tenderly_createVnet, a7 as tenderly_deleteVnet, a9 as tenderly_getVnet, ab as tenderly_sim, a8 as tenderly_simVnet, a$ as toTxLink, b2 as transformTenderlyStateDiff, a1 as validateAip, A as wadDiv, z as wadToRay } from './index-BygjJn_o.js';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import '@bgd-labs/aave-address-book/abis';
|
|
5
5
|
import 'arktype/internal/methods/object.ts';
|
package/dist/node.js
CHANGED
|
@@ -143,6 +143,7 @@ __export(node_exports, {
|
|
|
143
143
|
tenderly_sim: () => tenderly_sim,
|
|
144
144
|
tenderly_simVnet: () => tenderly_simVnet,
|
|
145
145
|
toTxLink: () => toTxLink,
|
|
146
|
+
transformTenderlyStateDiff: () => transformTenderlyStateDiff,
|
|
146
147
|
validateAip: () => validateAip,
|
|
147
148
|
wadDiv: () => wadDiv,
|
|
148
149
|
wadToRay: () => wadToRay
|
|
@@ -14150,7 +14151,8 @@ var ChainId = {
|
|
|
14150
14151
|
zksync: import_chains.zksync.id,
|
|
14151
14152
|
linea: import_chains.linea.id,
|
|
14152
14153
|
ink: import_chains.ink.id,
|
|
14153
|
-
soneium: import_chains.soneium.id
|
|
14154
|
+
soneium: import_chains.soneium.id,
|
|
14155
|
+
bob: import_chains.bob.id
|
|
14154
14156
|
};
|
|
14155
14157
|
var ChainList = {
|
|
14156
14158
|
[ChainId.mainnet]: import_chains.mainnet,
|
|
@@ -14190,7 +14192,8 @@ var ChainList = {
|
|
|
14190
14192
|
[ChainId.zksync]: import_chains.zksync,
|
|
14191
14193
|
[ChainId.linea]: import_chains.linea,
|
|
14192
14194
|
[ChainId.ink]: import_chains.ink,
|
|
14193
|
-
[ChainId.soneium]: import_chains.soneium
|
|
14195
|
+
[ChainId.soneium]: import_chains.soneium,
|
|
14196
|
+
[ChainId.bob]: import_chains.bob
|
|
14194
14197
|
};
|
|
14195
14198
|
|
|
14196
14199
|
// src/ecosystem/rpcs.ts
|
|
@@ -14390,7 +14393,8 @@ var publicRPCs = {
|
|
|
14390
14393
|
[ChainId.zksync]: "https://mainnet.era.zksync.io",
|
|
14391
14394
|
[ChainId.fantom]: "https://rpc.ftm.tools",
|
|
14392
14395
|
[ChainId.avalanche]: "https://api.avax.network/ext/bc/C/rpc",
|
|
14393
|
-
[ChainId.linea]: "https://rpc.linea.build"
|
|
14396
|
+
[ChainId.linea]: "https://rpc.linea.build",
|
|
14397
|
+
[ChainId.bob]: "https://rpc.gobob.xyz"
|
|
14394
14398
|
};
|
|
14395
14399
|
var alchemySupportedChainIds = Object.values(ChainId).filter(
|
|
14396
14400
|
(id) => alchemyNetworkMap[id]
|
|
@@ -20677,7 +20681,7 @@ var chainlinkFeeds = {
|
|
|
20677
20681
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
20678
20682
|
"proxyAddress": null,
|
|
20679
20683
|
"decimals": 18,
|
|
20680
|
-
"name": "UNIBTC/BTC-ExRate-mainnet-production"
|
|
20684
|
+
"name": "UNIBTC/BTC-ExRate-Deprecated-mainnet-production"
|
|
20681
20685
|
},
|
|
20682
20686
|
{
|
|
20683
20687
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
@@ -21906,9 +21910,21 @@ var chainlinkFeeds = {
|
|
|
21906
21910
|
{
|
|
21907
21911
|
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
21908
21912
|
"proxyAddress": null,
|
|
21909
|
-
"decimals":
|
|
21913
|
+
"decimals": 0,
|
|
21910
21914
|
"name": "SYRUPUSDC/USDC-ExRate-mainnet-production"
|
|
21911
21915
|
},
|
|
21916
|
+
{
|
|
21917
|
+
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
21918
|
+
"proxyAddress": null,
|
|
21919
|
+
"decimals": 18,
|
|
21920
|
+
"name": "SyrupUSDC/USDC-ExRate-Deprecated-mainnet-production"
|
|
21921
|
+
},
|
|
21922
|
+
{
|
|
21923
|
+
"contractAddress": "0x0000000000000000000000000000000000000000",
|
|
21924
|
+
"proxyAddress": null,
|
|
21925
|
+
"decimals": 0,
|
|
21926
|
+
"name": "UNIBTC/BTC-ExRate-mainnet-production"
|
|
21927
|
+
},
|
|
21912
21928
|
{
|
|
21913
21929
|
"contractAddress": "0x01DD3Cf6118069DB13A2d64d7e1A09FECd587EDD",
|
|
21914
21930
|
"proxyAddress": "0x8d0CC5f38f9E802475f2CFf4F9fc7000C2E1557c",
|
|
@@ -24036,7 +24052,7 @@ var chainlinkFeeds = {
|
|
|
24036
24052
|
{
|
|
24037
24053
|
"contractAddress": "0x534a7FF707Bc862cAB0Dda546F1B817Be5235b66",
|
|
24038
24054
|
"proxyAddress": null,
|
|
24039
|
-
"decimals":
|
|
24055
|
+
"decimals": 0,
|
|
24040
24056
|
"name": "wstETH/USD-RefPrice-DS-Premium-Global-003"
|
|
24041
24057
|
},
|
|
24042
24058
|
{
|
|
@@ -26547,6 +26563,76 @@ function toTxLink(txn, client) {
|
|
|
26547
26563
|
return `${client.chain?.blockExplorers?.default.url}/tx/${txn}`;
|
|
26548
26564
|
}
|
|
26549
26565
|
|
|
26566
|
+
// src/seatbelt/state.ts
|
|
26567
|
+
var import_viem10 = require("viem");
|
|
26568
|
+
function transformTenderlyStateDiff(stateDiff) {
|
|
26569
|
+
const formattedDiffs = stateDiff.reduce(
|
|
26570
|
+
(diffs, diff) => {
|
|
26571
|
+
if (!diff.raw?.[0]) return diffs;
|
|
26572
|
+
const addr = (0, import_viem10.getAddress)(diff.raw[0].address);
|
|
26573
|
+
if (!diffs[addr]) diffs[addr] = [diff];
|
|
26574
|
+
else diffs[addr].push(diff);
|
|
26575
|
+
return diffs;
|
|
26576
|
+
},
|
|
26577
|
+
{}
|
|
26578
|
+
);
|
|
26579
|
+
const allChanges = {};
|
|
26580
|
+
for (const [address, diffs] of Object.entries(formattedDiffs)) {
|
|
26581
|
+
const changes = [];
|
|
26582
|
+
for (const diff of diffs) {
|
|
26583
|
+
if (!diff.soltype) {
|
|
26584
|
+
for (const w of diff.raw) {
|
|
26585
|
+
const oldVal = JSON.stringify(w.original);
|
|
26586
|
+
const newVal = JSON.stringify(w.dirty);
|
|
26587
|
+
changes.push({
|
|
26588
|
+
before: oldVal,
|
|
26589
|
+
after: newVal,
|
|
26590
|
+
name: `Slot \`${w.key}\``
|
|
26591
|
+
});
|
|
26592
|
+
}
|
|
26593
|
+
} else if (diff.soltype.simple_type) {
|
|
26594
|
+
changes.push({
|
|
26595
|
+
before: diff.original,
|
|
26596
|
+
after: diff.dirty,
|
|
26597
|
+
name: diff.soltype.name,
|
|
26598
|
+
type: diff.soltype?.name
|
|
26599
|
+
});
|
|
26600
|
+
} else if (diff.soltype.type.startsWith("mapping")) {
|
|
26601
|
+
const keys = Array.from(
|
|
26602
|
+
/* @__PURE__ */ new Set([
|
|
26603
|
+
...Object.keys(diff.original || {}),
|
|
26604
|
+
...Object.keys(diff.dirty || {})
|
|
26605
|
+
])
|
|
26606
|
+
);
|
|
26607
|
+
const original = diff.original || {};
|
|
26608
|
+
const dirty = diff.dirty || {};
|
|
26609
|
+
for (const k of keys) {
|
|
26610
|
+
if (original[k] || dirty[k])
|
|
26611
|
+
changes.push({
|
|
26612
|
+
before: original[k],
|
|
26613
|
+
after: dirty[k],
|
|
26614
|
+
name: k,
|
|
26615
|
+
type: diff.soltype?.name
|
|
26616
|
+
});
|
|
26617
|
+
}
|
|
26618
|
+
} else {
|
|
26619
|
+
for (const w of diff.raw) {
|
|
26620
|
+
const oldVal = JSON.stringify(w.original);
|
|
26621
|
+
const newVal = JSON.stringify(w.dirty);
|
|
26622
|
+
changes.push({
|
|
26623
|
+
before: oldVal,
|
|
26624
|
+
after: newVal,
|
|
26625
|
+
name: w.key,
|
|
26626
|
+
type: "slot"
|
|
26627
|
+
});
|
|
26628
|
+
}
|
|
26629
|
+
}
|
|
26630
|
+
}
|
|
26631
|
+
allChanges[address] = changes;
|
|
26632
|
+
}
|
|
26633
|
+
return allChanges;
|
|
26634
|
+
}
|
|
26635
|
+
|
|
26550
26636
|
// src/ecosystem/foundry.ts
|
|
26551
26637
|
var import_node_child_process = require("child_process");
|
|
26552
26638
|
var import_diff2 = require("diff");
|
|
@@ -26718,6 +26804,7 @@ function diffFoundryStorageLayout(layoutBefore, layoutAfter) {
|
|
|
26718
26804
|
tenderly_sim,
|
|
26719
26805
|
tenderly_simVnet,
|
|
26720
26806
|
toTxLink,
|
|
26807
|
+
transformTenderlyStateDiff,
|
|
26721
26808
|
validateAip,
|
|
26722
26809
|
wadDiv,
|
|
26723
26810
|
wadToRay
|