diff --git a/.openzeppelin/unknown-2008.json b/.openzeppelin/unknown-2008.json index bd4cd16c..928dde89 100644 --- a/.openzeppelin/unknown-2008.json +++ b/.openzeppelin/unknown-2008.json @@ -9421,6 +9421,1311 @@ ] } } + }, + "488162096a8887d962d3d46cd71bc11ff08bc31d258acdb37714ca930bbab404": { + "address": "0x391dEB7b5a8A3442f4354e277c15b1c2d21e611a", + "txHash": "0xc5cc1618d5e16b52179b6492c8af010413b615bc5f5975f8e0abf10834255480", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_loanIdCounter", + "offset": 0, + "slot": "0", + "type": "t_uint256", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:16" + }, + { + "label": "_programIdCounter", + "offset": 0, + "slot": "1", + "type": "t_uint32", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:19" + }, + { + "label": "_loans", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(State)8728_storage)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:22" + }, + { + "label": "_creditLineLenders", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:25" + }, + { + "label": "_liquidityPoolLenders", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:28" + }, + { + "label": "_programLenders", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:31" + }, + { + "label": "_programCreditLines", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:34" + }, + { + "label": "_programLiquidityPools", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:37" + }, + { + "label": "_hasAlias", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "9", + "type": "t_array(t_uint256)41_storage", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:44" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)291_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_uint256)41_storage": { + "label": "uint256[41]", + "numberOfBytes": "1312" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(State)8728_storage)": { + "label": "mapping(uint256 => struct Loan.State)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_address)": { + "label": "mapping(uint32 => address)", + "numberOfBytes": "32" + }, + "t_struct(State)8728_storage": { + "label": "struct Loan.State", + "members": [ + { + "label": "programId", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "borrowAmount", + "type": "t_uint64", + "offset": 4, + "slot": "0" + }, + { + "label": "addonAmount", + "type": "t_uint64", + "offset": 12, + "slot": "0" + }, + { + "label": "startTimestamp", + "type": "t_uint32", + "offset": 20, + "slot": "0" + }, + { + "label": "durationInPeriods", + "type": "t_uint32", + "offset": 24, + "slot": "0" + }, + { + "label": "token", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "borrower", + "type": "t_address", + "offset": 0, + "slot": "2" + }, + { + "label": "interestRatePrimary", + "type": "t_uint32", + "offset": 20, + "slot": "2" + }, + { + "label": "interestRateSecondary", + "type": "t_uint32", + "offset": 24, + "slot": "2" + }, + { + "label": "repaidAmount", + "type": "t_uint64", + "offset": 0, + "slot": "3" + }, + { + "label": "trackedBalance", + "type": "t_uint64", + "offset": 8, + "slot": "3" + }, + { + "label": "trackedTimestamp", + "type": "t_uint32", + "offset": 16, + "slot": "3" + }, + { + "label": "freezeTimestamp", + "type": "t_uint32", + "offset": 20, + "slot": "3" + }, + { + "label": "firstInstallmentId", + "type": "t_uint40", + "offset": 24, + "slot": "3" + }, + { + "label": "installmentCount", + "type": "t_uint8", + "offset": 29, + "slot": "3" + }, + { + "label": "lateFeeAmount", + "type": "t_uint64", + "offset": 0, + "slot": "4" + }, + { + "label": "discountAmount", + "type": "t_uint64", + "offset": 8, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint40": { + "label": "uint40", + "numberOfBytes": "5" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\utils\\PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin\\contracts-upgradeable\\access\\AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "ed9ba409da8a5bd4f5d7693834b72febdedfecda68df55476258b7f5bd165323": { + "address": "0x99faC9190FD887e0FA04668B0f7Ca65C6fb2887e", + "txHash": "0xc1ed44127080db01b7daf55c9d83f13ec7604fc3c52efdffe8f547842c2bd395", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_token", + "offset": 0, + "slot": "0", + "type": "t_address", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:44" + }, + { + "label": "_market", + "offset": 0, + "slot": "1", + "type": "t_address", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:47" + }, + { + "label": "_config", + "offset": 0, + "slot": "2", + "type": "t_struct(CreditLineConfig)7233_storage", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:50" + }, + { + "label": "_borrowerConfigs", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_struct(BorrowerConfig)7256_storage)", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:53" + }, + { + "label": "_borrowerStates", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_struct(BorrowerState)7266_storage)", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:56" + }, + { + "label": "__gap", + "offset": 0, + "slot": "6", + "type": "t_array(t_uint256)45_storage", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:60" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)291_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_enum(BorrowPolicy)7205": { + "label": "enum ICreditLineConfigurable.BorrowPolicy", + "members": [ + "SingleActiveLoan", + "MultipleActiveLoans", + "TotalActiveAmountLimit" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(BorrowerConfig)7256_storage)": { + "label": "mapping(address => struct ICreditLineConfigurable.BorrowerConfig)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(BorrowerState)7266_storage)": { + "label": "mapping(address => struct ICreditLineConfigurable.BorrowerState)", + "numberOfBytes": "32" + }, + "t_struct(BorrowerConfig)7256_storage": { + "label": "struct ICreditLineConfigurable.BorrowerConfig", + "members": [ + { + "label": "expiration", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "minDurationInPeriods", + "type": "t_uint32", + "offset": 4, + "slot": "0" + }, + { + "label": "maxDurationInPeriods", + "type": "t_uint32", + "offset": 8, + "slot": "0" + }, + { + "label": "minBorrowAmount", + "type": "t_uint64", + "offset": 12, + "slot": "0" + }, + { + "label": "maxBorrowAmount", + "type": "t_uint64", + "offset": 20, + "slot": "0" + }, + { + "label": "borrowPolicy", + "type": "t_enum(BorrowPolicy)7205", + "offset": 28, + "slot": "0" + }, + { + "label": "interestRatePrimary", + "type": "t_uint32", + "offset": 0, + "slot": "1" + }, + { + "label": "interestRateSecondary", + "type": "t_uint32", + "offset": 4, + "slot": "1" + }, + { + "label": "addonFixedRate", + "type": "t_uint32", + "offset": 8, + "slot": "1" + }, + { + "label": "addonPeriodRate", + "type": "t_uint32", + "offset": 12, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(BorrowerState)7266_storage": { + "label": "struct ICreditLineConfigurable.BorrowerState", + "members": [ + { + "label": "activeLoanCount", + "type": "t_uint16", + "offset": 0, + "slot": "0" + }, + { + "label": "closedLoanCount", + "type": "t_uint16", + "offset": 2, + "slot": "0" + }, + { + "label": "totalActiveLoanAmount", + "type": "t_uint64", + "offset": 4, + "slot": "0" + }, + { + "label": "totalClosedLoanAmount", + "type": "t_uint64", + "offset": 12, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(CreditLineConfig)7233_storage": { + "label": "struct ICreditLineConfigurable.CreditLineConfig", + "members": [ + { + "label": "minBorrowAmount", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "maxBorrowAmount", + "type": "t_uint64", + "offset": 8, + "slot": "0" + }, + { + "label": "minInterestRatePrimary", + "type": "t_uint32", + "offset": 16, + "slot": "0" + }, + { + "label": "maxInterestRatePrimary", + "type": "t_uint32", + "offset": 20, + "slot": "0" + }, + { + "label": "minInterestRateSecondary", + "type": "t_uint32", + "offset": 24, + "slot": "0" + }, + { + "label": "maxInterestRateSecondary", + "type": "t_uint32", + "offset": 28, + "slot": "0" + }, + { + "label": "minDurationInPeriods", + "type": "t_uint32", + "offset": 0, + "slot": "1" + }, + { + "label": "maxDurationInPeriods", + "type": "t_uint32", + "offset": 4, + "slot": "1" + }, + { + "label": "minAddonFixedRate", + "type": "t_uint32", + "offset": 8, + "slot": "1" + }, + { + "label": "maxAddonFixedRate", + "type": "t_uint32", + "offset": 12, + "slot": "1" + }, + { + "label": "minAddonPeriodRate", + "type": "t_uint32", + "offset": 16, + "slot": "1" + }, + { + "label": "maxAddonPeriodRate", + "type": "t_uint32", + "offset": 20, + "slot": "1" + }, + { + "label": "lateFeeRate", + "type": "t_uint32", + "offset": 24, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\utils\\PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin\\contracts-upgradeable\\access\\AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "f09030c70ddd1f060ca54ada61e02d92bbab255b89ff35fb0cb83120d9dfb0fe": { + "address": "0x702625b72bb4C3383999498E896ae6D09C534aE2", + "txHash": "0xecf53b58367eb856bf65e3d46c2570a7c139f9e8385f41e6349cae1b1e70124c", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_token", + "offset": 0, + "slot": "0", + "type": "t_address", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:46" + }, + { + "label": "_market", + "offset": 0, + "slot": "1", + "type": "t_address", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:49" + }, + { + "label": "_borrowableBalance", + "offset": 20, + "slot": "1", + "type": "t_uint64", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:52" + }, + { + "label": "_addonsBalance", + "offset": 0, + "slot": "2", + "type": "t_uint64", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:59" + }, + { + "label": "_addonTreasury", + "offset": 8, + "slot": "2", + "type": "t_address", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:65" + }, + { + "label": "__gap", + "offset": 0, + "slot": "3", + "type": "t_array(t_uint256)46_storage", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:69" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)291_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_uint256)46_storage": { + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\utils\\PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin\\contracts-upgradeable\\access\\AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "a35440b8b1a240ba84a5bd15671aacb52ad38e00c6ee7d2fb73ca9e4cc0c13b9": { + "address": "0x590a0F90D866630Aa177F53ad2f07d1b8c66a01C", + "txHash": "0xec3edb6b4271df02a6f31e23739eb31226d64a539ffadc5a6fbf681ca61e0250", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_loanIdCounter", + "offset": 0, + "slot": "0", + "type": "t_uint256", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:16" + }, + { + "label": "_programIdCounter", + "offset": 0, + "slot": "1", + "type": "t_uint32", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:19" + }, + { + "label": "_loans", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(State)8705_storage)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:22" + }, + { + "label": "_creditLineLenders", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:25" + }, + { + "label": "_liquidityPoolLenders", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:28" + }, + { + "label": "_programLenders", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:31" + }, + { + "label": "_programCreditLines", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:34" + }, + { + "label": "_programLiquidityPools", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:37" + }, + { + "label": "_hasAlias", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "9", + "type": "t_array(t_uint256)41_storage", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:44" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)291_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_uint256)41_storage": { + "label": "uint256[41]", + "numberOfBytes": "1312" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(State)8705_storage)": { + "label": "mapping(uint256 => struct Loan.State)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_address)": { + "label": "mapping(uint32 => address)", + "numberOfBytes": "32" + }, + "t_struct(State)8705_storage": { + "label": "struct Loan.State", + "members": [ + { + "label": "programId", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "borrowAmount", + "type": "t_uint64", + "offset": 4, + "slot": "0" + }, + { + "label": "addonAmount", + "type": "t_uint64", + "offset": 12, + "slot": "0" + }, + { + "label": "startTimestamp", + "type": "t_uint32", + "offset": 20, + "slot": "0" + }, + { + "label": "durationInPeriods", + "type": "t_uint32", + "offset": 24, + "slot": "0" + }, + { + "label": "token", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "borrower", + "type": "t_address", + "offset": 0, + "slot": "2" + }, + { + "label": "interestRatePrimary", + "type": "t_uint32", + "offset": 20, + "slot": "2" + }, + { + "label": "interestRateSecondary", + "type": "t_uint32", + "offset": 24, + "slot": "2" + }, + { + "label": "repaidAmount", + "type": "t_uint64", + "offset": 0, + "slot": "3" + }, + { + "label": "trackedBalance", + "type": "t_uint64", + "offset": 8, + "slot": "3" + }, + { + "label": "trackedTimestamp", + "type": "t_uint32", + "offset": 16, + "slot": "3" + }, + { + "label": "freezeTimestamp", + "type": "t_uint32", + "offset": 20, + "slot": "3" + }, + { + "label": "firstInstallmentId", + "type": "t_uint40", + "offset": 24, + "slot": "3" + }, + { + "label": "installmentCount", + "type": "t_uint8", + "offset": 29, + "slot": "3" + }, + { + "label": "lateFeeAmount", + "type": "t_uint64", + "offset": 0, + "slot": "4" + }, + { + "label": "discountAmount", + "type": "t_uint64", + "offset": 8, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint40": { + "label": "uint40", + "numberOfBytes": "5" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\utils\\PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin\\contracts-upgradeable\\access\\AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } } } } diff --git a/.openzeppelin/unknown-2009.json b/.openzeppelin/unknown-2009.json index e9dac48b..68b40ac9 100644 --- a/.openzeppelin/unknown-2009.json +++ b/.openzeppelin/unknown-2009.json @@ -10329,6 +10329,1311 @@ ] } } + }, + "488162096a8887d962d3d46cd71bc11ff08bc31d258acdb37714ca930bbab404": { + "address": "0xD657A9d7171A3851bd5799ef9908e6479e912d6B", + "txHash": "0x2664430edde7f111d8d57ea44f9feec98920082dc4151fa9e8a07200fdaf974b", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_loanIdCounter", + "offset": 0, + "slot": "0", + "type": "t_uint256", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:16" + }, + { + "label": "_programIdCounter", + "offset": 0, + "slot": "1", + "type": "t_uint32", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:19" + }, + { + "label": "_loans", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(State)8728_storage)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:22" + }, + { + "label": "_creditLineLenders", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:25" + }, + { + "label": "_liquidityPoolLenders", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:28" + }, + { + "label": "_programLenders", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:31" + }, + { + "label": "_programCreditLines", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:34" + }, + { + "label": "_programLiquidityPools", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:37" + }, + { + "label": "_hasAlias", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "9", + "type": "t_array(t_uint256)41_storage", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:44" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)291_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_uint256)41_storage": { + "label": "uint256[41]", + "numberOfBytes": "1312" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(State)8728_storage)": { + "label": "mapping(uint256 => struct Loan.State)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_address)": { + "label": "mapping(uint32 => address)", + "numberOfBytes": "32" + }, + "t_struct(State)8728_storage": { + "label": "struct Loan.State", + "members": [ + { + "label": "programId", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "borrowAmount", + "type": "t_uint64", + "offset": 4, + "slot": "0" + }, + { + "label": "addonAmount", + "type": "t_uint64", + "offset": 12, + "slot": "0" + }, + { + "label": "startTimestamp", + "type": "t_uint32", + "offset": 20, + "slot": "0" + }, + { + "label": "durationInPeriods", + "type": "t_uint32", + "offset": 24, + "slot": "0" + }, + { + "label": "token", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "borrower", + "type": "t_address", + "offset": 0, + "slot": "2" + }, + { + "label": "interestRatePrimary", + "type": "t_uint32", + "offset": 20, + "slot": "2" + }, + { + "label": "interestRateSecondary", + "type": "t_uint32", + "offset": 24, + "slot": "2" + }, + { + "label": "repaidAmount", + "type": "t_uint64", + "offset": 0, + "slot": "3" + }, + { + "label": "trackedBalance", + "type": "t_uint64", + "offset": 8, + "slot": "3" + }, + { + "label": "trackedTimestamp", + "type": "t_uint32", + "offset": 16, + "slot": "3" + }, + { + "label": "freezeTimestamp", + "type": "t_uint32", + "offset": 20, + "slot": "3" + }, + { + "label": "firstInstallmentId", + "type": "t_uint40", + "offset": 24, + "slot": "3" + }, + { + "label": "installmentCount", + "type": "t_uint8", + "offset": 29, + "slot": "3" + }, + { + "label": "lateFeeAmount", + "type": "t_uint64", + "offset": 0, + "slot": "4" + }, + { + "label": "discountAmount", + "type": "t_uint64", + "offset": 8, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint40": { + "label": "uint40", + "numberOfBytes": "5" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\utils\\PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin\\contracts-upgradeable\\access\\AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "ed9ba409da8a5bd4f5d7693834b72febdedfecda68df55476258b7f5bd165323": { + "address": "0xC6F6bf6B5E44BA9FF42d5284fF56bc7D0568C33c", + "txHash": "0xfcbbdbc6cb3d8848d2513343e13b789eb83843f26737510420afcb7fb41daba0", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_token", + "offset": 0, + "slot": "0", + "type": "t_address", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:44" + }, + { + "label": "_market", + "offset": 0, + "slot": "1", + "type": "t_address", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:47" + }, + { + "label": "_config", + "offset": 0, + "slot": "2", + "type": "t_struct(CreditLineConfig)7256_storage", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:50" + }, + { + "label": "_borrowerConfigs", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_struct(BorrowerConfig)7279_storage)", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:53" + }, + { + "label": "_borrowerStates", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_struct(BorrowerState)7289_storage)", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:56" + }, + { + "label": "__gap", + "offset": 0, + "slot": "6", + "type": "t_array(t_uint256)45_storage", + "contract": "CreditLineConfigurable", + "src": "contracts\\credit-lines\\CreditLineConfigurable.sol:60" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)291_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_enum(BorrowPolicy)7228": { + "label": "enum ICreditLineConfigurable.BorrowPolicy", + "members": [ + "SingleActiveLoan", + "MultipleActiveLoans", + "TotalActiveAmountLimit" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(BorrowerConfig)7279_storage)": { + "label": "mapping(address => struct ICreditLineConfigurable.BorrowerConfig)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(BorrowerState)7289_storage)": { + "label": "mapping(address => struct ICreditLineConfigurable.BorrowerState)", + "numberOfBytes": "32" + }, + "t_struct(BorrowerConfig)7279_storage": { + "label": "struct ICreditLineConfigurable.BorrowerConfig", + "members": [ + { + "label": "expiration", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "minDurationInPeriods", + "type": "t_uint32", + "offset": 4, + "slot": "0" + }, + { + "label": "maxDurationInPeriods", + "type": "t_uint32", + "offset": 8, + "slot": "0" + }, + { + "label": "minBorrowAmount", + "type": "t_uint64", + "offset": 12, + "slot": "0" + }, + { + "label": "maxBorrowAmount", + "type": "t_uint64", + "offset": 20, + "slot": "0" + }, + { + "label": "borrowPolicy", + "type": "t_enum(BorrowPolicy)7228", + "offset": 28, + "slot": "0" + }, + { + "label": "interestRatePrimary", + "type": "t_uint32", + "offset": 0, + "slot": "1" + }, + { + "label": "interestRateSecondary", + "type": "t_uint32", + "offset": 4, + "slot": "1" + }, + { + "label": "addonFixedRate", + "type": "t_uint32", + "offset": 8, + "slot": "1" + }, + { + "label": "addonPeriodRate", + "type": "t_uint32", + "offset": 12, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(BorrowerState)7289_storage": { + "label": "struct ICreditLineConfigurable.BorrowerState", + "members": [ + { + "label": "activeLoanCount", + "type": "t_uint16", + "offset": 0, + "slot": "0" + }, + { + "label": "closedLoanCount", + "type": "t_uint16", + "offset": 2, + "slot": "0" + }, + { + "label": "totalActiveLoanAmount", + "type": "t_uint64", + "offset": 4, + "slot": "0" + }, + { + "label": "totalClosedLoanAmount", + "type": "t_uint64", + "offset": 12, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(CreditLineConfig)7256_storage": { + "label": "struct ICreditLineConfigurable.CreditLineConfig", + "members": [ + { + "label": "minBorrowAmount", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "maxBorrowAmount", + "type": "t_uint64", + "offset": 8, + "slot": "0" + }, + { + "label": "minInterestRatePrimary", + "type": "t_uint32", + "offset": 16, + "slot": "0" + }, + { + "label": "maxInterestRatePrimary", + "type": "t_uint32", + "offset": 20, + "slot": "0" + }, + { + "label": "minInterestRateSecondary", + "type": "t_uint32", + "offset": 24, + "slot": "0" + }, + { + "label": "maxInterestRateSecondary", + "type": "t_uint32", + "offset": 28, + "slot": "0" + }, + { + "label": "minDurationInPeriods", + "type": "t_uint32", + "offset": 0, + "slot": "1" + }, + { + "label": "maxDurationInPeriods", + "type": "t_uint32", + "offset": 4, + "slot": "1" + }, + { + "label": "minAddonFixedRate", + "type": "t_uint32", + "offset": 8, + "slot": "1" + }, + { + "label": "maxAddonFixedRate", + "type": "t_uint32", + "offset": 12, + "slot": "1" + }, + { + "label": "minAddonPeriodRate", + "type": "t_uint32", + "offset": 16, + "slot": "1" + }, + { + "label": "maxAddonPeriodRate", + "type": "t_uint32", + "offset": 20, + "slot": "1" + }, + { + "label": "lateFeeRate", + "type": "t_uint32", + "offset": 24, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\utils\\PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin\\contracts-upgradeable\\access\\AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "f09030c70ddd1f060ca54ada61e02d92bbab255b89ff35fb0cb83120d9dfb0fe": { + "address": "0x43759A702ccfd8E8648029cD1E21a3B5E8315e94", + "txHash": "0xee63434fd3876bf7739fc940a7818bbcf5d24341b3729e1a1e23952407097543", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_token", + "offset": 0, + "slot": "0", + "type": "t_address", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:46" + }, + { + "label": "_market", + "offset": 0, + "slot": "1", + "type": "t_address", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:49" + }, + { + "label": "_borrowableBalance", + "offset": 20, + "slot": "1", + "type": "t_uint64", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:52" + }, + { + "label": "_addonsBalance", + "offset": 0, + "slot": "2", + "type": "t_uint64", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:59" + }, + { + "label": "_addonTreasury", + "offset": 8, + "slot": "2", + "type": "t_address", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:65" + }, + { + "label": "__gap", + "offset": 0, + "slot": "3", + "type": "t_array(t_uint256)46_storage", + "contract": "LiquidityPoolAccountable", + "src": "contracts\\liquidity-pools\\LiquidityPoolAccountable.sol:69" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)291_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_uint256)46_storage": { + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\utils\\PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin\\contracts-upgradeable\\access\\AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } + }, + "a35440b8b1a240ba84a5bd15671aacb52ad38e00c6ee7d2fb73ca9e4cc0c13b9": { + "address": "0xCD19c42aeda2E84c3026b9F283F96Ac6C05ACEE1", + "txHash": "0x0b7f143b0e9e6b1b077255769b279c2edae6e75ceba9cfd2cd9eb191fb5a2826", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_loanIdCounter", + "offset": 0, + "slot": "0", + "type": "t_uint256", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:16" + }, + { + "label": "_programIdCounter", + "offset": 0, + "slot": "1", + "type": "t_uint32", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:19" + }, + { + "label": "_loans", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(State)8705_storage)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:22" + }, + { + "label": "_creditLineLenders", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:25" + }, + { + "label": "_liquidityPoolLenders", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:28" + }, + { + "label": "_programLenders", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:31" + }, + { + "label": "_programCreditLines", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:34" + }, + { + "label": "_programLiquidityPools", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint32,t_address)", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:37" + }, + { + "label": "_hasAlias", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "9", + "type": "t_array(t_uint256)41_storage", + "contract": "LendingMarketStorage", + "src": "contracts\\LendingMarketStorage.sol:44" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)24_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(AccessControlStorage)34_storage": { + "label": "struct AccessControlUpgradeable.AccessControlStorage", + "members": [ + { + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)145_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PausableStorage)291_storage": { + "label": "struct PausableUpgradeable.PausableStorage", + "members": [ + { + "label": "_paused", + "type": "t_bool", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)24_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "hasRole", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_array(t_uint256)41_storage": { + "label": "uint256[41]", + "numberOfBytes": "1312" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(State)8705_storage)": { + "label": "mapping(uint256 => struct Loan.State)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_address)": { + "label": "mapping(uint32 => address)", + "numberOfBytes": "32" + }, + "t_struct(State)8705_storage": { + "label": "struct Loan.State", + "members": [ + { + "label": "programId", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "borrowAmount", + "type": "t_uint64", + "offset": 4, + "slot": "0" + }, + { + "label": "addonAmount", + "type": "t_uint64", + "offset": 12, + "slot": "0" + }, + { + "label": "startTimestamp", + "type": "t_uint32", + "offset": 20, + "slot": "0" + }, + { + "label": "durationInPeriods", + "type": "t_uint32", + "offset": 24, + "slot": "0" + }, + { + "label": "token", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "borrower", + "type": "t_address", + "offset": 0, + "slot": "2" + }, + { + "label": "interestRatePrimary", + "type": "t_uint32", + "offset": 20, + "slot": "2" + }, + { + "label": "interestRateSecondary", + "type": "t_uint32", + "offset": 24, + "slot": "2" + }, + { + "label": "repaidAmount", + "type": "t_uint64", + "offset": 0, + "slot": "3" + }, + { + "label": "trackedBalance", + "type": "t_uint64", + "offset": 8, + "slot": "3" + }, + { + "label": "trackedTimestamp", + "type": "t_uint32", + "offset": 16, + "slot": "3" + }, + { + "label": "freezeTimestamp", + "type": "t_uint32", + "offset": 20, + "slot": "3" + }, + { + "label": "firstInstallmentId", + "type": "t_uint40", + "offset": 24, + "slot": "3" + }, + { + "label": "installmentCount", + "type": "t_uint8", + "offset": 29, + "slot": "3" + }, + { + "label": "lateFeeAmount", + "type": "t_uint64", + "offset": 0, + "slot": "4" + }, + { + "label": "discountAmount", + "type": "t_uint64", + "offset": 8, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint40": { + "label": "uint40", + "numberOfBytes": "5" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": { + "erc7201:openzeppelin.storage.Pausable": [ + { + "contract": "PausableUpgradeable", + "label": "_paused", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\utils\\PausableUpgradeable.sol:21", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.AccessControl": [ + { + "contract": "AccessControlUpgradeable", + "label": "_roles", + "type": "t_mapping(t_bytes32,t_struct(RoleData)24_storage)", + "src": "@openzeppelin\\contracts-upgradeable\\access\\AccessControlUpgradeable.sol:61", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } } } } diff --git a/contracts/common/interfaces/core/ILendingMarket.sol b/contracts/common/interfaces/core/ILendingMarket.sol index ca5afd95..ea065a40 100644 --- a/contracts/common/interfaces/core/ILendingMarket.sol +++ b/contracts/common/interfaces/core/ILendingMarket.sol @@ -234,9 +234,10 @@ interface ILendingMarket { /// @dev Repays a batch of loans. /// /// Can be called only by an account with a special role. + /// Using `type(uint256).max` for the `repaymentAmount` will repay the remaining balance of the loan. /// /// @param loanIds The unique identifiers of the loans to repay. - /// @param repaymentAmounts The amounts to repay for each loan. + /// @param repaymentAmounts The amounts to repay for each loan in the batch. /// @param repayer The address of the token source for the repayments (borrower or third-party). function repayLoanForBatch( uint256[] calldata loanIds, @@ -245,8 +246,12 @@ interface ILendingMarket { ) external; /// @dev Discounts a batch of loans. + /// + /// Can be called only by an account with a special role. + /// Using `type(uint256).max` for the `discountAmount` will discount the remaining balance of the loan. + /// /// @param loanIds The unique identifiers of the loans to discount. - /// @param discountAmounts The amounts to discount for each loan. + /// @param discountAmounts The amounts to discount for each loan in the batch. function discountLoanForBatch( uint256[] calldata loanIds, // Tools: this comment prevents Prettier from formatting into a single line. uint256[] calldata discountAmounts