@bgd-labs/toolbox 0.0.13 → 0.0.14

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/node.js CHANGED
@@ -48,6 +48,7 @@ __export(node_exports, {
48
48
  IERC20_ABI: () => IERC20_ABI,
49
49
  IEmissionManager_ABI: () => IEmissionManager_ABI,
50
50
  IPoolAddressesProvider_ABI: () => IPoolAddressesProvider_ABI,
51
+ IPoolConfigurator_ABI: () => IPoolConfigurator_ABI,
51
52
  IPool_ABI: () => IPool_ABI,
52
53
  IReserveInterestRateStrategy_ABI: () => IReserveInterestRateStrategy_ABI,
53
54
  IRewardsController_ABI: () => IRewardsController_ABI,
@@ -65,9 +66,11 @@ __export(node_exports, {
65
66
  aaveAddressesProvider_IncentivesControllerSlot: () => aaveAddressesProvider_IncentivesControllerSlot,
66
67
  alchemyNetworkMap: () => alchemyNetworkMap,
67
68
  alchemySupportedChainIds: () => alchemySupportedChainIds,
69
+ assetToBase: () => assetToBase,
68
70
  bitmapToIndexes: () => bitmapToIndexes,
69
71
  calculateAvailableBorrowsMarketReferenceCurrency: () => calculateAvailableBorrowsMarketReferenceCurrency,
70
72
  calculateCompoundedInterest: () => calculateCompoundedInterest,
73
+ calculateHealthFactor: () => calculateHealthFactor,
71
74
  calculateHealthFactorFromBalances: () => calculateHealthFactorFromBalances,
72
75
  calculateLinearInterest: () => calculateLinearInterest,
73
76
  chainlinkFeeds: () => chainlinkFeeds,
@@ -85,9 +88,11 @@ __export(node_exports, {
85
88
  flashbotsOnFetchRequest: () => flashbotsOnFetchRequest,
86
89
  foundry_getStandardJsonInput: () => foundry_getStandardJsonInput,
87
90
  foundry_getStorageLayout: () => foundry_getStorageLayout,
91
+ genericIndexer: () => genericIndexer,
88
92
  getAlchemyRPC: () => getAlchemyRPC,
89
93
  getBits: () => getBits,
90
94
  getClient: () => getClient,
95
+ getContractDeploymentBlock: () => getContractDeploymentBlock,
91
96
  getCurrentDebtBalance: () => getCurrentDebtBalance,
92
97
  getCurrentLiquidityBalance: () => getCurrentLiquidityBalance,
93
98
  getExplicitRPC: () => getExplicitRPC,
@@ -114,6 +119,7 @@ __export(node_exports, {
114
119
  onMevHandler: () => onMevHandler,
115
120
  parseEtherscanStyleSourceCode: () => parseEtherscanStyleSourceCode,
116
121
  parseLogs: () => parseLogs,
122
+ priceUpdateDecoder: () => priceUpdateDecoder,
117
123
  publicRPCs: () => publicRPCs,
118
124
  quicknodeNetworkMap: () => quicknodeNetworkMap,
119
125
  rayDiv: () => rayDiv,
@@ -180,10 +186,10 @@ function decodeUserConfiguration(userConfiguration) {
180
186
 
181
187
  // src/aave/reserve.ts
182
188
  function decodeReserveConfiguration(data) {
183
- const ltv = getBits(data, 0n, 15n);
184
- const liquidationThreshold = getBits(data, 16n, 31n);
185
- const liquidationBonus = getBits(data, 32n, 47n);
186
- const decimals = getBits(data, 48n, 55n);
189
+ const ltv = Number(getBits(data, 0n, 15n));
190
+ const liquidationThreshold = Number(getBits(data, 16n, 31n));
191
+ const liquidationBonus = Number(getBits(data, 32n, 47n));
192
+ const decimals = Number(getBits(data, 48n, 55n));
187
193
  const active = getBits(data, 56n, 56n);
188
194
  const frozen = getBits(data, 57n, 57n);
189
195
  const borrowingEnabled = getBits(data, 58n, 58n);
@@ -194,7 +200,7 @@ function decodeReserveConfiguration(data) {
194
200
  const reserveFactor = getBits(data, 64n, 79n);
195
201
  const borrowCap = getBits(data, 80n, 115n);
196
202
  const supplyCap = getBits(data, 116n, 151n);
197
- const liquidationProtocolFee = getBits(data, 152n, 167n);
203
+ const liquidationProtocolFee = Number(getBits(data, 152n, 167n));
198
204
  const unbackedMintCap = getBits(data, 176n, 211n);
199
205
  const debtCeiling = getBits(data, 212n, 251n);
200
206
  const virtualAccountingEnabled = getBits(data, 252n, 252n);
@@ -410,6 +416,72 @@ function getMarketReferenceCurrencyAndUsdBalance({
410
416
  const usdBalance = marketReferenceCurrencyBalance * marketReferencePriceInUsdNormalized / BigInt(10 ** marketReferenceCurrencyDecimals);
411
417
  return { marketReferenceCurrencyBalance, usdBalance };
412
418
  }
419
+ function assetToBase(amount, price, assetDecimals) {
420
+ return amount * BigInt(price) / BigInt(10 ** assetDecimals);
421
+ }
422
+ function calculateHealthFactor(user, positions, reserves, prices, emodes, currentTimestamp) {
423
+ const eModeCollaterals = user.emode == 0 ? [] : bitmapToIndexes(BigInt(emodes[user.emode].collateralBitmap));
424
+ const eModelt = user.emode == 0 ? 0 : emodes[user.emode].liquidationThreshold;
425
+ let totalCollateralInBaseCurrency = 0n;
426
+ let totalDebtInBaseCurrency = 0n;
427
+ let weightedLiquidationThreshold = 0n;
428
+ for (const position of positions) {
429
+ const reserveConfig = reserves[position.underlying];
430
+ if (position.scaledATokenBalance !== "0") {
431
+ const collateral = getCurrentLiquidityBalance({
432
+ scaledBalance: BigInt(position.scaledATokenBalance),
433
+ index: BigInt(reserveConfig.liquidityIndex),
434
+ rate: BigInt(reserveConfig.liquidityRate),
435
+ lastUpdateTimestamp: reserveConfig.lastUpdateTimestamp,
436
+ currentTimestamp
437
+ });
438
+ const collateralInBase = assetToBase(
439
+ collateral,
440
+ prices[position.underlying],
441
+ reserveConfig.decimals
442
+ );
443
+ totalCollateralInBaseCurrency += collateralInBase;
444
+ let lt = reserveConfig.liquidationThreshold;
445
+ if (user.emode !== 0 && eModeCollaterals.includes(reserveConfig.id)) {
446
+ lt = eModelt;
447
+ }
448
+ weightedLiquidationThreshold += collateralInBase * BigInt(lt);
449
+ }
450
+ if (position.scaledVariableDebtTokenBalance !== "0") {
451
+ const debt = getCurrentDebtBalance({
452
+ scaledBalance: BigInt(position.scaledVariableDebtTokenBalance),
453
+ index: BigInt(reserveConfig.variableBorrowIndex),
454
+ rate: BigInt(reserveConfig.variableBorrowRate),
455
+ lastUpdateTimestamp: reserveConfig.lastUpdateTimestamp,
456
+ currentTimestamp
457
+ });
458
+ const debtInBase = assetToBase(
459
+ debt,
460
+ prices[position.underlying],
461
+ reserveConfig.decimals
462
+ );
463
+ totalDebtInBaseCurrency += debtInBase;
464
+ }
465
+ }
466
+ if (totalDebtInBaseCurrency === 0n) {
467
+ return {
468
+ healthFactor: -1,
469
+ totalDebtInBaseCurrency,
470
+ totalCollateralInBaseCurrency
471
+ };
472
+ }
473
+ const avgLiquidationThreshold = totalCollateralInBaseCurrency > 0n ? weightedLiquidationThreshold / totalCollateralInBaseCurrency : 0n;
474
+ const healthFactor = calculateHealthFactorFromBalances({
475
+ collateralBalanceMarketReferenceCurrency: totalCollateralInBaseCurrency,
476
+ borrowBalanceMarketReferenceCurrency: totalDebtInBaseCurrency,
477
+ averageLiquidationThreshold: avgLiquidationThreshold
478
+ });
479
+ return {
480
+ healthFactor: Number(healthFactor) / 1e18,
481
+ totalDebtInBaseCurrency,
482
+ totalCollateralInBaseCurrency
483
+ };
484
+ }
413
485
 
414
486
  // src/aave/pool/addresses.ts
415
487
  var import_viem = require("viem");
@@ -3472,6 +3544,7 @@ function isPayloadFinal(state) {
3472
3544
  async function getNonFinalizedPayloads(client, payloadsController) {
3473
3545
  const controllerContract = getPayloadsController(client, payloadsController);
3474
3546
  const payloadsCount = await controllerContract.read.getPayloadsCount();
3547
+ if (payloadsCount <= 1) return [];
3475
3548
  const nonFinalPayloads = [];
3476
3549
  for (let payloadId = payloadsCount - 1; payloadId != 0; payloadId--) {
3477
3550
  const maxRange = (35 + 10 + 7) * 24 * 60 * 60;
@@ -5156,7 +5229,6 @@ async function getLogsRecursive({
5156
5229
  fromBlock,
5157
5230
  toBlock
5158
5231
  }) {
5159
- console.log(fromBlock, toBlock);
5160
5232
  if (fromBlock <= toBlock) {
5161
5233
  try {
5162
5234
  const logs = await (0, import_actions3.getLogs)(client, {
@@ -5167,10 +5239,13 @@ async function getLogsRecursive({
5167
5239
  });
5168
5240
  return logs;
5169
5241
  } catch (error) {
5170
- console.log(error);
5171
5242
  const rangeMatch = error.details?.match(/.*\[(.*),\s*(.*)\]/);
5172
5243
  if (rangeMatch?.length === 3) {
5244
+ console.log(error.details);
5173
5245
  const maxBlock = (0, import_viem7.fromHex)(rangeMatch[2], "bigint");
5246
+ console.log(
5247
+ `Alchemy range error, retrying via ${fromBlock}:${maxBlock}`
5248
+ );
5174
5249
  const arr1 = await getLogsRecursive({
5175
5250
  client,
5176
5251
  events,
@@ -5179,6 +5254,7 @@ async function getLogsRecursive({
5179
5254
  toBlock: maxBlock
5180
5255
  });
5181
5256
  const midBlock = BigInt(maxBlock + toBlock) >> BigInt(1);
5257
+ console.log(`Via ${maxBlock + BigInt(1)}:${midBlock}`);
5182
5258
  const arr2 = await getLogsRecursive({
5183
5259
  client,
5184
5260
  events,
@@ -5186,6 +5262,7 @@ async function getLogsRecursive({
5186
5262
  fromBlock: maxBlock + BigInt(1),
5187
5263
  toBlock: midBlock
5188
5264
  });
5265
+ console.log(`And via ${midBlock + BigInt(1)}:${toBlock}`);
5189
5266
  const arr3 = await getLogsRecursive({
5190
5267
  client,
5191
5268
  events,
@@ -5193,7 +5270,7 @@ async function getLogsRecursive({
5193
5270
  fromBlock: midBlock + BigInt(1),
5194
5271
  toBlock
5195
5272
  });
5196
- return [...arr1, ...arr2, ...arr3];
5273
+ return arr1.concat(arr2).concat(arr3);
5197
5274
  } else {
5198
5275
  const midBlock = BigInt(fromBlock + toBlock) >> BigInt(1);
5199
5276
  const arr1 = await getLogsRecursive({
@@ -5210,12 +5287,49 @@ async function getLogsRecursive({
5210
5287
  fromBlock: midBlock + BigInt(1),
5211
5288
  toBlock
5212
5289
  });
5213
- return [...arr1, ...arr2];
5290
+ return arr1.concat(arr2);
5214
5291
  }
5215
5292
  }
5216
5293
  }
5217
5294
  return [];
5218
5295
  }
5296
+ async function getContractDeploymentBlock({
5297
+ client,
5298
+ contractAddress,
5299
+ fromBlock,
5300
+ toBlock,
5301
+ maxDelta
5302
+ }) {
5303
+ if (fromBlock == toBlock) return fromBlock;
5304
+ if (fromBlock < toBlock) {
5305
+ const midBlock = BigInt(fromBlock + toBlock) >> BigInt(1);
5306
+ const codeMid = await (0, import_actions3.getBytecode)(client, {
5307
+ blockNumber: midBlock,
5308
+ address: contractAddress
5309
+ });
5310
+ if (!codeMid) {
5311
+ if (toBlock - midBlock > maxDelta) {
5312
+ return getContractDeploymentBlock({
5313
+ client,
5314
+ contractAddress,
5315
+ fromBlock: midBlock,
5316
+ toBlock,
5317
+ maxDelta
5318
+ });
5319
+ } else {
5320
+ return midBlock;
5321
+ }
5322
+ }
5323
+ return getContractDeploymentBlock({
5324
+ client,
5325
+ contractAddress,
5326
+ fromBlock,
5327
+ toBlock: midBlock,
5328
+ maxDelta
5329
+ });
5330
+ }
5331
+ throw new Error("Could not find contract deployment block");
5332
+ }
5219
5333
 
5220
5334
  // src/ecosystem/flashbots.ts
5221
5335
  var import_eventsource = require("eventsource");
@@ -5295,6 +5409,71 @@ function onMevHandler(callback, streamUrl = "https://mev-share.flashbots.net") {
5295
5409
  };
5296
5410
  return events;
5297
5411
  }
5412
+ var transmit_signature = "0xb1dc65a4";
5413
+ var forward_signature = "0x6fadcf72";
5414
+ function priceUpdateDecoder(receiver, calldata) {
5415
+ if (calldata.startsWith(forward_signature)) {
5416
+ const forwardParams = (0, import_viem8.decodeFunctionData)({
5417
+ abi: [
5418
+ {
5419
+ inputs: [
5420
+ { internalType: "address", name: "to", type: "address" },
5421
+ { internalType: "bytes", name: "data", type: "bytes" }
5422
+ ],
5423
+ name: "forward",
5424
+ outputs: [],
5425
+ stateMutability: "nonpayable",
5426
+ type: "function"
5427
+ }
5428
+ ],
5429
+ data: calldata
5430
+ });
5431
+ receiver = forwardParams.args[0];
5432
+ calldata = forwardParams.args[1];
5433
+ }
5434
+ if (calldata.startsWith(transmit_signature)) {
5435
+ try {
5436
+ const transmitParams = (0, import_viem8.decodeFunctionData)({
5437
+ abi: [
5438
+ {
5439
+ inputs: [
5440
+ {
5441
+ internalType: "bytes32[3]",
5442
+ name: "reportContext",
5443
+ type: "bytes32[3]"
5444
+ },
5445
+ { internalType: "bytes", name: "report", type: "bytes" },
5446
+ { internalType: "bytes32[]", name: "rs", type: "bytes32[]" },
5447
+ { internalType: "bytes32[]", name: "ss", type: "bytes32[]" },
5448
+ { internalType: "bytes32", name: "rawVs", type: "bytes32" }
5449
+ ],
5450
+ name: "transmit",
5451
+ outputs: [],
5452
+ stateMutability: "nonpayable",
5453
+ type: "function"
5454
+ }
5455
+ ],
5456
+ data: calldata
5457
+ });
5458
+ const report = (0, import_viem8.decodeAbiParameters)(
5459
+ [
5460
+ { name: "observationsTimestamp", type: "uint32" },
5461
+ { name: "rawObservers", type: "bytes32" },
5462
+ { name: "observations", type: "int192[]" },
5463
+ { name: "juelsPerFeeCoin", type: "int192" }
5464
+ ],
5465
+ transmitParams.args[1]
5466
+ );
5467
+ if (report[2].length)
5468
+ return {
5469
+ receiver,
5470
+ answer: report[2][Math.floor(report[2].length / 2)]
5471
+ };
5472
+ } catch (e) {
5473
+ console.log("could not decode event (which probably is fine)");
5474
+ }
5475
+ }
5476
+ }
5298
5477
 
5299
5478
  // src/ecosystem/generated/chainlinkFeeds.ts
5300
5479
  var chainlinkFeeds = {
@@ -5813,7 +5992,8 @@ var chainlinkFeeds = {
5813
5992
  "contractAddress": "0x64c67984A458513C6BAb23a815916B1b1075cf3a",
5814
5993
  "proxyAddress": "0x76F8C9E423C228E83DCB11d17F0Bd8aEB0Ca01bb",
5815
5994
  "decimals": 8,
5816
- "name": "LINK / USD"
5995
+ "name": "LINK / USD",
5996
+ "secondaryProxyAddress": "0xC7e9b623ed51F033b32AE7f1282b1AD62C28C183"
5817
5997
  },
5818
5998
  {
5819
5999
  "contractAddress": "0x658Aa21601C8c0bB511C21999F7cad35B6A15192",
@@ -5903,7 +6083,8 @@ var chainlinkFeeds = {
5903
6083
  "contractAddress": "0x7c7FdFCa295a787ded12Bb5c1A49A8D2cC20E3F8",
5904
6084
  "proxyAddress": "0x5147eA642CAEF7BD9c1265AadcA78f997AbB9649",
5905
6085
  "decimals": 8,
5906
- "name": "ETH / USD"
6086
+ "name": "ETH / USD",
6087
+ "secondaryProxyAddress": "0x5424384B256154046E9667dDFaaa5e550145215e"
5907
6088
  },
5908
6089
  {
5909
6090
  "contractAddress": "0x7d4E742018fb52E48b08BE73d041C18B21de6Fb5",
@@ -6149,7 +6330,8 @@ var chainlinkFeeds = {
6149
6330
  "contractAddress": "0x9df238BE059572d7211F1a1a5fEe609F979AAD2d",
6150
6331
  "proxyAddress": "0x7bB7bF4ca536DbC49545704BFAcaa13633D18718",
6151
6332
  "decimals": 8,
6152
- "name": "USDT / USD"
6333
+ "name": "USDT / USD",
6334
+ "secondaryProxyAddress": "0x62c2ab773B7324ad9e030D777989B3b5d5c54c0A"
6153
6335
  },
6154
6336
  {
6155
6337
  "contractAddress": "0x9e6e40dC0A35D6eD96BB09D928261EB598523645",
@@ -6557,7 +6739,8 @@ var chainlinkFeeds = {
6557
6739
  "contractAddress": "0xcd07B31D85756098334eDdC92DE755dEae8FE62f",
6558
6740
  "proxyAddress": "0xbd7F896e60B650C01caf2d7279a1148189A68884",
6559
6741
  "decimals": 8,
6560
- "name": "AAVE / USD"
6742
+ "name": "AAVE / USD",
6743
+ "secondaryProxyAddress": "0xF02C1e2A3B77c1cacC72f72B44f7d0a4c62e4a85"
6561
6744
  },
6562
6745
  {
6563
6746
  "contractAddress": "0xced238b8B9D39f2B1CD42adbEeFBB85cd46C14F2",
@@ -6611,7 +6794,8 @@ var chainlinkFeeds = {
6611
6794
  "contractAddress": "0xdc715c751f1cc129A6b47fEDC87D9918a4580502",
6612
6795
  "proxyAddress": "0x85355da30ee4b35F4B30759Bd49a1EBE3fc41Bdb",
6613
6796
  "decimals": 8,
6614
- "name": "BTC / USD"
6797
+ "name": "BTC / USD",
6798
+ "secondaryProxyAddress": "0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A"
6615
6799
  },
6616
6800
  {
6617
6801
  "contractAddress": "0xe07f52971153dB2713ACe5ebAAf2eA8b0A9230B7",
@@ -6623,7 +6807,8 @@ var chainlinkFeeds = {
6623
6807
  "contractAddress": "0xe13fafe4FB769e0f4a1cB69D35D21EF99188EFf7",
6624
6808
  "proxyAddress": "0xfB6471ACD42c91FF265344Ff73E88353521d099F",
6625
6809
  "decimals": 8,
6626
- "name": "USDC / USD"
6810
+ "name": "USDC / USD",
6811
+ "secondaryProxyAddress": "0xEa674bBC33AE708Bc9EB4ba348b04E4eB55b496b"
6627
6812
  },
6628
6813
  {
6629
6814
  "contractAddress": "0xe88C679E2D42963acDC76810d21daC2e6a8D7c29",
@@ -16324,6 +16509,74 @@ async function diffCode(before, after) {
16324
16509
  return changes;
16325
16510
  }
16326
16511
 
16512
+ // src/operations/indexLogs.ts
16513
+ function chunkCalls(from, to, maxSize) {
16514
+ const chunks = [];
16515
+ let current = from;
16516
+ while (current < to) {
16517
+ const end = Math.min(Number(current + maxSize), Number(to));
16518
+ chunks.push({ from: current, to: BigInt(end) });
16519
+ current = BigInt(end);
16520
+ }
16521
+ return chunks;
16522
+ }
16523
+ function genericIndexer(args) {
16524
+ return async function(latestBlock) {
16525
+ const topicCache = await args.getIndexerState();
16526
+ const groups = /* @__PURE__ */ new Map();
16527
+ for (const top of topicCache) {
16528
+ if (!groups.has(top.lastIndexedBlockNumber)) {
16529
+ groups.set(top.lastIndexedBlockNumber, []);
16530
+ }
16531
+ groups.get(top.lastIndexedBlockNumber).push(top);
16532
+ }
16533
+ const sortedGroups = Array.from(groups).sort(
16534
+ (a, b) => Number(a[0]) - Number(b[0])
16535
+ );
16536
+ const sequences = [];
16537
+ sortedGroups.forEach(([lastIndexed, grp], ix) => {
16538
+ const nextBlock = sortedGroups[ix + 1]?.[0] || latestBlock;
16539
+ const prevSequence = sequences.length > 0 ? sequences[sequences.length - 1] : { events: [], address: [] };
16540
+ const events = Array.from(
16541
+ /* @__PURE__ */ new Set([
16542
+ ...grp.map((g) => JSON.stringify(g.abi)),
16543
+ ...prevSequence.events.map((e) => JSON.stringify(e))
16544
+ ])
16545
+ ).map((e) => JSON.parse(e));
16546
+ const addresses = Array.from(
16547
+ /* @__PURE__ */ new Set([...grp.map((g) => g.address), ...prevSequence.address])
16548
+ );
16549
+ const chunks = args.chunkSize ? chunkCalls(lastIndexed, nextBlock, args.chunkSize) : [{ from: lastIndexed, to: nextBlock }];
16550
+ chunks.forEach(({ from, to }) => {
16551
+ sequences.push({
16552
+ fromBlock: from,
16553
+ toBlock: to,
16554
+ address: addresses,
16555
+ events
16556
+ });
16557
+ });
16558
+ });
16559
+ await Promise.all(
16560
+ sequences.map(async (sequence) => {
16561
+ const logs = await getLogsRecursive({
16562
+ client: args.client,
16563
+ events: sequence.events,
16564
+ address: sequence.address,
16565
+ fromBlock: sequence.fromBlock,
16566
+ toBlock: sequence.toBlock
16567
+ });
16568
+ await args.processLogs(logs);
16569
+ })
16570
+ );
16571
+ await args.updateIndexerState(
16572
+ topicCache.map((t) => ({
16573
+ ...t,
16574
+ lastIndexedBlockNumber: latestBlock
16575
+ }))
16576
+ );
16577
+ };
16578
+ }
16579
+
16327
16580
  // src/seatbelt/logs.ts
16328
16581
  var import_viem9 = require("viem");
16329
16582
  function parseLogs({ logs, eventDb }) {
@@ -23904,6 +24157,1402 @@ var IERC20Metadata_ABI = [
23904
24157
  }
23905
24158
  ];
23906
24159
 
24160
+ // src/abis/IPoolConfigurator.ts
24161
+ var IPoolConfigurator_ABI = [
24162
+ {
24163
+ "type": "function",
24164
+ "name": "MAX_GRACE_PERIOD",
24165
+ "inputs": [],
24166
+ "outputs": [
24167
+ {
24168
+ "name": "",
24169
+ "type": "uint40",
24170
+ "internalType": "uint40"
24171
+ }
24172
+ ],
24173
+ "stateMutability": "view"
24174
+ },
24175
+ {
24176
+ "type": "function",
24177
+ "name": "configureReserveAsCollateral",
24178
+ "inputs": [
24179
+ {
24180
+ "name": "asset",
24181
+ "type": "address",
24182
+ "internalType": "address"
24183
+ },
24184
+ {
24185
+ "name": "ltv",
24186
+ "type": "uint256",
24187
+ "internalType": "uint256"
24188
+ },
24189
+ {
24190
+ "name": "liquidationThreshold",
24191
+ "type": "uint256",
24192
+ "internalType": "uint256"
24193
+ },
24194
+ {
24195
+ "name": "liquidationBonus",
24196
+ "type": "uint256",
24197
+ "internalType": "uint256"
24198
+ }
24199
+ ],
24200
+ "outputs": [],
24201
+ "stateMutability": "nonpayable"
24202
+ },
24203
+ {
24204
+ "type": "function",
24205
+ "name": "disableLiquidationGracePeriod",
24206
+ "inputs": [
24207
+ {
24208
+ "name": "asset",
24209
+ "type": "address",
24210
+ "internalType": "address"
24211
+ }
24212
+ ],
24213
+ "outputs": [],
24214
+ "stateMutability": "nonpayable"
24215
+ },
24216
+ {
24217
+ "type": "function",
24218
+ "name": "dropReserve",
24219
+ "inputs": [
24220
+ {
24221
+ "name": "asset",
24222
+ "type": "address",
24223
+ "internalType": "address"
24224
+ }
24225
+ ],
24226
+ "outputs": [],
24227
+ "stateMutability": "nonpayable"
24228
+ },
24229
+ {
24230
+ "type": "function",
24231
+ "name": "getConfiguratorLogic",
24232
+ "inputs": [],
24233
+ "outputs": [
24234
+ {
24235
+ "name": "",
24236
+ "type": "address",
24237
+ "internalType": "address"
24238
+ }
24239
+ ],
24240
+ "stateMutability": "view"
24241
+ },
24242
+ {
24243
+ "type": "function",
24244
+ "name": "getPendingLtv",
24245
+ "inputs": [
24246
+ {
24247
+ "name": "asset",
24248
+ "type": "address",
24249
+ "internalType": "address"
24250
+ }
24251
+ ],
24252
+ "outputs": [
24253
+ {
24254
+ "name": "",
24255
+ "type": "uint256",
24256
+ "internalType": "uint256"
24257
+ }
24258
+ ],
24259
+ "stateMutability": "view"
24260
+ },
24261
+ {
24262
+ "type": "function",
24263
+ "name": "initReserves",
24264
+ "inputs": [
24265
+ {
24266
+ "name": "input",
24267
+ "type": "tuple[]",
24268
+ "internalType": "struct ConfiguratorInputTypes.InitReserveInput[]",
24269
+ "components": [
24270
+ {
24271
+ "name": "aTokenImpl",
24272
+ "type": "address",
24273
+ "internalType": "address"
24274
+ },
24275
+ {
24276
+ "name": "variableDebtTokenImpl",
24277
+ "type": "address",
24278
+ "internalType": "address"
24279
+ },
24280
+ {
24281
+ "name": "useVirtualBalance",
24282
+ "type": "bool",
24283
+ "internalType": "bool"
24284
+ },
24285
+ {
24286
+ "name": "interestRateStrategyAddress",
24287
+ "type": "address",
24288
+ "internalType": "address"
24289
+ },
24290
+ {
24291
+ "name": "underlyingAsset",
24292
+ "type": "address",
24293
+ "internalType": "address"
24294
+ },
24295
+ {
24296
+ "name": "treasury",
24297
+ "type": "address",
24298
+ "internalType": "address"
24299
+ },
24300
+ {
24301
+ "name": "incentivesController",
24302
+ "type": "address",
24303
+ "internalType": "address"
24304
+ },
24305
+ {
24306
+ "name": "aTokenName",
24307
+ "type": "string",
24308
+ "internalType": "string"
24309
+ },
24310
+ {
24311
+ "name": "aTokenSymbol",
24312
+ "type": "string",
24313
+ "internalType": "string"
24314
+ },
24315
+ {
24316
+ "name": "variableDebtTokenName",
24317
+ "type": "string",
24318
+ "internalType": "string"
24319
+ },
24320
+ {
24321
+ "name": "variableDebtTokenSymbol",
24322
+ "type": "string",
24323
+ "internalType": "string"
24324
+ },
24325
+ {
24326
+ "name": "params",
24327
+ "type": "bytes",
24328
+ "internalType": "bytes"
24329
+ },
24330
+ {
24331
+ "name": "interestRateData",
24332
+ "type": "bytes",
24333
+ "internalType": "bytes"
24334
+ }
24335
+ ]
24336
+ }
24337
+ ],
24338
+ "outputs": [],
24339
+ "stateMutability": "nonpayable"
24340
+ },
24341
+ {
24342
+ "type": "function",
24343
+ "name": "setAssetBorrowableInEMode",
24344
+ "inputs": [
24345
+ {
24346
+ "name": "asset",
24347
+ "type": "address",
24348
+ "internalType": "address"
24349
+ },
24350
+ {
24351
+ "name": "categoryId",
24352
+ "type": "uint8",
24353
+ "internalType": "uint8"
24354
+ },
24355
+ {
24356
+ "name": "borrowable",
24357
+ "type": "bool",
24358
+ "internalType": "bool"
24359
+ }
24360
+ ],
24361
+ "outputs": [],
24362
+ "stateMutability": "nonpayable"
24363
+ },
24364
+ {
24365
+ "type": "function",
24366
+ "name": "setAssetCollateralInEMode",
24367
+ "inputs": [
24368
+ {
24369
+ "name": "asset",
24370
+ "type": "address",
24371
+ "internalType": "address"
24372
+ },
24373
+ {
24374
+ "name": "categoryId",
24375
+ "type": "uint8",
24376
+ "internalType": "uint8"
24377
+ },
24378
+ {
24379
+ "name": "collateral",
24380
+ "type": "bool",
24381
+ "internalType": "bool"
24382
+ }
24383
+ ],
24384
+ "outputs": [],
24385
+ "stateMutability": "nonpayable"
24386
+ },
24387
+ {
24388
+ "type": "function",
24389
+ "name": "setBorrowCap",
24390
+ "inputs": [
24391
+ {
24392
+ "name": "asset",
24393
+ "type": "address",
24394
+ "internalType": "address"
24395
+ },
24396
+ {
24397
+ "name": "newBorrowCap",
24398
+ "type": "uint256",
24399
+ "internalType": "uint256"
24400
+ }
24401
+ ],
24402
+ "outputs": [],
24403
+ "stateMutability": "nonpayable"
24404
+ },
24405
+ {
24406
+ "type": "function",
24407
+ "name": "setBorrowableInIsolation",
24408
+ "inputs": [
24409
+ {
24410
+ "name": "asset",
24411
+ "type": "address",
24412
+ "internalType": "address"
24413
+ },
24414
+ {
24415
+ "name": "borrowable",
24416
+ "type": "bool",
24417
+ "internalType": "bool"
24418
+ }
24419
+ ],
24420
+ "outputs": [],
24421
+ "stateMutability": "nonpayable"
24422
+ },
24423
+ {
24424
+ "type": "function",
24425
+ "name": "setDebtCeiling",
24426
+ "inputs": [
24427
+ {
24428
+ "name": "asset",
24429
+ "type": "address",
24430
+ "internalType": "address"
24431
+ },
24432
+ {
24433
+ "name": "newDebtCeiling",
24434
+ "type": "uint256",
24435
+ "internalType": "uint256"
24436
+ }
24437
+ ],
24438
+ "outputs": [],
24439
+ "stateMutability": "nonpayable"
24440
+ },
24441
+ {
24442
+ "type": "function",
24443
+ "name": "setEModeCategory",
24444
+ "inputs": [
24445
+ {
24446
+ "name": "categoryId",
24447
+ "type": "uint8",
24448
+ "internalType": "uint8"
24449
+ },
24450
+ {
24451
+ "name": "ltv",
24452
+ "type": "uint16",
24453
+ "internalType": "uint16"
24454
+ },
24455
+ {
24456
+ "name": "liquidationThreshold",
24457
+ "type": "uint16",
24458
+ "internalType": "uint16"
24459
+ },
24460
+ {
24461
+ "name": "liquidationBonus",
24462
+ "type": "uint16",
24463
+ "internalType": "uint16"
24464
+ },
24465
+ {
24466
+ "name": "label",
24467
+ "type": "string",
24468
+ "internalType": "string"
24469
+ }
24470
+ ],
24471
+ "outputs": [],
24472
+ "stateMutability": "nonpayable"
24473
+ },
24474
+ {
24475
+ "type": "function",
24476
+ "name": "setLiquidationProtocolFee",
24477
+ "inputs": [
24478
+ {
24479
+ "name": "asset",
24480
+ "type": "address",
24481
+ "internalType": "address"
24482
+ },
24483
+ {
24484
+ "name": "newFee",
24485
+ "type": "uint256",
24486
+ "internalType": "uint256"
24487
+ }
24488
+ ],
24489
+ "outputs": [],
24490
+ "stateMutability": "nonpayable"
24491
+ },
24492
+ {
24493
+ "type": "function",
24494
+ "name": "setPoolPause",
24495
+ "inputs": [
24496
+ {
24497
+ "name": "paused",
24498
+ "type": "bool",
24499
+ "internalType": "bool"
24500
+ },
24501
+ {
24502
+ "name": "gracePeriod",
24503
+ "type": "uint40",
24504
+ "internalType": "uint40"
24505
+ }
24506
+ ],
24507
+ "outputs": [],
24508
+ "stateMutability": "nonpayable"
24509
+ },
24510
+ {
24511
+ "type": "function",
24512
+ "name": "setPoolPause",
24513
+ "inputs": [
24514
+ {
24515
+ "name": "paused",
24516
+ "type": "bool",
24517
+ "internalType": "bool"
24518
+ }
24519
+ ],
24520
+ "outputs": [],
24521
+ "stateMutability": "nonpayable"
24522
+ },
24523
+ {
24524
+ "type": "function",
24525
+ "name": "setReserveActive",
24526
+ "inputs": [
24527
+ {
24528
+ "name": "asset",
24529
+ "type": "address",
24530
+ "internalType": "address"
24531
+ },
24532
+ {
24533
+ "name": "active",
24534
+ "type": "bool",
24535
+ "internalType": "bool"
24536
+ }
24537
+ ],
24538
+ "outputs": [],
24539
+ "stateMutability": "nonpayable"
24540
+ },
24541
+ {
24542
+ "type": "function",
24543
+ "name": "setReserveBorrowing",
24544
+ "inputs": [
24545
+ {
24546
+ "name": "asset",
24547
+ "type": "address",
24548
+ "internalType": "address"
24549
+ },
24550
+ {
24551
+ "name": "enabled",
24552
+ "type": "bool",
24553
+ "internalType": "bool"
24554
+ }
24555
+ ],
24556
+ "outputs": [],
24557
+ "stateMutability": "nonpayable"
24558
+ },
24559
+ {
24560
+ "type": "function",
24561
+ "name": "setReserveFactor",
24562
+ "inputs": [
24563
+ {
24564
+ "name": "asset",
24565
+ "type": "address",
24566
+ "internalType": "address"
24567
+ },
24568
+ {
24569
+ "name": "newReserveFactor",
24570
+ "type": "uint256",
24571
+ "internalType": "uint256"
24572
+ }
24573
+ ],
24574
+ "outputs": [],
24575
+ "stateMutability": "nonpayable"
24576
+ },
24577
+ {
24578
+ "type": "function",
24579
+ "name": "setReserveFlashLoaning",
24580
+ "inputs": [
24581
+ {
24582
+ "name": "asset",
24583
+ "type": "address",
24584
+ "internalType": "address"
24585
+ },
24586
+ {
24587
+ "name": "enabled",
24588
+ "type": "bool",
24589
+ "internalType": "bool"
24590
+ }
24591
+ ],
24592
+ "outputs": [],
24593
+ "stateMutability": "nonpayable"
24594
+ },
24595
+ {
24596
+ "type": "function",
24597
+ "name": "setReserveFreeze",
24598
+ "inputs": [
24599
+ {
24600
+ "name": "asset",
24601
+ "type": "address",
24602
+ "internalType": "address"
24603
+ },
24604
+ {
24605
+ "name": "freeze",
24606
+ "type": "bool",
24607
+ "internalType": "bool"
24608
+ }
24609
+ ],
24610
+ "outputs": [],
24611
+ "stateMutability": "nonpayable"
24612
+ },
24613
+ {
24614
+ "type": "function",
24615
+ "name": "setReserveInterestRateData",
24616
+ "inputs": [
24617
+ {
24618
+ "name": "asset",
24619
+ "type": "address",
24620
+ "internalType": "address"
24621
+ },
24622
+ {
24623
+ "name": "rateData",
24624
+ "type": "bytes",
24625
+ "internalType": "bytes"
24626
+ }
24627
+ ],
24628
+ "outputs": [],
24629
+ "stateMutability": "nonpayable"
24630
+ },
24631
+ {
24632
+ "type": "function",
24633
+ "name": "setReserveInterestRateStrategyAddress",
24634
+ "inputs": [
24635
+ {
24636
+ "name": "asset",
24637
+ "type": "address",
24638
+ "internalType": "address"
24639
+ },
24640
+ {
24641
+ "name": "newRateStrategyAddress",
24642
+ "type": "address",
24643
+ "internalType": "address"
24644
+ },
24645
+ {
24646
+ "name": "rateData",
24647
+ "type": "bytes",
24648
+ "internalType": "bytes"
24649
+ }
24650
+ ],
24651
+ "outputs": [],
24652
+ "stateMutability": "nonpayable"
24653
+ },
24654
+ {
24655
+ "type": "function",
24656
+ "name": "setReservePause",
24657
+ "inputs": [
24658
+ {
24659
+ "name": "asset",
24660
+ "type": "address",
24661
+ "internalType": "address"
24662
+ },
24663
+ {
24664
+ "name": "paused",
24665
+ "type": "bool",
24666
+ "internalType": "bool"
24667
+ }
24668
+ ],
24669
+ "outputs": [],
24670
+ "stateMutability": "nonpayable"
24671
+ },
24672
+ {
24673
+ "type": "function",
24674
+ "name": "setReservePause",
24675
+ "inputs": [
24676
+ {
24677
+ "name": "asset",
24678
+ "type": "address",
24679
+ "internalType": "address"
24680
+ },
24681
+ {
24682
+ "name": "paused",
24683
+ "type": "bool",
24684
+ "internalType": "bool"
24685
+ },
24686
+ {
24687
+ "name": "gracePeriod",
24688
+ "type": "uint40",
24689
+ "internalType": "uint40"
24690
+ }
24691
+ ],
24692
+ "outputs": [],
24693
+ "stateMutability": "nonpayable"
24694
+ },
24695
+ {
24696
+ "type": "function",
24697
+ "name": "setSiloedBorrowing",
24698
+ "inputs": [
24699
+ {
24700
+ "name": "asset",
24701
+ "type": "address",
24702
+ "internalType": "address"
24703
+ },
24704
+ {
24705
+ "name": "siloed",
24706
+ "type": "bool",
24707
+ "internalType": "bool"
24708
+ }
24709
+ ],
24710
+ "outputs": [],
24711
+ "stateMutability": "nonpayable"
24712
+ },
24713
+ {
24714
+ "type": "function",
24715
+ "name": "setSupplyCap",
24716
+ "inputs": [
24717
+ {
24718
+ "name": "asset",
24719
+ "type": "address",
24720
+ "internalType": "address"
24721
+ },
24722
+ {
24723
+ "name": "newSupplyCap",
24724
+ "type": "uint256",
24725
+ "internalType": "uint256"
24726
+ }
24727
+ ],
24728
+ "outputs": [],
24729
+ "stateMutability": "nonpayable"
24730
+ },
24731
+ {
24732
+ "type": "function",
24733
+ "name": "setUnbackedMintCap",
24734
+ "inputs": [
24735
+ {
24736
+ "name": "asset",
24737
+ "type": "address",
24738
+ "internalType": "address"
24739
+ },
24740
+ {
24741
+ "name": "newUnbackedMintCap",
24742
+ "type": "uint256",
24743
+ "internalType": "uint256"
24744
+ }
24745
+ ],
24746
+ "outputs": [],
24747
+ "stateMutability": "nonpayable"
24748
+ },
24749
+ {
24750
+ "type": "function",
24751
+ "name": "updateAToken",
24752
+ "inputs": [
24753
+ {
24754
+ "name": "input",
24755
+ "type": "tuple",
24756
+ "internalType": "struct ConfiguratorInputTypes.UpdateATokenInput",
24757
+ "components": [
24758
+ {
24759
+ "name": "asset",
24760
+ "type": "address",
24761
+ "internalType": "address"
24762
+ },
24763
+ {
24764
+ "name": "treasury",
24765
+ "type": "address",
24766
+ "internalType": "address"
24767
+ },
24768
+ {
24769
+ "name": "incentivesController",
24770
+ "type": "address",
24771
+ "internalType": "address"
24772
+ },
24773
+ {
24774
+ "name": "name",
24775
+ "type": "string",
24776
+ "internalType": "string"
24777
+ },
24778
+ {
24779
+ "name": "symbol",
24780
+ "type": "string",
24781
+ "internalType": "string"
24782
+ },
24783
+ {
24784
+ "name": "implementation",
24785
+ "type": "address",
24786
+ "internalType": "address"
24787
+ },
24788
+ {
24789
+ "name": "params",
24790
+ "type": "bytes",
24791
+ "internalType": "bytes"
24792
+ }
24793
+ ]
24794
+ }
24795
+ ],
24796
+ "outputs": [],
24797
+ "stateMutability": "nonpayable"
24798
+ },
24799
+ {
24800
+ "type": "function",
24801
+ "name": "updateBridgeProtocolFee",
24802
+ "inputs": [
24803
+ {
24804
+ "name": "newBridgeProtocolFee",
24805
+ "type": "uint256",
24806
+ "internalType": "uint256"
24807
+ }
24808
+ ],
24809
+ "outputs": [],
24810
+ "stateMutability": "nonpayable"
24811
+ },
24812
+ {
24813
+ "type": "function",
24814
+ "name": "updateFlashloanPremiumToProtocol",
24815
+ "inputs": [
24816
+ {
24817
+ "name": "newFlashloanPremiumToProtocol",
24818
+ "type": "uint128",
24819
+ "internalType": "uint128"
24820
+ }
24821
+ ],
24822
+ "outputs": [],
24823
+ "stateMutability": "nonpayable"
24824
+ },
24825
+ {
24826
+ "type": "function",
24827
+ "name": "updateFlashloanPremiumTotal",
24828
+ "inputs": [
24829
+ {
24830
+ "name": "newFlashloanPremiumTotal",
24831
+ "type": "uint128",
24832
+ "internalType": "uint128"
24833
+ }
24834
+ ],
24835
+ "outputs": [],
24836
+ "stateMutability": "nonpayable"
24837
+ },
24838
+ {
24839
+ "type": "function",
24840
+ "name": "updateVariableDebtToken",
24841
+ "inputs": [
24842
+ {
24843
+ "name": "input",
24844
+ "type": "tuple",
24845
+ "internalType": "struct ConfiguratorInputTypes.UpdateDebtTokenInput",
24846
+ "components": [
24847
+ {
24848
+ "name": "asset",
24849
+ "type": "address",
24850
+ "internalType": "address"
24851
+ },
24852
+ {
24853
+ "name": "incentivesController",
24854
+ "type": "address",
24855
+ "internalType": "address"
24856
+ },
24857
+ {
24858
+ "name": "name",
24859
+ "type": "string",
24860
+ "internalType": "string"
24861
+ },
24862
+ {
24863
+ "name": "symbol",
24864
+ "type": "string",
24865
+ "internalType": "string"
24866
+ },
24867
+ {
24868
+ "name": "implementation",
24869
+ "type": "address",
24870
+ "internalType": "address"
24871
+ },
24872
+ {
24873
+ "name": "params",
24874
+ "type": "bytes",
24875
+ "internalType": "bytes"
24876
+ }
24877
+ ]
24878
+ }
24879
+ ],
24880
+ "outputs": [],
24881
+ "stateMutability": "nonpayable"
24882
+ },
24883
+ {
24884
+ "type": "event",
24885
+ "name": "ATokenUpgraded",
24886
+ "inputs": [
24887
+ {
24888
+ "name": "asset",
24889
+ "type": "address",
24890
+ "indexed": true,
24891
+ "internalType": "address"
24892
+ },
24893
+ {
24894
+ "name": "proxy",
24895
+ "type": "address",
24896
+ "indexed": true,
24897
+ "internalType": "address"
24898
+ },
24899
+ {
24900
+ "name": "implementation",
24901
+ "type": "address",
24902
+ "indexed": true,
24903
+ "internalType": "address"
24904
+ }
24905
+ ],
24906
+ "anonymous": false
24907
+ },
24908
+ {
24909
+ "type": "event",
24910
+ "name": "AssetBorrowableInEModeChanged",
24911
+ "inputs": [
24912
+ {
24913
+ "name": "asset",
24914
+ "type": "address",
24915
+ "indexed": true,
24916
+ "internalType": "address"
24917
+ },
24918
+ {
24919
+ "name": "categoryId",
24920
+ "type": "uint8",
24921
+ "indexed": false,
24922
+ "internalType": "uint8"
24923
+ },
24924
+ {
24925
+ "name": "borrowable",
24926
+ "type": "bool",
24927
+ "indexed": false,
24928
+ "internalType": "bool"
24929
+ }
24930
+ ],
24931
+ "anonymous": false
24932
+ },
24933
+ {
24934
+ "type": "event",
24935
+ "name": "AssetCollateralInEModeChanged",
24936
+ "inputs": [
24937
+ {
24938
+ "name": "asset",
24939
+ "type": "address",
24940
+ "indexed": true,
24941
+ "internalType": "address"
24942
+ },
24943
+ {
24944
+ "name": "categoryId",
24945
+ "type": "uint8",
24946
+ "indexed": false,
24947
+ "internalType": "uint8"
24948
+ },
24949
+ {
24950
+ "name": "collateral",
24951
+ "type": "bool",
24952
+ "indexed": false,
24953
+ "internalType": "bool"
24954
+ }
24955
+ ],
24956
+ "anonymous": false
24957
+ },
24958
+ {
24959
+ "type": "event",
24960
+ "name": "BorrowCapChanged",
24961
+ "inputs": [
24962
+ {
24963
+ "name": "asset",
24964
+ "type": "address",
24965
+ "indexed": true,
24966
+ "internalType": "address"
24967
+ },
24968
+ {
24969
+ "name": "oldBorrowCap",
24970
+ "type": "uint256",
24971
+ "indexed": false,
24972
+ "internalType": "uint256"
24973
+ },
24974
+ {
24975
+ "name": "newBorrowCap",
24976
+ "type": "uint256",
24977
+ "indexed": false,
24978
+ "internalType": "uint256"
24979
+ }
24980
+ ],
24981
+ "anonymous": false
24982
+ },
24983
+ {
24984
+ "type": "event",
24985
+ "name": "BorrowableInIsolationChanged",
24986
+ "inputs": [
24987
+ {
24988
+ "name": "asset",
24989
+ "type": "address",
24990
+ "indexed": false,
24991
+ "internalType": "address"
24992
+ },
24993
+ {
24994
+ "name": "borrowable",
24995
+ "type": "bool",
24996
+ "indexed": false,
24997
+ "internalType": "bool"
24998
+ }
24999
+ ],
25000
+ "anonymous": false
25001
+ },
25002
+ {
25003
+ "type": "event",
25004
+ "name": "BridgeProtocolFeeUpdated",
25005
+ "inputs": [
25006
+ {
25007
+ "name": "oldBridgeProtocolFee",
25008
+ "type": "uint256",
25009
+ "indexed": false,
25010
+ "internalType": "uint256"
25011
+ },
25012
+ {
25013
+ "name": "newBridgeProtocolFee",
25014
+ "type": "uint256",
25015
+ "indexed": false,
25016
+ "internalType": "uint256"
25017
+ }
25018
+ ],
25019
+ "anonymous": false
25020
+ },
25021
+ {
25022
+ "type": "event",
25023
+ "name": "CollateralConfigurationChanged",
25024
+ "inputs": [
25025
+ {
25026
+ "name": "asset",
25027
+ "type": "address",
25028
+ "indexed": true,
25029
+ "internalType": "address"
25030
+ },
25031
+ {
25032
+ "name": "ltv",
25033
+ "type": "uint256",
25034
+ "indexed": false,
25035
+ "internalType": "uint256"
25036
+ },
25037
+ {
25038
+ "name": "liquidationThreshold",
25039
+ "type": "uint256",
25040
+ "indexed": false,
25041
+ "internalType": "uint256"
25042
+ },
25043
+ {
25044
+ "name": "liquidationBonus",
25045
+ "type": "uint256",
25046
+ "indexed": false,
25047
+ "internalType": "uint256"
25048
+ }
25049
+ ],
25050
+ "anonymous": false
25051
+ },
25052
+ {
25053
+ "type": "event",
25054
+ "name": "DebtCeilingChanged",
25055
+ "inputs": [
25056
+ {
25057
+ "name": "asset",
25058
+ "type": "address",
25059
+ "indexed": true,
25060
+ "internalType": "address"
25061
+ },
25062
+ {
25063
+ "name": "oldDebtCeiling",
25064
+ "type": "uint256",
25065
+ "indexed": false,
25066
+ "internalType": "uint256"
25067
+ },
25068
+ {
25069
+ "name": "newDebtCeiling",
25070
+ "type": "uint256",
25071
+ "indexed": false,
25072
+ "internalType": "uint256"
25073
+ }
25074
+ ],
25075
+ "anonymous": false
25076
+ },
25077
+ {
25078
+ "type": "event",
25079
+ "name": "EModeCategoryAdded",
25080
+ "inputs": [
25081
+ {
25082
+ "name": "categoryId",
25083
+ "type": "uint8",
25084
+ "indexed": true,
25085
+ "internalType": "uint8"
25086
+ },
25087
+ {
25088
+ "name": "ltv",
25089
+ "type": "uint256",
25090
+ "indexed": false,
25091
+ "internalType": "uint256"
25092
+ },
25093
+ {
25094
+ "name": "liquidationThreshold",
25095
+ "type": "uint256",
25096
+ "indexed": false,
25097
+ "internalType": "uint256"
25098
+ },
25099
+ {
25100
+ "name": "liquidationBonus",
25101
+ "type": "uint256",
25102
+ "indexed": false,
25103
+ "internalType": "uint256"
25104
+ },
25105
+ {
25106
+ "name": "oracle",
25107
+ "type": "address",
25108
+ "indexed": false,
25109
+ "internalType": "address"
25110
+ },
25111
+ {
25112
+ "name": "label",
25113
+ "type": "string",
25114
+ "indexed": false,
25115
+ "internalType": "string"
25116
+ }
25117
+ ],
25118
+ "anonymous": false
25119
+ },
25120
+ {
25121
+ "type": "event",
25122
+ "name": "FlashloanPremiumToProtocolUpdated",
25123
+ "inputs": [
25124
+ {
25125
+ "name": "oldFlashloanPremiumToProtocol",
25126
+ "type": "uint128",
25127
+ "indexed": false,
25128
+ "internalType": "uint128"
25129
+ },
25130
+ {
25131
+ "name": "newFlashloanPremiumToProtocol",
25132
+ "type": "uint128",
25133
+ "indexed": false,
25134
+ "internalType": "uint128"
25135
+ }
25136
+ ],
25137
+ "anonymous": false
25138
+ },
25139
+ {
25140
+ "type": "event",
25141
+ "name": "FlashloanPremiumTotalUpdated",
25142
+ "inputs": [
25143
+ {
25144
+ "name": "oldFlashloanPremiumTotal",
25145
+ "type": "uint128",
25146
+ "indexed": false,
25147
+ "internalType": "uint128"
25148
+ },
25149
+ {
25150
+ "name": "newFlashloanPremiumTotal",
25151
+ "type": "uint128",
25152
+ "indexed": false,
25153
+ "internalType": "uint128"
25154
+ }
25155
+ ],
25156
+ "anonymous": false
25157
+ },
25158
+ {
25159
+ "type": "event",
25160
+ "name": "LiquidationGracePeriodChanged",
25161
+ "inputs": [
25162
+ {
25163
+ "name": "asset",
25164
+ "type": "address",
25165
+ "indexed": true,
25166
+ "internalType": "address"
25167
+ },
25168
+ {
25169
+ "name": "gracePeriodUntil",
25170
+ "type": "uint40",
25171
+ "indexed": false,
25172
+ "internalType": "uint40"
25173
+ }
25174
+ ],
25175
+ "anonymous": false
25176
+ },
25177
+ {
25178
+ "type": "event",
25179
+ "name": "LiquidationGracePeriodDisabled",
25180
+ "inputs": [
25181
+ {
25182
+ "name": "asset",
25183
+ "type": "address",
25184
+ "indexed": true,
25185
+ "internalType": "address"
25186
+ }
25187
+ ],
25188
+ "anonymous": false
25189
+ },
25190
+ {
25191
+ "type": "event",
25192
+ "name": "LiquidationProtocolFeeChanged",
25193
+ "inputs": [
25194
+ {
25195
+ "name": "asset",
25196
+ "type": "address",
25197
+ "indexed": true,
25198
+ "internalType": "address"
25199
+ },
25200
+ {
25201
+ "name": "oldFee",
25202
+ "type": "uint256",
25203
+ "indexed": false,
25204
+ "internalType": "uint256"
25205
+ },
25206
+ {
25207
+ "name": "newFee",
25208
+ "type": "uint256",
25209
+ "indexed": false,
25210
+ "internalType": "uint256"
25211
+ }
25212
+ ],
25213
+ "anonymous": false
25214
+ },
25215
+ {
25216
+ "type": "event",
25217
+ "name": "PendingLtvChanged",
25218
+ "inputs": [
25219
+ {
25220
+ "name": "asset",
25221
+ "type": "address",
25222
+ "indexed": true,
25223
+ "internalType": "address"
25224
+ },
25225
+ {
25226
+ "name": "ltv",
25227
+ "type": "uint256",
25228
+ "indexed": false,
25229
+ "internalType": "uint256"
25230
+ }
25231
+ ],
25232
+ "anonymous": false
25233
+ },
25234
+ {
25235
+ "type": "event",
25236
+ "name": "ReserveActive",
25237
+ "inputs": [
25238
+ {
25239
+ "name": "asset",
25240
+ "type": "address",
25241
+ "indexed": true,
25242
+ "internalType": "address"
25243
+ },
25244
+ {
25245
+ "name": "active",
25246
+ "type": "bool",
25247
+ "indexed": false,
25248
+ "internalType": "bool"
25249
+ }
25250
+ ],
25251
+ "anonymous": false
25252
+ },
25253
+ {
25254
+ "type": "event",
25255
+ "name": "ReserveBorrowing",
25256
+ "inputs": [
25257
+ {
25258
+ "name": "asset",
25259
+ "type": "address",
25260
+ "indexed": true,
25261
+ "internalType": "address"
25262
+ },
25263
+ {
25264
+ "name": "enabled",
25265
+ "type": "bool",
25266
+ "indexed": false,
25267
+ "internalType": "bool"
25268
+ }
25269
+ ],
25270
+ "anonymous": false
25271
+ },
25272
+ {
25273
+ "type": "event",
25274
+ "name": "ReserveDropped",
25275
+ "inputs": [
25276
+ {
25277
+ "name": "asset",
25278
+ "type": "address",
25279
+ "indexed": true,
25280
+ "internalType": "address"
25281
+ }
25282
+ ],
25283
+ "anonymous": false
25284
+ },
25285
+ {
25286
+ "type": "event",
25287
+ "name": "ReserveFactorChanged",
25288
+ "inputs": [
25289
+ {
25290
+ "name": "asset",
25291
+ "type": "address",
25292
+ "indexed": true,
25293
+ "internalType": "address"
25294
+ },
25295
+ {
25296
+ "name": "oldReserveFactor",
25297
+ "type": "uint256",
25298
+ "indexed": false,
25299
+ "internalType": "uint256"
25300
+ },
25301
+ {
25302
+ "name": "newReserveFactor",
25303
+ "type": "uint256",
25304
+ "indexed": false,
25305
+ "internalType": "uint256"
25306
+ }
25307
+ ],
25308
+ "anonymous": false
25309
+ },
25310
+ {
25311
+ "type": "event",
25312
+ "name": "ReserveFlashLoaning",
25313
+ "inputs": [
25314
+ {
25315
+ "name": "asset",
25316
+ "type": "address",
25317
+ "indexed": true,
25318
+ "internalType": "address"
25319
+ },
25320
+ {
25321
+ "name": "enabled",
25322
+ "type": "bool",
25323
+ "indexed": false,
25324
+ "internalType": "bool"
25325
+ }
25326
+ ],
25327
+ "anonymous": false
25328
+ },
25329
+ {
25330
+ "type": "event",
25331
+ "name": "ReserveFrozen",
25332
+ "inputs": [
25333
+ {
25334
+ "name": "asset",
25335
+ "type": "address",
25336
+ "indexed": true,
25337
+ "internalType": "address"
25338
+ },
25339
+ {
25340
+ "name": "frozen",
25341
+ "type": "bool",
25342
+ "indexed": false,
25343
+ "internalType": "bool"
25344
+ }
25345
+ ],
25346
+ "anonymous": false
25347
+ },
25348
+ {
25349
+ "type": "event",
25350
+ "name": "ReserveInitialized",
25351
+ "inputs": [
25352
+ {
25353
+ "name": "asset",
25354
+ "type": "address",
25355
+ "indexed": true,
25356
+ "internalType": "address"
25357
+ },
25358
+ {
25359
+ "name": "aToken",
25360
+ "type": "address",
25361
+ "indexed": true,
25362
+ "internalType": "address"
25363
+ },
25364
+ {
25365
+ "name": "stableDebtToken",
25366
+ "type": "address",
25367
+ "indexed": false,
25368
+ "internalType": "address"
25369
+ },
25370
+ {
25371
+ "name": "variableDebtToken",
25372
+ "type": "address",
25373
+ "indexed": false,
25374
+ "internalType": "address"
25375
+ },
25376
+ {
25377
+ "name": "interestRateStrategyAddress",
25378
+ "type": "address",
25379
+ "indexed": false,
25380
+ "internalType": "address"
25381
+ }
25382
+ ],
25383
+ "anonymous": false
25384
+ },
25385
+ {
25386
+ "type": "event",
25387
+ "name": "ReserveInterestRateDataChanged",
25388
+ "inputs": [
25389
+ {
25390
+ "name": "asset",
25391
+ "type": "address",
25392
+ "indexed": true,
25393
+ "internalType": "address"
25394
+ },
25395
+ {
25396
+ "name": "strategy",
25397
+ "type": "address",
25398
+ "indexed": true,
25399
+ "internalType": "address"
25400
+ },
25401
+ {
25402
+ "name": "data",
25403
+ "type": "bytes",
25404
+ "indexed": false,
25405
+ "internalType": "bytes"
25406
+ }
25407
+ ],
25408
+ "anonymous": false
25409
+ },
25410
+ {
25411
+ "type": "event",
25412
+ "name": "ReserveInterestRateStrategyChanged",
25413
+ "inputs": [
25414
+ {
25415
+ "name": "asset",
25416
+ "type": "address",
25417
+ "indexed": true,
25418
+ "internalType": "address"
25419
+ },
25420
+ {
25421
+ "name": "oldStrategy",
25422
+ "type": "address",
25423
+ "indexed": false,
25424
+ "internalType": "address"
25425
+ },
25426
+ {
25427
+ "name": "newStrategy",
25428
+ "type": "address",
25429
+ "indexed": false,
25430
+ "internalType": "address"
25431
+ }
25432
+ ],
25433
+ "anonymous": false
25434
+ },
25435
+ {
25436
+ "type": "event",
25437
+ "name": "ReservePaused",
25438
+ "inputs": [
25439
+ {
25440
+ "name": "asset",
25441
+ "type": "address",
25442
+ "indexed": true,
25443
+ "internalType": "address"
25444
+ },
25445
+ {
25446
+ "name": "paused",
25447
+ "type": "bool",
25448
+ "indexed": false,
25449
+ "internalType": "bool"
25450
+ }
25451
+ ],
25452
+ "anonymous": false
25453
+ },
25454
+ {
25455
+ "type": "event",
25456
+ "name": "SiloedBorrowingChanged",
25457
+ "inputs": [
25458
+ {
25459
+ "name": "asset",
25460
+ "type": "address",
25461
+ "indexed": true,
25462
+ "internalType": "address"
25463
+ },
25464
+ {
25465
+ "name": "oldState",
25466
+ "type": "bool",
25467
+ "indexed": false,
25468
+ "internalType": "bool"
25469
+ },
25470
+ {
25471
+ "name": "newState",
25472
+ "type": "bool",
25473
+ "indexed": false,
25474
+ "internalType": "bool"
25475
+ }
25476
+ ],
25477
+ "anonymous": false
25478
+ },
25479
+ {
25480
+ "type": "event",
25481
+ "name": "SupplyCapChanged",
25482
+ "inputs": [
25483
+ {
25484
+ "name": "asset",
25485
+ "type": "address",
25486
+ "indexed": true,
25487
+ "internalType": "address"
25488
+ },
25489
+ {
25490
+ "name": "oldSupplyCap",
25491
+ "type": "uint256",
25492
+ "indexed": false,
25493
+ "internalType": "uint256"
25494
+ },
25495
+ {
25496
+ "name": "newSupplyCap",
25497
+ "type": "uint256",
25498
+ "indexed": false,
25499
+ "internalType": "uint256"
25500
+ }
25501
+ ],
25502
+ "anonymous": false
25503
+ },
25504
+ {
25505
+ "type": "event",
25506
+ "name": "UnbackedMintCapChanged",
25507
+ "inputs": [
25508
+ {
25509
+ "name": "asset",
25510
+ "type": "address",
25511
+ "indexed": true,
25512
+ "internalType": "address"
25513
+ },
25514
+ {
25515
+ "name": "oldUnbackedMintCap",
25516
+ "type": "uint256",
25517
+ "indexed": false,
25518
+ "internalType": "uint256"
25519
+ },
25520
+ {
25521
+ "name": "newUnbackedMintCap",
25522
+ "type": "uint256",
25523
+ "indexed": false,
25524
+ "internalType": "uint256"
25525
+ }
25526
+ ],
25527
+ "anonymous": false
25528
+ },
25529
+ {
25530
+ "type": "event",
25531
+ "name": "VariableDebtTokenUpgraded",
25532
+ "inputs": [
25533
+ {
25534
+ "name": "asset",
25535
+ "type": "address",
25536
+ "indexed": true,
25537
+ "internalType": "address"
25538
+ },
25539
+ {
25540
+ "name": "proxy",
25541
+ "type": "address",
25542
+ "indexed": true,
25543
+ "internalType": "address"
25544
+ },
25545
+ {
25546
+ "name": "implementation",
25547
+ "type": "address",
25548
+ "indexed": true,
25549
+ "internalType": "address"
25550
+ }
25551
+ ],
25552
+ "anonymous": false
25553
+ }
25554
+ ];
25555
+
23907
25556
  // src/abis/IERC20.ts
23908
25557
  var IERC20_ABI = [
23909
25558
  {
@@ -24321,6 +25970,7 @@ function diffFoundryStorageLayout(layoutBefore, layoutAfter) {
24321
25970
  IERC20_ABI,
24322
25971
  IEmissionManager_ABI,
24323
25972
  IPoolAddressesProvider_ABI,
25973
+ IPoolConfigurator_ABI,
24324
25974
  IPool_ABI,
24325
25975
  IReserveInterestRateStrategy_ABI,
24326
25976
  IRewardsController_ABI,
@@ -24338,9 +25988,11 @@ function diffFoundryStorageLayout(layoutBefore, layoutAfter) {
24338
25988
  aaveAddressesProvider_IncentivesControllerSlot,
24339
25989
  alchemyNetworkMap,
24340
25990
  alchemySupportedChainIds,
25991
+ assetToBase,
24341
25992
  bitmapToIndexes,
24342
25993
  calculateAvailableBorrowsMarketReferenceCurrency,
24343
25994
  calculateCompoundedInterest,
25995
+ calculateHealthFactor,
24344
25996
  calculateHealthFactorFromBalances,
24345
25997
  calculateLinearInterest,
24346
25998
  chainlinkFeeds,
@@ -24358,9 +26010,11 @@ function diffFoundryStorageLayout(layoutBefore, layoutAfter) {
24358
26010
  flashbotsOnFetchRequest,
24359
26011
  foundry_getStandardJsonInput,
24360
26012
  foundry_getStorageLayout,
26013
+ genericIndexer,
24361
26014
  getAlchemyRPC,
24362
26015
  getBits,
24363
26016
  getClient,
26017
+ getContractDeploymentBlock,
24364
26018
  getCurrentDebtBalance,
24365
26019
  getCurrentLiquidityBalance,
24366
26020
  getExplicitRPC,
@@ -24387,6 +26041,7 @@ function diffFoundryStorageLayout(layoutBefore, layoutAfter) {
24387
26041
  onMevHandler,
24388
26042
  parseEtherscanStyleSourceCode,
24389
26043
  parseLogs,
26044
+ priceUpdateDecoder,
24390
26045
  publicRPCs,
24391
26046
  quicknodeNetworkMap,
24392
26047
  rayDiv,