@bgd-labs/toolbox 0.0.20 → 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-DPOHC58S.d.mts → index-BygjJn_o.d.mts} +209 -99
- package/dist/{index-DPOHC58S.d.ts → index-BygjJn_o.d.ts} +209 -99
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +71 -0
- 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 +72 -0
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +71 -0
- 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
|
|
@@ -26562,6 +26563,76 @@ function toTxLink(txn, client) {
|
|
|
26562
26563
|
return `${client.chain?.blockExplorers?.default.url}/tx/${txn}`;
|
|
26563
26564
|
}
|
|
26564
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
|
+
|
|
26565
26636
|
// src/ecosystem/foundry.ts
|
|
26566
26637
|
var import_node_child_process = require("child_process");
|
|
26567
26638
|
var import_diff2 = require("diff");
|
|
@@ -26733,6 +26804,7 @@ function diffFoundryStorageLayout(layoutBefore, layoutAfter) {
|
|
|
26733
26804
|
tenderly_sim,
|
|
26734
26805
|
tenderly_simVnet,
|
|
26735
26806
|
toTxLink,
|
|
26807
|
+
transformTenderlyStateDiff,
|
|
26736
26808
|
validateAip,
|
|
26737
26809
|
wadDiv,
|
|
26738
26810
|
wadToRay
|