@bgd-labs/toolbox 0.0.44 → 0.0.45

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 CHANGED
@@ -682,6 +682,7 @@ declare function tenderly_logsToAbiLogs(logs: TenderlyLog[]): {
682
682
  type: string;
683
683
  name: string | null;
684
684
  }[];
685
+ declare function tenderly_pingExplorer(chainId: number, address: Address): Promise<Response>;
685
686
 
686
687
  declare const EVENT_DB: readonly [];
687
688
 
@@ -15504,6 +15505,7 @@ declare function renderTenderlyReport({ client, sim, payloadId, payload, onchain
15504
15505
  eventCache: AbiEvent[];
15505
15506
  }>;
15506
15507
  declare function toTxLink(txn: Hex, client: Client): string;
15508
+ declare function toAddressLink(address: Address, client: Client): string;
15507
15509
 
15508
15510
  interface GetVerificationStatusParams {
15509
15511
  client: Client;
@@ -26348,4 +26350,4 @@ declare const IStataTokenV2_ABI: readonly [{
26348
26350
  readonly inputs: readonly [];
26349
26351
  }];
26350
26352
 
26351
- export { AggregatorInterface_ABI, Aip, type AssetInfo, type BlockscoutStyleSourceCode, type BundleParams, ChainId, ChainList, 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, IAccessControl_ABI, IAuthorizedForwarder_ABI, ICollector_ABI, IDualAggregator_ABI, IERC1967_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IUmbrellaStakeToken_ABI, IUmbrella_ABI, IWithGuardian_ABI, IWrappedTokenGatewayV3_ABI, type IndexerTopicState, type Input, LTV_PRECISION, Ownable_ABI, type Payload, PayloadState, type PayloadsControllerContract, type Proposal, ProposalState, ProxyAdmin_ABI, 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, addAssetPrice, addAssetSymbol, alchemyNetworkMap, alchemySupportedChainIds, assetIndexesToAsset, assetToBase, bitmapToIndexes, blockscoutExplorers, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateHealthFactor, calculateHealthFactorFromBalances, calculateLinearInterest, chainlinkFeeds, checkForSelfdestruct, decodeReserveConfiguration, decodeReserveConfigurationV2, decodeUserConfiguration, diffCode, enhanceLogs, enhanceStateDiff, erc1967_AdminSlot, erc1967_ImplementationSlot, etherscanExplorers, fetchImmutablePoolAddresses, fetchMutablePoolAddresses, fetchPoolAddresses, findAsset, flashbotsClientExtension, flashbotsOnFetchRequest, formatNumberString, genericIndexer, getAlchemyRPC, getBits, getClient, getContractDeploymentBlock, getCurrentDebtBalance, getCurrentLiquidityBalance, getExplicitRPC, getExplorer, getGovernance, getHyperRPC, getImplementationSlot, getLogsRecursive, getMarketReferenceCurrencyAndUsdBalance, getMdContractName, getNetworkEnv, getNonFinalizedPayloads, getNonFinalizedProposals, getNormalizedDebt, getNormalizedIncome, getObjectDiff, getPayloadStorageOverrides, getPayloadsController, getPublicRpc, getQuicknodeRpc, getRPCUrl, getReserveConfigurations, getReserveTokens, getSourceCode, getTenderlyRpc, getVerificationStatus, hyperRPCSupportedNetworks, isPayloadFinal, isProposalFinal, makePayloadExecutableOnTestClient, makeProposalExecutableOnTestClient, onMevHandler, parseBlockscoutStyleSourceCode, parseEtherscanStyleSourceCode, parseLogs, prettifyNumber, priceUpdateDecoder, publicRPCs, quicknodeNetworkMap, rayDiv, rayMul, rayToWad, renderMarkdownStateDiffReport, renderTenderlyReport, routescanExplorers, selfDestructStatusToString, setBits, tenderlyExplorerMap, tenderlyNetworkMap, tenderly_createVnet, tenderly_deleteVnet, tenderly_getVnet, tenderly_logsToAbiLogs, tenderly_sim, tenderly_simVnet, toBinaryString, toTxLink, transformTenderlyStateDiff, validateAip, verificationStatusToString, wadDiv, wadToRay };
26353
+ export { AggregatorInterface_ABI, Aip, type AssetInfo, type BlockscoutStyleSourceCode, type BundleParams, ChainId, ChainList, 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, IAccessControl_ABI, IAuthorizedForwarder_ABI, ICollector_ABI, IDualAggregator_ABI, IERC1967_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IUmbrellaStakeToken_ABI, IUmbrella_ABI, IWithGuardian_ABI, IWrappedTokenGatewayV3_ABI, type IndexerTopicState, type Input, LTV_PRECISION, Ownable_ABI, type Payload, PayloadState, type PayloadsControllerContract, type Proposal, ProposalState, ProxyAdmin_ABI, 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, addAssetPrice, addAssetSymbol, alchemyNetworkMap, alchemySupportedChainIds, assetIndexesToAsset, assetToBase, bitmapToIndexes, blockscoutExplorers, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateHealthFactor, calculateHealthFactorFromBalances, calculateLinearInterest, chainlinkFeeds, checkForSelfdestruct, decodeReserveConfiguration, decodeReserveConfigurationV2, decodeUserConfiguration, diffCode, enhanceLogs, enhanceStateDiff, erc1967_AdminSlot, erc1967_ImplementationSlot, etherscanExplorers, fetchImmutablePoolAddresses, fetchMutablePoolAddresses, fetchPoolAddresses, findAsset, flashbotsClientExtension, flashbotsOnFetchRequest, formatNumberString, genericIndexer, getAlchemyRPC, getBits, getClient, getContractDeploymentBlock, getCurrentDebtBalance, getCurrentLiquidityBalance, getExplicitRPC, getExplorer, getGovernance, getHyperRPC, getImplementationSlot, getLogsRecursive, getMarketReferenceCurrencyAndUsdBalance, getMdContractName, getNetworkEnv, getNonFinalizedPayloads, getNonFinalizedProposals, getNormalizedDebt, getNormalizedIncome, getObjectDiff, getPayloadStorageOverrides, getPayloadsController, getPublicRpc, getQuicknodeRpc, getRPCUrl, getReserveConfigurations, getReserveTokens, getSourceCode, getTenderlyRpc, getVerificationStatus, hyperRPCSupportedNetworks, isPayloadFinal, isProposalFinal, makePayloadExecutableOnTestClient, makeProposalExecutableOnTestClient, onMevHandler, parseBlockscoutStyleSourceCode, parseEtherscanStyleSourceCode, parseLogs, prettifyNumber, priceUpdateDecoder, publicRPCs, quicknodeNetworkMap, rayDiv, rayMul, rayToWad, renderMarkdownStateDiffReport, renderTenderlyReport, routescanExplorers, selfDestructStatusToString, setBits, tenderlyExplorerMap, tenderlyNetworkMap, tenderly_createVnet, tenderly_deleteVnet, tenderly_getVnet, tenderly_logsToAbiLogs, tenderly_pingExplorer, tenderly_sim, tenderly_simVnet, toAddressLink, toBinaryString, toTxLink, transformTenderlyStateDiff, validateAip, verificationStatusToString, wadDiv, wadToRay };
package/dist/index.d.ts CHANGED
@@ -682,6 +682,7 @@ declare function tenderly_logsToAbiLogs(logs: TenderlyLog[]): {
682
682
  type: string;
683
683
  name: string | null;
684
684
  }[];
685
+ declare function tenderly_pingExplorer(chainId: number, address: Address): Promise<Response>;
685
686
 
686
687
  declare const EVENT_DB: readonly [];
687
688
 
@@ -15504,6 +15505,7 @@ declare function renderTenderlyReport({ client, sim, payloadId, payload, onchain
15504
15505
  eventCache: AbiEvent[];
15505
15506
  }>;
15506
15507
  declare function toTxLink(txn: Hex, client: Client): string;
15508
+ declare function toAddressLink(address: Address, client: Client): string;
15507
15509
 
15508
15510
  interface GetVerificationStatusParams {
15509
15511
  client: Client;
@@ -26348,4 +26350,4 @@ declare const IStataTokenV2_ABI: readonly [{
26348
26350
  readonly inputs: readonly [];
26349
26351
  }];
26350
26352
 
26351
- export { AggregatorInterface_ABI, Aip, type AssetInfo, type BlockscoutStyleSourceCode, type BundleParams, ChainId, ChainList, 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, IAccessControl_ABI, IAuthorizedForwarder_ABI, ICollector_ABI, IDualAggregator_ABI, IERC1967_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IUmbrellaStakeToken_ABI, IUmbrella_ABI, IWithGuardian_ABI, IWrappedTokenGatewayV3_ABI, type IndexerTopicState, type Input, LTV_PRECISION, Ownable_ABI, type Payload, PayloadState, type PayloadsControllerContract, type Proposal, ProposalState, ProxyAdmin_ABI, 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, addAssetPrice, addAssetSymbol, alchemyNetworkMap, alchemySupportedChainIds, assetIndexesToAsset, assetToBase, bitmapToIndexes, blockscoutExplorers, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateHealthFactor, calculateHealthFactorFromBalances, calculateLinearInterest, chainlinkFeeds, checkForSelfdestruct, decodeReserveConfiguration, decodeReserveConfigurationV2, decodeUserConfiguration, diffCode, enhanceLogs, enhanceStateDiff, erc1967_AdminSlot, erc1967_ImplementationSlot, etherscanExplorers, fetchImmutablePoolAddresses, fetchMutablePoolAddresses, fetchPoolAddresses, findAsset, flashbotsClientExtension, flashbotsOnFetchRequest, formatNumberString, genericIndexer, getAlchemyRPC, getBits, getClient, getContractDeploymentBlock, getCurrentDebtBalance, getCurrentLiquidityBalance, getExplicitRPC, getExplorer, getGovernance, getHyperRPC, getImplementationSlot, getLogsRecursive, getMarketReferenceCurrencyAndUsdBalance, getMdContractName, getNetworkEnv, getNonFinalizedPayloads, getNonFinalizedProposals, getNormalizedDebt, getNormalizedIncome, getObjectDiff, getPayloadStorageOverrides, getPayloadsController, getPublicRpc, getQuicknodeRpc, getRPCUrl, getReserveConfigurations, getReserveTokens, getSourceCode, getTenderlyRpc, getVerificationStatus, hyperRPCSupportedNetworks, isPayloadFinal, isProposalFinal, makePayloadExecutableOnTestClient, makeProposalExecutableOnTestClient, onMevHandler, parseBlockscoutStyleSourceCode, parseEtherscanStyleSourceCode, parseLogs, prettifyNumber, priceUpdateDecoder, publicRPCs, quicknodeNetworkMap, rayDiv, rayMul, rayToWad, renderMarkdownStateDiffReport, renderTenderlyReport, routescanExplorers, selfDestructStatusToString, setBits, tenderlyExplorerMap, tenderlyNetworkMap, tenderly_createVnet, tenderly_deleteVnet, tenderly_getVnet, tenderly_logsToAbiLogs, tenderly_sim, tenderly_simVnet, toBinaryString, toTxLink, transformTenderlyStateDiff, validateAip, verificationStatusToString, wadDiv, wadToRay };
26353
+ export { AggregatorInterface_ABI, Aip, type AssetInfo, type BlockscoutStyleSourceCode, type BundleParams, ChainId, ChainList, 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, IAccessControl_ABI, IAuthorizedForwarder_ABI, ICollector_ABI, IDualAggregator_ABI, IERC1967_ABI, IERC20Metadata_ABI, IERC20_ABI, IEmissionManager_ABI, IPoolAddressesProvider_ABI, IPoolConfigurator_ABI, IPool_ABI, IReserveInterestRateStrategy_ABI, IRewardsController_ABI, IStataTokenFactory_ABI, IStataTokenV2_ABI, IUmbrellaStakeToken_ABI, IUmbrella_ABI, IWithGuardian_ABI, IWrappedTokenGatewayV3_ABI, type IndexerTopicState, type Input, LTV_PRECISION, Ownable_ABI, type Payload, PayloadState, type PayloadsControllerContract, type Proposal, ProposalState, ProxyAdmin_ABI, 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, addAssetPrice, addAssetSymbol, alchemyNetworkMap, alchemySupportedChainIds, assetIndexesToAsset, assetToBase, bitmapToIndexes, blockscoutExplorers, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateHealthFactor, calculateHealthFactorFromBalances, calculateLinearInterest, chainlinkFeeds, checkForSelfdestruct, decodeReserveConfiguration, decodeReserveConfigurationV2, decodeUserConfiguration, diffCode, enhanceLogs, enhanceStateDiff, erc1967_AdminSlot, erc1967_ImplementationSlot, etherscanExplorers, fetchImmutablePoolAddresses, fetchMutablePoolAddresses, fetchPoolAddresses, findAsset, flashbotsClientExtension, flashbotsOnFetchRequest, formatNumberString, genericIndexer, getAlchemyRPC, getBits, getClient, getContractDeploymentBlock, getCurrentDebtBalance, getCurrentLiquidityBalance, getExplicitRPC, getExplorer, getGovernance, getHyperRPC, getImplementationSlot, getLogsRecursive, getMarketReferenceCurrencyAndUsdBalance, getMdContractName, getNetworkEnv, getNonFinalizedPayloads, getNonFinalizedProposals, getNormalizedDebt, getNormalizedIncome, getObjectDiff, getPayloadStorageOverrides, getPayloadsController, getPublicRpc, getQuicknodeRpc, getRPCUrl, getReserveConfigurations, getReserveTokens, getSourceCode, getTenderlyRpc, getVerificationStatus, hyperRPCSupportedNetworks, isPayloadFinal, isProposalFinal, makePayloadExecutableOnTestClient, makeProposalExecutableOnTestClient, onMevHandler, parseBlockscoutStyleSourceCode, parseEtherscanStyleSourceCode, parseLogs, prettifyNumber, priceUpdateDecoder, publicRPCs, quicknodeNetworkMap, rayDiv, rayMul, rayToWad, renderMarkdownStateDiffReport, renderTenderlyReport, routescanExplorers, selfDestructStatusToString, setBits, tenderlyExplorerMap, tenderlyNetworkMap, tenderly_createVnet, tenderly_deleteVnet, tenderly_getVnet, tenderly_logsToAbiLogs, tenderly_pingExplorer, tenderly_sim, tenderly_simVnet, toAddressLink, toBinaryString, toTxLink, transformTenderlyStateDiff, validateAip, verificationStatusToString, wadDiv, wadToRay };
package/dist/index.js CHANGED
@@ -163,8 +163,10 @@ __export(index_exports, {
163
163
  tenderly_deleteVnet: () => tenderly_deleteVnet,
164
164
  tenderly_getVnet: () => tenderly_getVnet,
165
165
  tenderly_logsToAbiLogs: () => tenderly_logsToAbiLogs,
166
+ tenderly_pingExplorer: () => tenderly_pingExplorer,
166
167
  tenderly_sim: () => tenderly_sim,
167
168
  tenderly_simVnet: () => tenderly_simVnet,
169
+ toAddressLink: () => toAddressLink,
168
170
  toBinaryString: () => toBinaryString,
169
171
  toTxLink: () => toTxLink,
170
172
  transformTenderlyStateDiff: () => transformTenderlyStateDiff,
@@ -18797,6 +18799,11 @@ function tenderly_logsToAbiLogs(logs) {
18797
18799
  };
18798
18800
  });
18799
18801
  }
18802
+ function tenderly_pingExplorer(chainId, address) {
18803
+ return fetch(
18804
+ `https://dashboard.tenderly.co/contract/${tenderlyExplorerMap[chainId]}/${address}/txs/all`
18805
+ );
18806
+ }
18800
18807
 
18801
18808
  // src/ecosystem/tenderly.types.ts
18802
18809
  var SoltypeType = /* @__PURE__ */ ((SoltypeType2) => {
@@ -35917,7 +35924,7 @@ async function renderTenderlyReport({
35917
35924
  - state: ${payload.state}(${HUMAN_READABLE_PAYLOAD_STATE[payload.state]})
35918
35925
  - actions:
35919
35926
  ${payload.actions.map(
35920
- (a) => ` - [${a.target}](${toTxLink(a.target, client)}), accessLevel: ${a.accessLevel}, withDelegateCall: ${a.withDelegateCall}, value: ${a.value}, signature: ${a.signature}, callData: ${a.callData}`
35927
+ (a) => ` - [${a.target}](${toAddressLink(a.target, client)}), accessLevel: ${a.accessLevel}, withDelegateCall: ${a.withDelegateCall}, value: ${a.value}, signature: ${a.signature}, callData: ${a.callData}`
35921
35928
  ).join("\n")}
35922
35929
  `;
35923
35930
  if (createdLog) {
@@ -35993,10 +36000,25 @@ ${payload.actions.map(
35993
36000
  client,
35994
36001
  transformTenderlyStateDiff(sim.transaction.transaction_info.state_diff)
35995
36002
  );
35996
- if (verified.find((contract) => contract.status === 2 /* ERROR */)) {
36003
+ const unverified = verified.filter(
36004
+ (contract) => contract.status === 2 /* ERROR */
36005
+ );
36006
+ if (unverified.length !== 0) {
36007
+ try {
36008
+ await Promise.all(
36009
+ unverified.map(
36010
+ (ctr) => tenderly_pingExplorer(client.chain.id, ctr.address)
36011
+ )
36012
+ );
36013
+ } catch (e) {
36014
+ }
35997
36015
  report += `:sos: Found unverified contracts!
35998
36016
 
35999
36017
  `;
36018
+ report += unverified.map(
36019
+ (ctr) => ` - [${ctr.address}](${toAddressLink(ctr.address, client)})`
36020
+ ).join("\n");
36021
+ report += "\n\n";
36000
36022
  }
36001
36023
  if (selfDestruct.find(
36002
36024
  (contract) => contract.state === 5 /* SELF_DESTRUCT */
@@ -36057,6 +36079,9 @@ function renderUnixTime(time) {
36057
36079
  function toTxLink(txn, client) {
36058
36080
  return `${client.chain?.blockExplorers?.default.url}/tx/${txn}`;
36059
36081
  }
36082
+ function toAddressLink(address, client) {
36083
+ return `${client.chain?.blockExplorers?.default.url}/address/${address}`;
36084
+ }
36060
36085
  // Annotate the CommonJS export names for ESM import in node:
36061
36086
  0 && (module.exports = {
36062
36087
  AggregatorInterface_ABI,
@@ -36192,8 +36217,10 @@ function toTxLink(txn, client) {
36192
36217
  tenderly_deleteVnet,
36193
36218
  tenderly_getVnet,
36194
36219
  tenderly_logsToAbiLogs,
36220
+ tenderly_pingExplorer,
36195
36221
  tenderly_sim,
36196
36222
  tenderly_simVnet,
36223
+ toAddressLink,
36197
36224
  toBinaryString,
36198
36225
  toTxLink,
36199
36226
  transformTenderlyStateDiff,