@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.
@@ -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 [];
@@ -11414,7 +11569,7 @@ declare function checkForSelfdestruct(client: Client, addresses: Address[], trus
11414
11569
 
11415
11570
  type RenderTenderlyReportParams = {
11416
11571
  client: Client;
11417
- sim: any;
11572
+ sim: TenderlySimulationResponse;
11418
11573
  payloadId: number;
11419
11574
  payload: Payload;
11420
11575
  onchainLogs: {
@@ -11459,62 +11614,17 @@ declare function getVerificationStatus({ client, addresses, contractDb, apiKey,
11459
11614
  new?: boolean;
11460
11615
  }[]>;
11461
11616
 
11462
- declare enum SoltypeType {
11463
- Address = "address",
11464
- Bool = "bool",
11465
- Bytes32 = "bytes32",
11466
- MappingAddressUint256 = "mapping (address => uint256)",
11467
- MappingUint256Uint256 = "mapping (uint256 => uint256)",
11468
- String = "string",
11469
- Tuple = "tuple",
11470
- TypeAddress = "address[]",
11471
- TypeTuple = "tuple[]",
11472
- Uint16 = "uint16",
11473
- Uint256 = "uint256",
11474
- Uint48 = "uint48",
11475
- Uint56 = "uint56",
11476
- Uint8 = "uint8"
11477
- }
11478
- declare enum StorageLocation {
11479
- Calldata = "calldata",
11480
- Default = "default",
11481
- Memory = "memory",
11482
- Storage = "storage"
11483
- }
11484
- declare enum SimpleTypeType {
11485
- Address = "address",
11486
- Bool = "bool",
11487
- Bytes = "bytes",
11488
- Slice = "slice",
11489
- String = "string",
11490
- Uint = "uint"
11491
- }
11492
- interface Type {
11493
- type: SimpleTypeType;
11494
- }
11495
- interface SoltypeElement {
11617
+ type ValueType = string | Record<string, string>;
11618
+ type Change = {
11496
11619
  name: string;
11497
- type: SoltypeType;
11498
- storage_location: StorageLocation;
11499
- components: SoltypeElement[] | null;
11500
- offset: number;
11501
- index: string;
11502
- indexed: boolean;
11503
- simple_type?: Type;
11504
- }
11505
- interface RawElement {
11506
- address: string;
11507
- key: string;
11508
- original: string;
11509
- dirty: string;
11510
- }
11511
- interface StateDiff {
11512
- soltype: SoltypeElement | null;
11513
- original: string | Record<string, any>;
11514
- dirty: string | Record<string, any>;
11515
- raw: RawElement[];
11516
- address: string;
11517
- }
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[]>;
11518
11628
 
11519
11629
  declare const IReserveInterestRateStrategy_ABI: readonly [{
11520
11630
  readonly type: "function";
@@ -20275,4 +20385,4 @@ declare const IAuthorizedForwarder_ABI: readonly [{
20275
20385
  readonly type: "function";
20276
20386
  }];
20277
20387
 
20278
- 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 };
@@ -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 [];
@@ -11414,7 +11569,7 @@ declare function checkForSelfdestruct(client: Client, addresses: Address[], trus
11414
11569
 
11415
11570
  type RenderTenderlyReportParams = {
11416
11571
  client: Client;
11417
- sim: any;
11572
+ sim: TenderlySimulationResponse;
11418
11573
  payloadId: number;
11419
11574
  payload: Payload;
11420
11575
  onchainLogs: {
@@ -11459,62 +11614,17 @@ declare function getVerificationStatus({ client, addresses, contractDb, apiKey,
11459
11614
  new?: boolean;
11460
11615
  }[]>;
11461
11616
 
11462
- declare enum SoltypeType {
11463
- Address = "address",
11464
- Bool = "bool",
11465
- Bytes32 = "bytes32",
11466
- MappingAddressUint256 = "mapping (address => uint256)",
11467
- MappingUint256Uint256 = "mapping (uint256 => uint256)",
11468
- String = "string",
11469
- Tuple = "tuple",
11470
- TypeAddress = "address[]",
11471
- TypeTuple = "tuple[]",
11472
- Uint16 = "uint16",
11473
- Uint256 = "uint256",
11474
- Uint48 = "uint48",
11475
- Uint56 = "uint56",
11476
- Uint8 = "uint8"
11477
- }
11478
- declare enum StorageLocation {
11479
- Calldata = "calldata",
11480
- Default = "default",
11481
- Memory = "memory",
11482
- Storage = "storage"
11483
- }
11484
- declare enum SimpleTypeType {
11485
- Address = "address",
11486
- Bool = "bool",
11487
- Bytes = "bytes",
11488
- Slice = "slice",
11489
- String = "string",
11490
- Uint = "uint"
11491
- }
11492
- interface Type {
11493
- type: SimpleTypeType;
11494
- }
11495
- interface SoltypeElement {
11617
+ type ValueType = string | Record<string, string>;
11618
+ type Change = {
11496
11619
  name: string;
11497
- type: SoltypeType;
11498
- storage_location: StorageLocation;
11499
- components: SoltypeElement[] | null;
11500
- offset: number;
11501
- index: string;
11502
- indexed: boolean;
11503
- simple_type?: Type;
11504
- }
11505
- interface RawElement {
11506
- address: string;
11507
- key: string;
11508
- original: string;
11509
- dirty: string;
11510
- }
11511
- interface StateDiff {
11512
- soltype: SoltypeElement | null;
11513
- original: string | Record<string, any>;
11514
- dirty: string | Record<string, any>;
11515
- raw: RawElement[];
11516
- address: string;
11517
- }
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[]>;
11518
11628
 
11519
11629
  declare const IReserveInterestRateStrategy_ABI: readonly [{
11520
11630
  readonly type: "function";
@@ -20275,4 +20385,4 @@ declare const IAuthorizedForwarder_ABI: readonly [{
20275
20385
  readonly type: "function";
20276
20386
  }];
20277
20387
 
20278
- 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 };