@bgd-labs/toolbox 0.0.26 → 0.0.27
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 +24 -7
- package/dist/index.d.ts +24 -7
- package/dist/index.js +343 -166
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +369 -195
- 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 +343 -166
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +369 -195
- package/dist/node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -13891,7 +13891,7 @@ interface ParseLogsArgs {
|
|
|
13891
13891
|
}
|
|
13892
13892
|
declare function parseLogs({ logs, eventDb }: ParseLogsArgs): LogType[];
|
|
13893
13893
|
|
|
13894
|
-
declare enum
|
|
13894
|
+
declare enum SelfdestructCheckState {
|
|
13895
13895
|
TRUSTED = 0,
|
|
13896
13896
|
EOA = 1,
|
|
13897
13897
|
EMPTY = 2,
|
|
@@ -13899,9 +13899,10 @@ declare enum SelfdestuctCheckState {
|
|
|
13899
13899
|
SAFE = 4,
|
|
13900
13900
|
SELF_DESTRUCT = 5
|
|
13901
13901
|
}
|
|
13902
|
+
declare function selfDestructStatusToString(state: SelfdestructCheckState): string;
|
|
13902
13903
|
declare function checkForSelfdestruct(client: Client, addresses: Address[], trustedAddresses: Address[]): Promise<{
|
|
13903
13904
|
address: Address;
|
|
13904
|
-
state:
|
|
13905
|
+
state: SelfdestructCheckState;
|
|
13905
13906
|
}[]>;
|
|
13906
13907
|
|
|
13907
13908
|
type RenderTenderlyReportParams = {
|
|
@@ -13923,8 +13924,15 @@ type RenderTenderlyReportParams = {
|
|
|
13923
13924
|
blockNumber: number;
|
|
13924
13925
|
};
|
|
13925
13926
|
};
|
|
13927
|
+
eventCache?: AbiEvent[];
|
|
13928
|
+
config: {
|
|
13929
|
+
etherscanApiKey: string;
|
|
13930
|
+
};
|
|
13926
13931
|
};
|
|
13927
|
-
declare function renderTenderlyReport({ client, sim, payloadId, payload, onchainLogs: { createdLog, queuedLog, executedLog }, }: RenderTenderlyReportParams): Promise<
|
|
13932
|
+
declare function renderTenderlyReport({ client, sim, payloadId, payload, onchainLogs: { createdLog, queuedLog, executedLog }, eventCache, config, }: RenderTenderlyReportParams): Promise<{
|
|
13933
|
+
report: string;
|
|
13934
|
+
eventCache: AbiEvent[];
|
|
13935
|
+
}>;
|
|
13928
13936
|
declare function toTxLink(txn: Hex, client: Client): string;
|
|
13929
13937
|
|
|
13930
13938
|
interface GetVerificationStatusParams {
|
|
@@ -13956,13 +13964,22 @@ type ValueType = string | Record<string, string>;
|
|
|
13956
13964
|
type Change = {
|
|
13957
13965
|
name: string;
|
|
13958
13966
|
before: string | Record<string, ValueType>;
|
|
13959
|
-
after: string
|
|
13960
|
-
type
|
|
13967
|
+
after: string | Record<string, ValueType>;
|
|
13968
|
+
type: string;
|
|
13969
|
+
key?: string;
|
|
13961
13970
|
};
|
|
13962
13971
|
/**
|
|
13963
13972
|
* Transforms the tenderly state diff into a format that aligns more with foundry state diffs.
|
|
13964
13973
|
*/
|
|
13965
|
-
declare function transformTenderlyStateDiff(stateDiff: StateDiff[]): Record
|
|
13974
|
+
declare function transformTenderlyStateDiff(stateDiff: StateDiff[]): Record<Address, Change[]>;
|
|
13975
|
+
/**
|
|
13976
|
+
* Returns the difference between two objects, showing what changed from obj1 to obj2
|
|
13977
|
+
*/
|
|
13978
|
+
declare function getObjectDiff(obj1: Record<string, ValueType>, obj2: Record<string, ValueType>): {
|
|
13979
|
+
before: Record<string, ValueType>;
|
|
13980
|
+
after: Record<string, ValueType>;
|
|
13981
|
+
};
|
|
13982
|
+
declare function renderMarkdownStateDiffReport(changes: Record<Address, Change[]>, getContractName?: (address: Address) => string): string;
|
|
13966
13983
|
|
|
13967
13984
|
declare const IReserveInterestRateStrategy_ABI: readonly [{
|
|
13968
13985
|
readonly type: "function";
|
|
@@ -22723,4 +22740,4 @@ declare const IAuthorizedForwarder_ABI: readonly [{
|
|
|
22723
22740
|
readonly type: "function";
|
|
22724
22741
|
}];
|
|
22725
22742
|
|
|
22726
|
-
export { AggregatorInterface_ABI, Aip, type BlockscoutStyleSourceCode, type BundleParams, ChainId, ChainList, type Change, type ContractObject, EVENT_DB, type EtherscanStyleSourceCode, type ExplorerConfig, type GenericIndexerArgs, type GovernanceContract, HALF_RAY, HALF_WAD, HUMAN_READABLE_PAYLOAD_STATE, HUMAN_READABLE_PROPOSAL_STATE, IAToken_ABI, IAaveOracle_ABI, IAaveV3ConfigEngine_ABI, IAuthorizedForwarder_ABI, ICollector_ABI, IDualAggregator_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IWrappedTokenGatewayV3_ABI, type IndexerTopicState, type Input, LTV_PRECISION, type Payload, PayloadState, type PayloadsControllerContract, type Proposal, ProposalState, RAY, type ReserveConfiguration, SECONDS_PER_YEAR,
|
|
22743
|
+
export { AggregatorInterface_ABI, Aip, type BlockscoutStyleSourceCode, type BundleParams, ChainId, ChainList, type Change, type ContractObject, EVENT_DB, type EtherscanStyleSourceCode, type ExplorerConfig, type GenericIndexerArgs, type GovernanceContract, HALF_RAY, HALF_WAD, HUMAN_READABLE_PAYLOAD_STATE, HUMAN_READABLE_PROPOSAL_STATE, IAToken_ABI, IAaveOracle_ABI, IAaveV3ConfigEngine_ABI, IAuthorizedForwarder_ABI, ICollector_ABI, IDualAggregator_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IWrappedTokenGatewayV3_ABI, type IndexerTopicState, type Input, LTV_PRECISION, type Payload, PayloadState, type PayloadsControllerContract, type Proposal, ProposalState, RAY, type ReserveConfiguration, SECONDS_PER_YEAR, SelfdestructCheckState, type SoltypeElement, SoltypeType, type StandardJsonInput, type StateDiff, type StateObject, type SupportedChainIds, type TenderlyLog, type TenderlyLogRaw, type TenderlySimRequest, type TenderlySimulationResponse, type TenderlySimulationResponseObject, type TenderlyStackTrace, type Tenderly_createVnetParamsResponse, type Trace, type TransactionInfo, VerificationStatus, WAD, WAD_RAY_RATIO, aaveAddressesProvider_IncentivesControllerSlot, alchemyNetworkMap, alchemySupportedChainIds, assetToBase, bitmapToIndexes, blockscoutExplorers, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateHealthFactor, calculateHealthFactorFromBalances, calculateLinearInterest, chainlinkFeeds, checkForSelfdestruct, decodeReserveConfiguration, decodeReserveConfigurationV2, decodeUserConfiguration, diffCode, erc1967_AdminSlot, erc1967_ImplementationSlot, etherscanExplorers, fetchImmutablePoolAddresses, fetchMutablePoolAddresses, fetchPoolAddresses, flashbotsClientExtension, flashbotsOnFetchRequest, genericIndexer, getAlchemyRPC, getBits, getClient, getContractDeploymentBlock, getCurrentDebtBalance, getCurrentLiquidityBalance, getExplicitRPC, getExplorer, getGovernance, getHyperRPC, getImplementationSlot, getLogsRecursive, getMarketReferenceCurrencyAndUsdBalance, getNetworkEnv, getNonFinalizedPayloads, getNonFinalizedProposals, getNormalizedDebt, getNormalizedIncome, getObjectDiff, getPayloadStorageOverrides, getPayloadsController, getPublicRpc, getQuicknodeRpc, getRPCUrl, getReserveConfigurations, getReserveTokens, getSourceCode, getVerificationStatus, hyperRPCSupportedNetworks, isPayloadFinal, isProposalFinal, makePayloadExecutableOnTestClient, makeProposalExecutableOnTestClient, onMevHandler, parseBlockscoutStyleSourceCode, parseEtherscanStyleSourceCode, parseLogs, priceUpdateDecoder, publicRPCs, quicknodeNetworkMap, rayDiv, rayMul, rayToWad, renderMarkdownStateDiffReport, renderTenderlyReport, routescanExplorers, selfDestructStatusToString, setBits, tenderly_createVnet, tenderly_deleteVnet, tenderly_getVnet, tenderly_logsToAbiLogs, tenderly_sim, tenderly_simVnet, toTxLink, transformTenderlyStateDiff, validateAip, verificationStatusToString, wadDiv, wadToRay };
|
package/dist/index.d.ts
CHANGED
|
@@ -13891,7 +13891,7 @@ interface ParseLogsArgs {
|
|
|
13891
13891
|
}
|
|
13892
13892
|
declare function parseLogs({ logs, eventDb }: ParseLogsArgs): LogType[];
|
|
13893
13893
|
|
|
13894
|
-
declare enum
|
|
13894
|
+
declare enum SelfdestructCheckState {
|
|
13895
13895
|
TRUSTED = 0,
|
|
13896
13896
|
EOA = 1,
|
|
13897
13897
|
EMPTY = 2,
|
|
@@ -13899,9 +13899,10 @@ declare enum SelfdestuctCheckState {
|
|
|
13899
13899
|
SAFE = 4,
|
|
13900
13900
|
SELF_DESTRUCT = 5
|
|
13901
13901
|
}
|
|
13902
|
+
declare function selfDestructStatusToString(state: SelfdestructCheckState): string;
|
|
13902
13903
|
declare function checkForSelfdestruct(client: Client, addresses: Address[], trustedAddresses: Address[]): Promise<{
|
|
13903
13904
|
address: Address;
|
|
13904
|
-
state:
|
|
13905
|
+
state: SelfdestructCheckState;
|
|
13905
13906
|
}[]>;
|
|
13906
13907
|
|
|
13907
13908
|
type RenderTenderlyReportParams = {
|
|
@@ -13923,8 +13924,15 @@ type RenderTenderlyReportParams = {
|
|
|
13923
13924
|
blockNumber: number;
|
|
13924
13925
|
};
|
|
13925
13926
|
};
|
|
13927
|
+
eventCache?: AbiEvent[];
|
|
13928
|
+
config: {
|
|
13929
|
+
etherscanApiKey: string;
|
|
13930
|
+
};
|
|
13926
13931
|
};
|
|
13927
|
-
declare function renderTenderlyReport({ client, sim, payloadId, payload, onchainLogs: { createdLog, queuedLog, executedLog }, }: RenderTenderlyReportParams): Promise<
|
|
13932
|
+
declare function renderTenderlyReport({ client, sim, payloadId, payload, onchainLogs: { createdLog, queuedLog, executedLog }, eventCache, config, }: RenderTenderlyReportParams): Promise<{
|
|
13933
|
+
report: string;
|
|
13934
|
+
eventCache: AbiEvent[];
|
|
13935
|
+
}>;
|
|
13928
13936
|
declare function toTxLink(txn: Hex, client: Client): string;
|
|
13929
13937
|
|
|
13930
13938
|
interface GetVerificationStatusParams {
|
|
@@ -13956,13 +13964,22 @@ type ValueType = string | Record<string, string>;
|
|
|
13956
13964
|
type Change = {
|
|
13957
13965
|
name: string;
|
|
13958
13966
|
before: string | Record<string, ValueType>;
|
|
13959
|
-
after: string
|
|
13960
|
-
type
|
|
13967
|
+
after: string | Record<string, ValueType>;
|
|
13968
|
+
type: string;
|
|
13969
|
+
key?: string;
|
|
13961
13970
|
};
|
|
13962
13971
|
/**
|
|
13963
13972
|
* Transforms the tenderly state diff into a format that aligns more with foundry state diffs.
|
|
13964
13973
|
*/
|
|
13965
|
-
declare function transformTenderlyStateDiff(stateDiff: StateDiff[]): Record
|
|
13974
|
+
declare function transformTenderlyStateDiff(stateDiff: StateDiff[]): Record<Address, Change[]>;
|
|
13975
|
+
/**
|
|
13976
|
+
* Returns the difference between two objects, showing what changed from obj1 to obj2
|
|
13977
|
+
*/
|
|
13978
|
+
declare function getObjectDiff(obj1: Record<string, ValueType>, obj2: Record<string, ValueType>): {
|
|
13979
|
+
before: Record<string, ValueType>;
|
|
13980
|
+
after: Record<string, ValueType>;
|
|
13981
|
+
};
|
|
13982
|
+
declare function renderMarkdownStateDiffReport(changes: Record<Address, Change[]>, getContractName?: (address: Address) => string): string;
|
|
13966
13983
|
|
|
13967
13984
|
declare const IReserveInterestRateStrategy_ABI: readonly [{
|
|
13968
13985
|
readonly type: "function";
|
|
@@ -22723,4 +22740,4 @@ declare const IAuthorizedForwarder_ABI: readonly [{
|
|
|
22723
22740
|
readonly type: "function";
|
|
22724
22741
|
}];
|
|
22725
22742
|
|
|
22726
|
-
export { AggregatorInterface_ABI, Aip, type BlockscoutStyleSourceCode, type BundleParams, ChainId, ChainList, type Change, type ContractObject, EVENT_DB, type EtherscanStyleSourceCode, type ExplorerConfig, type GenericIndexerArgs, type GovernanceContract, HALF_RAY, HALF_WAD, HUMAN_READABLE_PAYLOAD_STATE, HUMAN_READABLE_PROPOSAL_STATE, IAToken_ABI, IAaveOracle_ABI, IAaveV3ConfigEngine_ABI, IAuthorizedForwarder_ABI, ICollector_ABI, IDualAggregator_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IWrappedTokenGatewayV3_ABI, type IndexerTopicState, type Input, LTV_PRECISION, type Payload, PayloadState, type PayloadsControllerContract, type Proposal, ProposalState, RAY, type ReserveConfiguration, SECONDS_PER_YEAR,
|
|
22743
|
+
export { AggregatorInterface_ABI, Aip, type BlockscoutStyleSourceCode, type BundleParams, ChainId, ChainList, type Change, type ContractObject, EVENT_DB, type EtherscanStyleSourceCode, type ExplorerConfig, type GenericIndexerArgs, type GovernanceContract, HALF_RAY, HALF_WAD, HUMAN_READABLE_PAYLOAD_STATE, HUMAN_READABLE_PROPOSAL_STATE, IAToken_ABI, IAaveOracle_ABI, IAaveV3ConfigEngine_ABI, IAuthorizedForwarder_ABI, ICollector_ABI, IDualAggregator_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IWrappedTokenGatewayV3_ABI, type IndexerTopicState, type Input, LTV_PRECISION, type Payload, PayloadState, type PayloadsControllerContract, type Proposal, ProposalState, RAY, type ReserveConfiguration, SECONDS_PER_YEAR, SelfdestructCheckState, type SoltypeElement, SoltypeType, type StandardJsonInput, type StateDiff, type StateObject, type SupportedChainIds, type TenderlyLog, type TenderlyLogRaw, type TenderlySimRequest, type TenderlySimulationResponse, type TenderlySimulationResponseObject, type TenderlyStackTrace, type Tenderly_createVnetParamsResponse, type Trace, type TransactionInfo, VerificationStatus, WAD, WAD_RAY_RATIO, aaveAddressesProvider_IncentivesControllerSlot, alchemyNetworkMap, alchemySupportedChainIds, assetToBase, bitmapToIndexes, blockscoutExplorers, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateHealthFactor, calculateHealthFactorFromBalances, calculateLinearInterest, chainlinkFeeds, checkForSelfdestruct, decodeReserveConfiguration, decodeReserveConfigurationV2, decodeUserConfiguration, diffCode, erc1967_AdminSlot, erc1967_ImplementationSlot, etherscanExplorers, fetchImmutablePoolAddresses, fetchMutablePoolAddresses, fetchPoolAddresses, flashbotsClientExtension, flashbotsOnFetchRequest, genericIndexer, getAlchemyRPC, getBits, getClient, getContractDeploymentBlock, getCurrentDebtBalance, getCurrentLiquidityBalance, getExplicitRPC, getExplorer, getGovernance, getHyperRPC, getImplementationSlot, getLogsRecursive, getMarketReferenceCurrencyAndUsdBalance, getNetworkEnv, getNonFinalizedPayloads, getNonFinalizedProposals, getNormalizedDebt, getNormalizedIncome, getObjectDiff, getPayloadStorageOverrides, getPayloadsController, getPublicRpc, getQuicknodeRpc, getRPCUrl, getReserveConfigurations, getReserveTokens, getSourceCode, getVerificationStatus, hyperRPCSupportedNetworks, isPayloadFinal, isProposalFinal, makePayloadExecutableOnTestClient, makeProposalExecutableOnTestClient, onMevHandler, parseBlockscoutStyleSourceCode, parseEtherscanStyleSourceCode, parseLogs, priceUpdateDecoder, publicRPCs, quicknodeNetworkMap, rayDiv, rayMul, rayToWad, renderMarkdownStateDiffReport, renderTenderlyReport, routescanExplorers, selfDestructStatusToString, setBits, tenderly_createVnet, tenderly_deleteVnet, tenderly_getVnet, tenderly_logsToAbiLogs, tenderly_sim, tenderly_simVnet, toTxLink, transformTenderlyStateDiff, validateAip, verificationStatusToString, wadDiv, wadToRay };
|