@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.
@@ -373,6 +373,203 @@ declare function getSourceCode(params: GetSourceCodeParams): Promise<{
373
373
  }>;
374
374
  declare function parseEtherscanStyleSourceCode(sourceCode: string): StandardJsonInput;
375
375
 
376
+ /**
377
+ * Tenderly does not maintain proper types, so we try to do it :shrug:
378
+ */
379
+
380
+ declare enum SoltypeType {
381
+ Address = "address",
382
+ Bool = "bool",
383
+ Bytes32 = "bytes32",
384
+ MappingAddressUint256 = "mapping (address => uint256)",
385
+ MappingUint256Uint256 = "mapping (uint256 => uint256)",
386
+ String = "string",
387
+ Tuple = "tuple",
388
+ TypeAddress = "address[]",
389
+ TypeTuple = "tuple[]",
390
+ Uint16 = "uint16",
391
+ Uint256 = "uint256",
392
+ Uint48 = "uint48",
393
+ Uint56 = "uint56",
394
+ Uint8 = "uint8"
395
+ }
396
+ declare enum StorageLocation {
397
+ Calldata = "calldata",
398
+ Default = "default",
399
+ Memory = "memory",
400
+ Storage = "storage"
401
+ }
402
+ declare enum SimpleTypeType {
403
+ Address = "address",
404
+ Bool = "bool",
405
+ Bytes = "bytes",
406
+ Slice = "slice",
407
+ String = "string",
408
+ Uint = "uint"
409
+ }
410
+ interface Type {
411
+ type: SimpleTypeType;
412
+ }
413
+ interface SoltypeElement {
414
+ name: string;
415
+ type: SoltypeType;
416
+ storage_location: StorageLocation;
417
+ components: SoltypeElement[] | null;
418
+ offset: number;
419
+ index: string;
420
+ indexed: boolean;
421
+ simple_type?: Type;
422
+ }
423
+ interface RawElement {
424
+ address: string;
425
+ key: string;
426
+ original: string;
427
+ dirty: string;
428
+ }
429
+ interface StateDiff {
430
+ soltype: SoltypeElement | null;
431
+ original: string | Record<string, any>;
432
+ dirty: string | Record<string, any>;
433
+ raw: RawElement[];
434
+ address: string;
435
+ }
436
+ type StateObject = {
437
+ balance?: string;
438
+ code?: string;
439
+ storage?: Record<Hex, Hex>;
440
+ };
441
+ type ContractObject = {
442
+ contractName: string;
443
+ source: string;
444
+ sourcePath: string;
445
+ compiler: {
446
+ name: "solc";
447
+ version: string;
448
+ };
449
+ networks: Record<string, {
450
+ events?: Record<string, string>;
451
+ links?: Record<string, string>;
452
+ address: string;
453
+ transactionHash?: string;
454
+ }>;
455
+ };
456
+ type TenderlySimRequest = {
457
+ network_id: string;
458
+ block_number?: number;
459
+ transaction_index?: number;
460
+ from: Hex;
461
+ to: Hex;
462
+ input: Hex;
463
+ gas?: number;
464
+ gas_price?: string;
465
+ value?: string;
466
+ simulation_type?: "full" | "quick";
467
+ save?: boolean;
468
+ save_if_fails?: boolean;
469
+ state_objects?: Record<Hex, StateObject>;
470
+ contracts?: ContractObject[];
471
+ block_header?: {
472
+ number?: Hex;
473
+ timestamp?: Hex;
474
+ };
475
+ generate_access_list?: boolean;
476
+ root?: string;
477
+ };
478
+ interface Input {
479
+ soltype: SoltypeElement | null;
480
+ value: boolean | string;
481
+ }
482
+ interface Trace {
483
+ from: Hex;
484
+ to?: Hex;
485
+ function_name?: string;
486
+ input: Hex;
487
+ output: string;
488
+ calls?: Trace[];
489
+ decoded_input: Input[];
490
+ caller_op: string;
491
+ }
492
+ interface TenderlyLogRaw {
493
+ address: string;
494
+ topics: string[];
495
+ data: string;
496
+ }
497
+ interface TenderlyLog {
498
+ name: string | null;
499
+ anonymous: boolean;
500
+ inputs: Input[];
501
+ raw: TenderlyLogRaw;
502
+ }
503
+ interface TenderlyStackTrace {
504
+ file_index: number;
505
+ contract: string;
506
+ name: string;
507
+ line: number;
508
+ error: string;
509
+ error_reason: string;
510
+ code: string;
511
+ op: string;
512
+ length: number;
513
+ }
514
+ type TransactionInfo = {
515
+ call_trace: {
516
+ calls: Trace[];
517
+ };
518
+ state_diff: StateDiff[];
519
+ logs: TenderlyLog[] | null;
520
+ stack_trace: TenderlyStackTrace[] | null;
521
+ };
522
+ type Transaction = {
523
+ transaction_info: TransactionInfo;
524
+ block_number: number;
525
+ timestamp: string;
526
+ status: boolean;
527
+ addresses: Hex[];
528
+ };
529
+ type TenderlyContractResponseObject = {
530
+ address: Hex;
531
+ contract_name: string;
532
+ standards?: string[];
533
+ token_data?: {
534
+ symbol: string;
535
+ name: string;
536
+ decimals: number;
537
+ };
538
+ child_contracts?: {
539
+ id: string;
540
+ address: Hex;
541
+ network_id: string;
542
+ }[];
543
+ src_map: any;
544
+ };
545
+ interface TenderlySimulationResponseObject {
546
+ id: string;
547
+ project_id: string;
548
+ owner_id: string;
549
+ network_id: string;
550
+ block_number: number;
551
+ transaction_index: number;
552
+ from: string;
553
+ to: string;
554
+ input: string;
555
+ gas: number;
556
+ gas_price: string;
557
+ value: string;
558
+ method: string;
559
+ status: boolean;
560
+ access_list: null;
561
+ queue_origin: string;
562
+ created_at: Date;
563
+ block_header: {
564
+ timestamp: string;
565
+ };
566
+ }
567
+ type TenderlySimulationResponse = {
568
+ transaction: Transaction;
569
+ contracts: TenderlyContractResponseObject[];
570
+ simulation: TenderlySimulationResponseObject;
571
+ };
572
+
376
573
  /**
377
574
  * While tenderly is a fenomanal tool for testing, it is not always easy to use as there are minor bugs and small nuances to consider everywhere.
378
575
  * This is a simple wrapper around the tenderly APIs.
@@ -431,48 +628,6 @@ declare function tenderly_createVnet({ slug, displayName, baseChainId, forkChain
431
628
  simulate: (body: object) => Promise<any>;
432
629
  delete: () => Promise<Response>;
433
630
  }>;
434
- type StateObject = {
435
- balance?: string;
436
- code?: string;
437
- storage?: Record<Hex, Hex>;
438
- };
439
- type ContractObject = {
440
- contractName: string;
441
- source: string;
442
- sourcePath: string;
443
- compiler: {
444
- name: "solc";
445
- version: string;
446
- };
447
- networks: Record<string, {
448
- events?: Record<string, string>;
449
- links?: Record<string, string>;
450
- address: string;
451
- transactionHash?: string;
452
- }>;
453
- };
454
- type TenderlySimRequest = {
455
- network_id: string;
456
- block_number?: number;
457
- transaction_index?: number;
458
- from: Hex;
459
- to: Hex;
460
- input: Hex;
461
- gas?: number;
462
- gas_price?: string;
463
- value?: string;
464
- simulation_type?: "full" | "quick";
465
- save?: boolean;
466
- save_if_fails?: boolean;
467
- state_objects?: Record<Hex, StateObject>;
468
- contracts?: ContractObject[];
469
- block_header?: {
470
- number?: Hex;
471
- timestamp?: Hex;
472
- };
473
- generate_access_list?: boolean;
474
- root?: string;
475
- };
476
631
  declare function tenderly_sim({ accountSlug, projectSlug, accessToken }: TenderlyConfig, body: TenderlySimRequest): Promise<any>;
477
632
 
478
633
  declare const EVENT_DB: readonly [];
@@ -506,6 +661,7 @@ declare const ChainId: {
506
661
  readonly linea: 59144;
507
662
  readonly ink: 57073;
508
663
  readonly soneium: 1868;
664
+ readonly bob: 60808;
509
665
  };
510
666
  declare const ChainList: Record<valueOf<typeof ChainId>, Chain>;
511
667
 
@@ -527,12 +683,13 @@ declare const publicRPCs: {
527
683
  readonly 250: "https://rpc.ftm.tools";
528
684
  readonly 43114: "https://api.avax.network/ext/bc/C/rpc";
529
685
  readonly 59144: "https://rpc.linea.build";
686
+ readonly 60808: "https://rpc.gobob.xyz";
530
687
  };
531
- declare const alchemySupportedChainIds: (1 | 10 | 56 | 100 | 137 | 146 | 250 | 324 | 1101 | 4002 | 5000 | 8453 | 42161 | 42220 | 43113 | 43114 | 59144 | 80002 | 84532 | 421614 | 534351 | 534352 | 11155111 | 11155420 | 1088 | 57073 | 1666600000 | 1868)[];
532
- declare const getNetworkEnv: (chainId: SupportedChainIds) => "RPC_BNB" | "RPC_CELO" | "RPC_METIS" | "RPC_BASE" | "RPC_SCROLL" | "RPC_MAINNET" | "RPC_POLYGON" | "RPC_POLYGON_AMOY" | "RPC_AVALANCHE" | "RPC_AVALANCHE_FUJI" | "RPC_ARBITRUM" | "RPC_ARBITRUM_SEPOLIA" | "RPC_FANTOM" | "RPC_FANTOM_TESTNET" | "RPC_OPTIMISM" | "RPC_OPTIMISM_SEPOLIA" | "RPC_HARMONY" | "RPC_SEPOLIA" | "RPC_SCROLL_SEPOLIA" | "RPC_SONIC" | "RPC_MANTLE" | "RPC_BASE_SEPOLIA" | "RPC_GNOSIS" | "RPC_ZKEVM" | "RPC_ZKSYNC" | "RPC_LINEA" | "RPC_INK" | "RPC_SONEIUM";
688
+ declare const alchemySupportedChainIds: (1 | 10 | 56 | 100 | 137 | 146 | 250 | 324 | 1101 | 4002 | 5000 | 8453 | 42161 | 42220 | 43113 | 43114 | 59144 | 80002 | 84532 | 421614 | 534351 | 534352 | 11155111 | 11155420 | 1088 | 57073 | 1666600000 | 1868 | 60808)[];
689
+ declare const getNetworkEnv: (chainId: SupportedChainIds) => "RPC_BNB" | "RPC_CELO" | "RPC_METIS" | "RPC_BOB" | "RPC_BASE" | "RPC_SCROLL" | "RPC_MAINNET" | "RPC_POLYGON" | "RPC_POLYGON_AMOY" | "RPC_AVALANCHE" | "RPC_AVALANCHE_FUJI" | "RPC_ARBITRUM" | "RPC_ARBITRUM_SEPOLIA" | "RPC_FANTOM" | "RPC_FANTOM_TESTNET" | "RPC_OPTIMISM" | "RPC_OPTIMISM_SEPOLIA" | "RPC_HARMONY" | "RPC_SEPOLIA" | "RPC_SCROLL_SEPOLIA" | "RPC_SONIC" | "RPC_MANTLE" | "RPC_BASE_SEPOLIA" | "RPC_GNOSIS" | "RPC_ZKEVM" | "RPC_ZKSYNC" | "RPC_LINEA" | "RPC_INK" | "RPC_SONEIUM";
533
690
  declare function getExplicitRPC(chainId: SupportedChainIds): string;
534
691
  declare function getAlchemyRPC(chainId: SupportedChainIds, alchemyKey: string): string;
535
- declare function getPublicRpc(chainId: SupportedChainIds): "https://mainnet.era.zksync.io" | "https://api.avax.network/ext/bc/C/rpc" | "https://rpc.linea.build" | "https://rpc.scroll.io" | "https://andromeda.metis.io/?owner=1088" | "https://eth.llamarpc.com" | "https://polygon.llamarpc.com" | "https://base.llamarpc.com" | "https://binance.llamarpc.com" | "https://rpc.ankr.com/gnosis" | "https://rpc.ftm.tools";
692
+ declare function getPublicRpc(chainId: SupportedChainIds): "https://mainnet.era.zksync.io" | "https://api.avax.network/ext/bc/C/rpc" | "https://rpc.linea.build" | "https://rpc.scroll.io" | "https://andromeda.metis.io/?owner=1088" | "https://rpc.gobob.xyz" | "https://eth.llamarpc.com" | "https://polygon.llamarpc.com" | "https://base.llamarpc.com" | "https://binance.llamarpc.com" | "https://rpc.ankr.com/gnosis" | "https://rpc.ftm.tools";
536
693
  /**
537
694
  * HyperRPCs are extremely fast **but** they only support a subset of the standard.
538
695
  * Therefore they are not used in the generalized getClient atm.
@@ -6801,7 +6958,7 @@ declare const chainlinkFeeds: {
6801
6958
  readonly contractAddress: "0x0000000000000000000000000000000000000000";
6802
6959
  readonly proxyAddress: null;
6803
6960
  readonly decimals: 18;
6804
- readonly name: "UNIBTC/BTC-ExRate-mainnet-production";
6961
+ readonly name: "UNIBTC/BTC-ExRate-Deprecated-mainnet-production";
6805
6962
  }, {
6806
6963
  readonly contractAddress: "0x0000000000000000000000000000000000000000";
6807
6964
  readonly proxyAddress: null;
@@ -7825,8 +7982,18 @@ declare const chainlinkFeeds: {
7825
7982
  }, {
7826
7983
  readonly contractAddress: "0x0000000000000000000000000000000000000000";
7827
7984
  readonly proxyAddress: null;
7828
- readonly decimals: 18;
7985
+ readonly decimals: 0;
7829
7986
  readonly name: "SYRUPUSDC/USDC-ExRate-mainnet-production";
7987
+ }, {
7988
+ readonly contractAddress: "0x0000000000000000000000000000000000000000";
7989
+ readonly proxyAddress: null;
7990
+ readonly decimals: 18;
7991
+ readonly name: "SyrupUSDC/USDC-ExRate-Deprecated-mainnet-production";
7992
+ }, {
7993
+ readonly contractAddress: "0x0000000000000000000000000000000000000000";
7994
+ readonly proxyAddress: null;
7995
+ readonly decimals: 0;
7996
+ readonly name: "UNIBTC/BTC-ExRate-mainnet-production";
7830
7997
  }, {
7831
7998
  readonly contractAddress: "0x01DD3Cf6118069DB13A2d64d7e1A09FECd587EDD";
7832
7999
  readonly proxyAddress: "0x8d0CC5f38f9E802475f2CFf4F9fc7000C2E1557c";
@@ -9600,7 +9767,7 @@ declare const chainlinkFeeds: {
9600
9767
  }, {
9601
9768
  readonly contractAddress: "0x534a7FF707Bc862cAB0Dda546F1B817Be5235b66";
9602
9769
  readonly proxyAddress: null;
9603
- readonly decimals: 18;
9770
+ readonly decimals: 0;
9604
9771
  readonly name: "wstETH/USD-RefPrice-DS-Premium-Global-003";
9605
9772
  }, {
9606
9773
  readonly contractAddress: "0x534a7FF707Bc862cAB0Dda546F1B817Be5235b66";
@@ -11402,7 +11569,7 @@ declare function checkForSelfdestruct(client: Client, addresses: Address[], trus
11402
11569
 
11403
11570
  type RenderTenderlyReportParams = {
11404
11571
  client: Client;
11405
- sim: any;
11572
+ sim: TenderlySimulationResponse;
11406
11573
  payloadId: number;
11407
11574
  payload: Payload;
11408
11575
  onchainLogs: {
@@ -11447,62 +11614,17 @@ declare function getVerificationStatus({ client, addresses, contractDb, apiKey,
11447
11614
  new?: boolean;
11448
11615
  }[]>;
11449
11616
 
11450
- declare enum SoltypeType {
11451
- Address = "address",
11452
- Bool = "bool",
11453
- Bytes32 = "bytes32",
11454
- MappingAddressUint256 = "mapping (address => uint256)",
11455
- MappingUint256Uint256 = "mapping (uint256 => uint256)",
11456
- String = "string",
11457
- Tuple = "tuple",
11458
- TypeAddress = "address[]",
11459
- TypeTuple = "tuple[]",
11460
- Uint16 = "uint16",
11461
- Uint256 = "uint256",
11462
- Uint48 = "uint48",
11463
- Uint56 = "uint56",
11464
- Uint8 = "uint8"
11465
- }
11466
- declare enum StorageLocation {
11467
- Calldata = "calldata",
11468
- Default = "default",
11469
- Memory = "memory",
11470
- Storage = "storage"
11471
- }
11472
- declare enum SimpleTypeType {
11473
- Address = "address",
11474
- Bool = "bool",
11475
- Bytes = "bytes",
11476
- Slice = "slice",
11477
- String = "string",
11478
- Uint = "uint"
11479
- }
11480
- interface Type {
11481
- type: SimpleTypeType;
11482
- }
11483
- interface SoltypeElement {
11617
+ type ValueType = string | Record<string, string>;
11618
+ type Change = {
11484
11619
  name: string;
11485
- type: SoltypeType;
11486
- storage_location: StorageLocation;
11487
- components: SoltypeElement[] | null;
11488
- offset: number;
11489
- index: string;
11490
- indexed: boolean;
11491
- simple_type?: Type;
11492
- }
11493
- interface RawElement {
11494
- address: string;
11495
- key: string;
11496
- original: string;
11497
- dirty: string;
11498
- }
11499
- interface StateDiff {
11500
- soltype: SoltypeElement | null;
11501
- original: string | Record<string, any>;
11502
- dirty: string | Record<string, any>;
11503
- raw: RawElement[];
11504
- address: string;
11505
- }
11620
+ before: string | Record<string, ValueType>;
11621
+ after: string;
11622
+ type?: string;
11623
+ };
11624
+ /**
11625
+ * Transforms the tenderly state diff into a format that aligns more with foundry state diffs.
11626
+ */
11627
+ declare function transformTenderlyStateDiff(stateDiff: StateDiff[]): Record<`0x${string}`, Change[]>;
11506
11628
 
11507
11629
  declare const IReserveInterestRateStrategy_ABI: readonly [{
11508
11630
  readonly type: "function";
@@ -20263,4 +20385,4 @@ declare const IAuthorizedForwarder_ABI: readonly [{
20263
20385
  readonly type: "function";
20264
20386
  }];
20265
20387
 
20266
- export { getNonFinalizedProposals as $, wadDiv as A, fetchImmutablePoolAddresses as B, fetchMutablePoolAddresses as C, fetchPoolAddresses as D, getReserveTokens as E, getReserveConfigurations as F, PayloadState as G, HALF_WAD as H, HUMAN_READABLE_PAYLOAD_STATE as I, type PayloadsControllerContract as J, getPayloadsController as K, LTV_PRECISION as L, getPayloadStorageOverrides as M, makePayloadExecutableOnTestClient as N, isPayloadFinal as O, type Payload as P, getNonFinalizedPayloads as Q, type ReserveConfiguration as R, type StandardJsonInput as S, type Proposal as T, ProposalState as U, HUMAN_READABLE_PROPOSAL_STATE as V, WAD as W, type GovernanceContract as X, getGovernance as Y, makeProposalExecutableOnTestClient as Z, isProposalFinal as _, decodeReserveConfiguration as a, IDualAggregator_ABI as a$, Aip as a0, validateAip as a1, type ExplorerConfig as a2, getExplorer as a3, getSourceCode as a4, parseEtherscanStyleSourceCode as a5, type Tenderly_createVnetParamsResponse as a6, tenderly_deleteVnet as a7, tenderly_simVnet as a8, tenderly_getVnet as a9, priceUpdateDecoder as aA, alchemyNetworkMap as aB, quicknodeNetworkMap as aC, etherscanExplorers as aD, routescanExplorers as aE, chainlinkFeeds as aF, hyperRPCSupportedNetworks as aG, erc1967_ImplementationSlot as aH, erc1967_AdminSlot as aI, diffCode as aJ, type IndexerTopicState as aK, type GenericIndexerArgs as aL, genericIndexer as aM, parseLogs as aN, SelfdestuctCheckState as aO, checkForSelfdestruct as aP, renderTenderlyReport as aQ, toTxLink as aR, getVerificationStatus as aS, type SoltypeElement as aT, type StateDiff as aU, IReserveInterestRateStrategy_ABI as aV, IStataTokenFactory_ABI as aW, IAToken_ABI as aX, IWrappedTokenGatewayV3_ABI as aY, IPoolAddressesProvider_ABI as aZ, IStataTokenV2_ABI as a_, tenderly_createVnet as aa, type StateObject as ab, type ContractObject as ac, type TenderlySimRequest as ad, tenderly_sim as ae, EVENT_DB as af, ChainId as ag, ChainList as ah, type SupportedChainIds as ai, publicRPCs as aj, alchemySupportedChainIds as ak, getNetworkEnv as al, getExplicitRPC as am, getAlchemyRPC as an, getPublicRpc as ao, getHyperRPC as ap, getQuicknodeRpc as aq, getRPCUrl as ar, getClient as as, getImplementationSlot as at, getLogsRecursive as au, getContractDeploymentBlock as av, type BundleParams as aw, flashbotsOnFetchRequest as ax, flashbotsClientExtension as ay, onMevHandler as az, bitmapToIndexes as b, IAaveOracle_ABI as b0, ICollector_ABI as b1, IPool_ABI as b2, AggregatorInterface_ABI as b3, IAaveV3ConfigEngine_ABI as b4, IEmissionManager_ABI as b5, IRewardsController_ABI as b6, IERC20Metadata_ABI as b7, IPoolConfigurator_ABI as b8, IERC20_ABI as b9, IAuthorizedForwarder_ABI as ba, decodeReserveConfigurationV2 as c, decodeUserConfiguration as d, SECONDS_PER_YEAR as e, aaveAddressesProvider_IncentivesControllerSlot as f, getBits as g, calculateCompoundedInterest as h, calculateLinearInterest as i, getNormalizedIncome as j, getNormalizedDebt as k, getCurrentLiquidityBalance as l, getCurrentDebtBalance as m, calculateHealthFactorFromBalances as n, calculateAvailableBorrowsMarketReferenceCurrency as o, getMarketReferenceCurrencyAndUsdBalance as p, assetToBase as q, calculateHealthFactor as r, setBits as s, RAY as t, HALF_RAY as u, WAD_RAY_RATIO as v, rayMul as w, rayDiv as x, rayToWad as y, wadToRay as z };
20388
+ export { getNonFinalizedProposals as $, wadDiv as A, fetchImmutablePoolAddresses as B, fetchMutablePoolAddresses as C, fetchPoolAddresses as D, getReserveTokens as E, getReserveConfigurations as F, PayloadState as G, HALF_WAD as H, HUMAN_READABLE_PAYLOAD_STATE as I, type PayloadsControllerContract as J, getPayloadsController as K, LTV_PRECISION as L, getPayloadStorageOverrides as M, makePayloadExecutableOnTestClient as N, isPayloadFinal as O, type Payload as P, getNonFinalizedPayloads as Q, type ReserveConfiguration as R, type StandardJsonInput as S, type Proposal as T, ProposalState as U, HUMAN_READABLE_PROPOSAL_STATE as V, WAD as W, type GovernanceContract as X, getGovernance as Y, makeProposalExecutableOnTestClient as Z, isProposalFinal as _, decodeReserveConfiguration as a, toTxLink as a$, Aip as a0, validateAip as a1, type ExplorerConfig as a2, getExplorer as a3, getSourceCode as a4, parseEtherscanStyleSourceCode as a5, type Tenderly_createVnetParamsResponse as a6, tenderly_deleteVnet as a7, tenderly_simVnet as a8, tenderly_getVnet as a9, getQuicknodeRpc as aA, getRPCUrl as aB, getClient as aC, getImplementationSlot as aD, getLogsRecursive as aE, getContractDeploymentBlock as aF, type BundleParams as aG, flashbotsOnFetchRequest as aH, flashbotsClientExtension as aI, onMevHandler as aJ, priceUpdateDecoder as aK, alchemyNetworkMap as aL, quicknodeNetworkMap as aM, etherscanExplorers as aN, routescanExplorers as aO, chainlinkFeeds as aP, hyperRPCSupportedNetworks as aQ, erc1967_ImplementationSlot as aR, erc1967_AdminSlot as aS, diffCode as aT, type IndexerTopicState as aU, type GenericIndexerArgs as aV, genericIndexer as aW, parseLogs as aX, SelfdestuctCheckState as aY, checkForSelfdestruct as aZ, renderTenderlyReport as a_, tenderly_createVnet as aa, tenderly_sim as ab, type SoltypeElement as ac, type StateDiff as ad, type StateObject as ae, type ContractObject as af, type TenderlySimRequest as ag, type Input as ah, type Trace as ai, type TenderlyLogRaw as aj, type TenderlyLog as ak, type TenderlyStackTrace as al, type TransactionInfo as am, type TenderlySimulationResponseObject as an, type TenderlySimulationResponse as ao, EVENT_DB as ap, ChainId as aq, ChainList as ar, type SupportedChainIds as as, publicRPCs as at, alchemySupportedChainIds as au, getNetworkEnv as av, getExplicitRPC as aw, getAlchemyRPC as ax, getPublicRpc as ay, getHyperRPC as az, bitmapToIndexes as b, getVerificationStatus as b0, type Change as b1, transformTenderlyStateDiff as b2, IReserveInterestRateStrategy_ABI as b3, IStataTokenFactory_ABI as b4, IAToken_ABI as b5, IWrappedTokenGatewayV3_ABI as b6, IPoolAddressesProvider_ABI as b7, IStataTokenV2_ABI as b8, IDualAggregator_ABI as b9, IAaveOracle_ABI as ba, ICollector_ABI as bb, IPool_ABI as bc, AggregatorInterface_ABI as bd, IAaveV3ConfigEngine_ABI as be, IEmissionManager_ABI as bf, IRewardsController_ABI as bg, IERC20Metadata_ABI as bh, IPoolConfigurator_ABI as bi, IERC20_ABI as bj, IAuthorizedForwarder_ABI as bk, decodeReserveConfigurationV2 as c, decodeUserConfiguration as d, SECONDS_PER_YEAR as e, aaveAddressesProvider_IncentivesControllerSlot as f, getBits as g, calculateCompoundedInterest as h, calculateLinearInterest as i, getNormalizedIncome as j, getNormalizedDebt as k, getCurrentLiquidityBalance as l, getCurrentDebtBalance as m, calculateHealthFactorFromBalances as n, calculateAvailableBorrowsMarketReferenceCurrency as o, getMarketReferenceCurrencyAndUsdBalance as p, assetToBase as q, calculateHealthFactor as r, setBits as s, RAY as t, HALF_RAY as u, WAD_RAY_RATIO as v, rayMul as w, rayDiv as x, rayToWad as y, wadToRay as z };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { b3 as AggregatorInterface_ABI, a0 as Aip, aw as BundleParams, ag as ChainId, ah as ChainList, ac as ContractObject, af as EVENT_DB, a2 as ExplorerConfig, aL 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, aX as IAToken_ABI, b0 as IAaveOracle_ABI, b4 as IAaveV3ConfigEngine_ABI, ba as IAuthorizedForwarder_ABI, b1 as ICollector_ABI, a$ as IDualAggregator_ABI, b7 as IERC20Metadata_ABI, b9 as IERC20_ABI, b5 as IEmissionManager_ABI, aZ as IPoolAddressesProvider_ABI, b8 as IPoolConfigurator_ABI, b2 as IPool_ABI, aV as IReserveInterestRateStrategy_ABI, b6 as IRewardsController_ABI, aW as IStataTokenFactory_ABI, a_ as IStataTokenV2_ABI, aY as IWrappedTokenGatewayV3_ABI, aK as IndexerTopicState, 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, aO as SelfdestuctCheckState, aT as SoltypeElement, aU as StateDiff, ab as StateObject, ai as SupportedChainIds, ad as TenderlySimRequest, a6 as Tenderly_createVnetParamsResponse, W as WAD, v as WAD_RAY_RATIO, f as aaveAddressesProvider_IncentivesControllerSlot, aB as alchemyNetworkMap, ak as alchemySupportedChainIds, q as assetToBase, b as bitmapToIndexes, o as calculateAvailableBorrowsMarketReferenceCurrency, h as calculateCompoundedInterest, r as calculateHealthFactor, n as calculateHealthFactorFromBalances, i as calculateLinearInterest, aF as chainlinkFeeds, aP as checkForSelfdestruct, a as decodeReserveConfiguration, c as decodeReserveConfigurationV2, d as decodeUserConfiguration, aJ as diffCode, aI as erc1967_AdminSlot, aH as erc1967_ImplementationSlot, aD as etherscanExplorers, B as fetchImmutablePoolAddresses, C as fetchMutablePoolAddresses, D as fetchPoolAddresses, ay as flashbotsClientExtension, ax as flashbotsOnFetchRequest, aM as genericIndexer, an as getAlchemyRPC, g as getBits, as as getClient, av as getContractDeploymentBlock, m as getCurrentDebtBalance, l as getCurrentLiquidityBalance, am as getExplicitRPC, a3 as getExplorer, Y as getGovernance, ap as getHyperRPC, at as getImplementationSlot, au as getLogsRecursive, p as getMarketReferenceCurrencyAndUsdBalance, al as getNetworkEnv, Q as getNonFinalizedPayloads, $ as getNonFinalizedProposals, k as getNormalizedDebt, j as getNormalizedIncome, M as getPayloadStorageOverrides, K as getPayloadsController, ao as getPublicRpc, aq as getQuicknodeRpc, ar as getRPCUrl, F as getReserveConfigurations, E as getReserveTokens, a4 as getSourceCode, aS as getVerificationStatus, aG as hyperRPCSupportedNetworks, O as isPayloadFinal, _ as isProposalFinal, N as makePayloadExecutableOnTestClient, Z as makeProposalExecutableOnTestClient, az as onMevHandler, a5 as parseEtherscanStyleSourceCode, aN as parseLogs, aA as priceUpdateDecoder, aj as publicRPCs, aC as quicknodeNetworkMap, x as rayDiv, w as rayMul, y as rayToWad, aQ as renderTenderlyReport, aE as routescanExplorers, s as setBits, aa as tenderly_createVnet, a7 as tenderly_deleteVnet, a9 as tenderly_getVnet, ae as tenderly_sim, a8 as tenderly_simVnet, aR as toTxLink, a1 as validateAip, A as wadDiv, z as wadToRay } from './index-BkYlywfa.mjs';
1
+ 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';
2
2
  import 'viem';
3
3
  import '@bgd-labs/aave-address-book/abis';
4
4
  import 'arktype/internal/methods/object.ts';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { b3 as AggregatorInterface_ABI, a0 as Aip, aw as BundleParams, ag as ChainId, ah as ChainList, ac as ContractObject, af as EVENT_DB, a2 as ExplorerConfig, aL 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, aX as IAToken_ABI, b0 as IAaveOracle_ABI, b4 as IAaveV3ConfigEngine_ABI, ba as IAuthorizedForwarder_ABI, b1 as ICollector_ABI, a$ as IDualAggregator_ABI, b7 as IERC20Metadata_ABI, b9 as IERC20_ABI, b5 as IEmissionManager_ABI, aZ as IPoolAddressesProvider_ABI, b8 as IPoolConfigurator_ABI, b2 as IPool_ABI, aV as IReserveInterestRateStrategy_ABI, b6 as IRewardsController_ABI, aW as IStataTokenFactory_ABI, a_ as IStataTokenV2_ABI, aY as IWrappedTokenGatewayV3_ABI, aK as IndexerTopicState, 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, aO as SelfdestuctCheckState, aT as SoltypeElement, aU as StateDiff, ab as StateObject, ai as SupportedChainIds, ad as TenderlySimRequest, a6 as Tenderly_createVnetParamsResponse, W as WAD, v as WAD_RAY_RATIO, f as aaveAddressesProvider_IncentivesControllerSlot, aB as alchemyNetworkMap, ak as alchemySupportedChainIds, q as assetToBase, b as bitmapToIndexes, o as calculateAvailableBorrowsMarketReferenceCurrency, h as calculateCompoundedInterest, r as calculateHealthFactor, n as calculateHealthFactorFromBalances, i as calculateLinearInterest, aF as chainlinkFeeds, aP as checkForSelfdestruct, a as decodeReserveConfiguration, c as decodeReserveConfigurationV2, d as decodeUserConfiguration, aJ as diffCode, aI as erc1967_AdminSlot, aH as erc1967_ImplementationSlot, aD as etherscanExplorers, B as fetchImmutablePoolAddresses, C as fetchMutablePoolAddresses, D as fetchPoolAddresses, ay as flashbotsClientExtension, ax as flashbotsOnFetchRequest, aM as genericIndexer, an as getAlchemyRPC, g as getBits, as as getClient, av as getContractDeploymentBlock, m as getCurrentDebtBalance, l as getCurrentLiquidityBalance, am as getExplicitRPC, a3 as getExplorer, Y as getGovernance, ap as getHyperRPC, at as getImplementationSlot, au as getLogsRecursive, p as getMarketReferenceCurrencyAndUsdBalance, al as getNetworkEnv, Q as getNonFinalizedPayloads, $ as getNonFinalizedProposals, k as getNormalizedDebt, j as getNormalizedIncome, M as getPayloadStorageOverrides, K as getPayloadsController, ao as getPublicRpc, aq as getQuicknodeRpc, ar as getRPCUrl, F as getReserveConfigurations, E as getReserveTokens, a4 as getSourceCode, aS as getVerificationStatus, aG as hyperRPCSupportedNetworks, O as isPayloadFinal, _ as isProposalFinal, N as makePayloadExecutableOnTestClient, Z as makeProposalExecutableOnTestClient, az as onMevHandler, a5 as parseEtherscanStyleSourceCode, aN as parseLogs, aA as priceUpdateDecoder, aj as publicRPCs, aC as quicknodeNetworkMap, x as rayDiv, w as rayMul, y as rayToWad, aQ as renderTenderlyReport, aE as routescanExplorers, s as setBits, aa as tenderly_createVnet, a7 as tenderly_deleteVnet, a9 as tenderly_getVnet, ae as tenderly_sim, a8 as tenderly_simVnet, aR as toTxLink, a1 as validateAip, A as wadDiv, z as wadToRay } from './index-BkYlywfa.js';
1
+ 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';
2
2
  import 'viem';
3
3
  import '@bgd-labs/aave-address-book/abis';
4
4
  import 'arktype/internal/methods/object.ts';
package/dist/index.js CHANGED
@@ -139,6 +139,7 @@ __export(index_exports, {
139
139
  tenderly_sim: () => tenderly_sim,
140
140
  tenderly_simVnet: () => tenderly_simVnet,
141
141
  toTxLink: () => toTxLink,
142
+ transformTenderlyStateDiff: () => transformTenderlyStateDiff,
142
143
  validateAip: () => validateAip,
143
144
  wadDiv: () => wadDiv,
144
145
  wadToRay: () => wadToRay
@@ -14146,7 +14147,8 @@ var ChainId = {
14146
14147
  zksync: import_chains.zksync.id,
14147
14148
  linea: import_chains.linea.id,
14148
14149
  ink: import_chains.ink.id,
14149
- soneium: import_chains.soneium.id
14150
+ soneium: import_chains.soneium.id,
14151
+ bob: import_chains.bob.id
14150
14152
  };
14151
14153
  var ChainList = {
14152
14154
  [ChainId.mainnet]: import_chains.mainnet,
@@ -14186,7 +14188,8 @@ var ChainList = {
14186
14188
  [ChainId.zksync]: import_chains.zksync,
14187
14189
  [ChainId.linea]: import_chains.linea,
14188
14190
  [ChainId.ink]: import_chains.ink,
14189
- [ChainId.soneium]: import_chains.soneium
14191
+ [ChainId.soneium]: import_chains.soneium,
14192
+ [ChainId.bob]: import_chains.bob
14190
14193
  };
14191
14194
 
14192
14195
  // src/ecosystem/rpcs.ts
@@ -14386,7 +14389,8 @@ var publicRPCs = {
14386
14389
  [ChainId.zksync]: "https://mainnet.era.zksync.io",
14387
14390
  [ChainId.fantom]: "https://rpc.ftm.tools",
14388
14391
  [ChainId.avalanche]: "https://api.avax.network/ext/bc/C/rpc",
14389
- [ChainId.linea]: "https://rpc.linea.build"
14392
+ [ChainId.linea]: "https://rpc.linea.build",
14393
+ [ChainId.bob]: "https://rpc.gobob.xyz"
14390
14394
  };
14391
14395
  var alchemySupportedChainIds = Object.values(ChainId).filter(
14392
14396
  (id) => alchemyNetworkMap[id]
@@ -20673,7 +20677,7 @@ var chainlinkFeeds = {
20673
20677
  "contractAddress": "0x0000000000000000000000000000000000000000",
20674
20678
  "proxyAddress": null,
20675
20679
  "decimals": 18,
20676
- "name": "UNIBTC/BTC-ExRate-mainnet-production"
20680
+ "name": "UNIBTC/BTC-ExRate-Deprecated-mainnet-production"
20677
20681
  },
20678
20682
  {
20679
20683
  "contractAddress": "0x0000000000000000000000000000000000000000",
@@ -21902,9 +21906,21 @@ var chainlinkFeeds = {
21902
21906
  {
21903
21907
  "contractAddress": "0x0000000000000000000000000000000000000000",
21904
21908
  "proxyAddress": null,
21905
- "decimals": 18,
21909
+ "decimals": 0,
21906
21910
  "name": "SYRUPUSDC/USDC-ExRate-mainnet-production"
21907
21911
  },
21912
+ {
21913
+ "contractAddress": "0x0000000000000000000000000000000000000000",
21914
+ "proxyAddress": null,
21915
+ "decimals": 18,
21916
+ "name": "SyrupUSDC/USDC-ExRate-Deprecated-mainnet-production"
21917
+ },
21918
+ {
21919
+ "contractAddress": "0x0000000000000000000000000000000000000000",
21920
+ "proxyAddress": null,
21921
+ "decimals": 0,
21922
+ "name": "UNIBTC/BTC-ExRate-mainnet-production"
21923
+ },
21908
21924
  {
21909
21925
  "contractAddress": "0x01DD3Cf6118069DB13A2d64d7e1A09FECd587EDD",
21910
21926
  "proxyAddress": "0x8d0CC5f38f9E802475f2CFf4F9fc7000C2E1557c",
@@ -24032,7 +24048,7 @@ var chainlinkFeeds = {
24032
24048
  {
24033
24049
  "contractAddress": "0x534a7FF707Bc862cAB0Dda546F1B817Be5235b66",
24034
24050
  "proxyAddress": null,
24035
- "decimals": 18,
24051
+ "decimals": 0,
24036
24052
  "name": "wstETH/USD-RefPrice-DS-Premium-Global-003"
24037
24053
  },
24038
24054
  {
@@ -26542,6 +26558,76 @@ function renderUnixTime(time) {
26542
26558
  function toTxLink(txn, client) {
26543
26559
  return `${client.chain?.blockExplorers?.default.url}/tx/${txn}`;
26544
26560
  }
26561
+
26562
+ // src/seatbelt/state.ts
26563
+ var import_viem10 = require("viem");
26564
+ function transformTenderlyStateDiff(stateDiff) {
26565
+ const formattedDiffs = stateDiff.reduce(
26566
+ (diffs, diff) => {
26567
+ if (!diff.raw?.[0]) return diffs;
26568
+ const addr = (0, import_viem10.getAddress)(diff.raw[0].address);
26569
+ if (!diffs[addr]) diffs[addr] = [diff];
26570
+ else diffs[addr].push(diff);
26571
+ return diffs;
26572
+ },
26573
+ {}
26574
+ );
26575
+ const allChanges = {};
26576
+ for (const [address, diffs] of Object.entries(formattedDiffs)) {
26577
+ const changes = [];
26578
+ for (const diff of diffs) {
26579
+ if (!diff.soltype) {
26580
+ for (const w of diff.raw) {
26581
+ const oldVal = JSON.stringify(w.original);
26582
+ const newVal = JSON.stringify(w.dirty);
26583
+ changes.push({
26584
+ before: oldVal,
26585
+ after: newVal,
26586
+ name: `Slot \`${w.key}\``
26587
+ });
26588
+ }
26589
+ } else if (diff.soltype.simple_type) {
26590
+ changes.push({
26591
+ before: diff.original,
26592
+ after: diff.dirty,
26593
+ name: diff.soltype.name,
26594
+ type: diff.soltype?.name
26595
+ });
26596
+ } else if (diff.soltype.type.startsWith("mapping")) {
26597
+ const keys = Array.from(
26598
+ /* @__PURE__ */ new Set([
26599
+ ...Object.keys(diff.original || {}),
26600
+ ...Object.keys(diff.dirty || {})
26601
+ ])
26602
+ );
26603
+ const original = diff.original || {};
26604
+ const dirty = diff.dirty || {};
26605
+ for (const k of keys) {
26606
+ if (original[k] || dirty[k])
26607
+ changes.push({
26608
+ before: original[k],
26609
+ after: dirty[k],
26610
+ name: k,
26611
+ type: diff.soltype?.name
26612
+ });
26613
+ }
26614
+ } else {
26615
+ for (const w of diff.raw) {
26616
+ const oldVal = JSON.stringify(w.original);
26617
+ const newVal = JSON.stringify(w.dirty);
26618
+ changes.push({
26619
+ before: oldVal,
26620
+ after: newVal,
26621
+ name: w.key,
26622
+ type: "slot"
26623
+ });
26624
+ }
26625
+ }
26626
+ }
26627
+ allChanges[address] = changes;
26628
+ }
26629
+ return allChanges;
26630
+ }
26545
26631
  // Annotate the CommonJS export names for ESM import in node:
26546
26632
  0 && (module.exports = {
26547
26633
  AggregatorInterface_ABI,
@@ -26653,6 +26739,7 @@ function toTxLink(txn, client) {
26653
26739
  tenderly_sim,
26654
26740
  tenderly_simVnet,
26655
26741
  toTxLink,
26742
+ transformTenderlyStateDiff,
26656
26743
  validateAip,
26657
26744
  wadDiv,
26658
26745
  wadToRay