@gearbox-protocol/deploy-tools 5.1.6 → 5.2.1

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2509 -673
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -139290,7 +139290,7 @@ var require_filesystem = __commonJS({
139290
139290
  var fs3 = __require("fs");
139291
139291
  var LDD_PATH = "/usr/bin/ldd";
139292
139292
  var readFileSync = (path11) => fs3.readFileSync(path11, "utf-8");
139293
- var readFile10 = (path11) => new Promise((resolve2, reject) => {
139293
+ var readFile9 = (path11) => new Promise((resolve2, reject) => {
139294
139294
  fs3.readFile(path11, "utf-8", (err, data) => {
139295
139295
  if (err) {
139296
139296
  reject(err);
@@ -139302,7 +139302,7 @@ var require_filesystem = __commonJS({
139302
139302
  module2.exports = {
139303
139303
  LDD_PATH,
139304
139304
  readFileSync,
139305
- readFile: readFile10
139305
+ readFile: readFile9
139306
139306
  };
139307
139307
  }
139308
139308
  });
@@ -139313,7 +139313,7 @@ var require_detect_libc = __commonJS({
139313
139313
  "use strict";
139314
139314
  var childProcess = __require("child_process");
139315
139315
  var { isLinux, getReport } = require_process();
139316
- var { LDD_PATH, readFile: readFile10, readFileSync } = require_filesystem();
139316
+ var { LDD_PATH, readFile: readFile9, readFileSync } = require_filesystem();
139317
139317
  var cachedFamilyFilesystem;
139318
139318
  var cachedVersionFilesystem;
139319
139319
  var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
@@ -139380,7 +139380,7 @@ var require_detect_libc = __commonJS({
139380
139380
  }
139381
139381
  cachedFamilyFilesystem = null;
139382
139382
  try {
139383
- const lddContent = await readFile10(LDD_PATH);
139383
+ const lddContent = await readFile9(LDD_PATH);
139384
139384
  cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
139385
139385
  } catch (e) {
139386
139386
  }
@@ -139434,7 +139434,7 @@ var require_detect_libc = __commonJS({
139434
139434
  }
139435
139435
  cachedVersionFilesystem = null;
139436
139436
  try {
139437
- const lddContent = await readFile10(LDD_PATH);
139437
+ const lddContent = await readFile9(LDD_PATH);
139438
139438
  const versionMatch = lddContent.match(RE_GLIBC_VERSION);
139439
139439
  if (versionMatch) {
139440
139440
  cachedVersionFilesystem = versionMatch[1];
@@ -332786,103 +332786,262 @@ var import_sdk_gov = __toESM(require_lib37(), 1);
332786
332786
  var iCreditAccountCompressorAbi = [
332787
332787
  {
332788
332788
  type: "function",
332789
- inputs: [],
332790
332789
  name: "contractType",
332791
- outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
332790
+ inputs: [],
332791
+ outputs: [
332792
+ {
332793
+ name: "",
332794
+ type: "bytes32",
332795
+ internalType: "bytes32"
332796
+ }
332797
+ ],
332792
332798
  stateMutability: "view"
332793
332799
  },
332794
332800
  {
332795
332801
  type: "function",
332802
+ name: "countCreditAccounts",
332796
332803
  inputs: [
332797
- { name: "creditManager", internalType: "address", type: "address" },
332804
+ {
332805
+ name: "creditManager",
332806
+ type: "address",
332807
+ internalType: "address"
332808
+ },
332798
332809
  {
332799
332810
  name: "caFilter",
332800
- internalType: "struct CreditAccountFilter",
332801
332811
  type: "tuple",
332812
+ internalType: "struct CreditAccountFilter",
332802
332813
  components: [
332803
- { name: "owner", internalType: "address", type: "address" },
332804
- { name: "includeZeroDebt", internalType: "bool", type: "bool" },
332805
- { name: "minHealthFactor", internalType: "uint16", type: "uint16" },
332806
- { name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
332807
- { name: "reverting", internalType: "bool", type: "bool" }
332814
+ {
332815
+ name: "owner",
332816
+ type: "address",
332817
+ internalType: "address"
332818
+ },
332819
+ {
332820
+ name: "includeZeroDebt",
332821
+ type: "bool",
332822
+ internalType: "bool"
332823
+ },
332824
+ {
332825
+ name: "minHealthFactor",
332826
+ type: "uint16",
332827
+ internalType: "uint16"
332828
+ },
332829
+ {
332830
+ name: "maxHealthFactor",
332831
+ type: "uint16",
332832
+ internalType: "uint16"
332833
+ },
332834
+ {
332835
+ name: "reverting",
332836
+ type: "bool",
332837
+ internalType: "bool"
332838
+ }
332808
332839
  ]
332809
332840
  }
332810
332841
  ],
332811
- name: "countCreditAccounts",
332812
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
332842
+ outputs: [
332843
+ {
332844
+ name: "",
332845
+ type: "uint256",
332846
+ internalType: "uint256"
332847
+ }
332848
+ ],
332813
332849
  stateMutability: "view"
332814
332850
  },
332815
332851
  {
332816
332852
  type: "function",
332853
+ name: "countCreditAccounts",
332817
332854
  inputs: [
332818
332855
  {
332819
332856
  name: "cmFilter",
332820
- internalType: "struct MarketFilter",
332821
332857
  type: "tuple",
332858
+ internalType: "struct MarketFilter",
332822
332859
  components: [
332823
- { name: "curators", internalType: "address[]", type: "address[]" },
332824
- { name: "pools", internalType: "address[]", type: "address[]" },
332825
- { name: "underlying", internalType: "address", type: "address" }
332860
+ {
332861
+ name: "configurators",
332862
+ type: "address[]",
332863
+ internalType: "address[]"
332864
+ },
332865
+ {
332866
+ name: "pools",
332867
+ type: "address[]",
332868
+ internalType: "address[]"
332869
+ },
332870
+ {
332871
+ name: "underlying",
332872
+ type: "address",
332873
+ internalType: "address"
332874
+ }
332826
332875
  ]
332827
332876
  },
332828
332877
  {
332829
332878
  name: "caFilter",
332830
- internalType: "struct CreditAccountFilter",
332831
332879
  type: "tuple",
332880
+ internalType: "struct CreditAccountFilter",
332832
332881
  components: [
332833
- { name: "owner", internalType: "address", type: "address" },
332834
- { name: "includeZeroDebt", internalType: "bool", type: "bool" },
332835
- { name: "minHealthFactor", internalType: "uint16", type: "uint16" },
332836
- { name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
332837
- { name: "reverting", internalType: "bool", type: "bool" }
332882
+ {
332883
+ name: "owner",
332884
+ type: "address",
332885
+ internalType: "address"
332886
+ },
332887
+ {
332888
+ name: "includeZeroDebt",
332889
+ type: "bool",
332890
+ internalType: "bool"
332891
+ },
332892
+ {
332893
+ name: "minHealthFactor",
332894
+ type: "uint16",
332895
+ internalType: "uint16"
332896
+ },
332897
+ {
332898
+ name: "maxHealthFactor",
332899
+ type: "uint16",
332900
+ internalType: "uint16"
332901
+ },
332902
+ {
332903
+ name: "reverting",
332904
+ type: "bool",
332905
+ internalType: "bool"
332906
+ }
332838
332907
  ]
332839
332908
  }
332840
332909
  ],
332841
- name: "countCreditAccounts",
332842
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
332910
+ outputs: [
332911
+ {
332912
+ name: "",
332913
+ type: "uint256",
332914
+ internalType: "uint256"
332915
+ }
332916
+ ],
332843
332917
  stateMutability: "view"
332844
332918
  },
332845
332919
  {
332846
332920
  type: "function",
332921
+ name: "getCreditAccountData",
332847
332922
  inputs: [
332848
- { name: "creditAccount", internalType: "address", type: "address" }
332923
+ {
332924
+ name: "creditAccount",
332925
+ type: "address",
332926
+ internalType: "address"
332927
+ }
332849
332928
  ],
332850
- name: "getCreditAccountData",
332851
332929
  outputs: [
332852
332930
  {
332853
332931
  name: "",
332854
- internalType: "struct CreditAccountData",
332855
332932
  type: "tuple",
332933
+ internalType: "struct CreditAccountData",
332856
332934
  components: [
332857
- { name: "creditAccount", internalType: "address", type: "address" },
332858
- { name: "creditManager", internalType: "address", type: "address" },
332859
- { name: "creditFacade", internalType: "address", type: "address" },
332860
- { name: "underlying", internalType: "address", type: "address" },
332861
- { name: "owner", internalType: "address", type: "address" },
332935
+ {
332936
+ name: "creditAccount",
332937
+ type: "address",
332938
+ internalType: "address"
332939
+ },
332940
+ {
332941
+ name: "creditManager",
332942
+ type: "address",
332943
+ internalType: "address"
332944
+ },
332945
+ {
332946
+ name: "creditFacade",
332947
+ type: "address",
332948
+ internalType: "address"
332949
+ },
332950
+ {
332951
+ name: "underlying",
332952
+ type: "address",
332953
+ internalType: "address"
332954
+ },
332955
+ {
332956
+ name: "owner",
332957
+ type: "address",
332958
+ internalType: "address"
332959
+ },
332960
+ {
332961
+ name: "expirationDate",
332962
+ type: "uint40",
332963
+ internalType: "uint40"
332964
+ },
332862
332965
  {
332863
332966
  name: "enabledTokensMask",
332864
- internalType: "uint256",
332865
- type: "uint256"
332967
+ type: "uint256",
332968
+ internalType: "uint256"
332969
+ },
332970
+ {
332971
+ name: "debt",
332972
+ type: "uint256",
332973
+ internalType: "uint256"
332974
+ },
332975
+ {
332976
+ name: "accruedInterest",
332977
+ type: "uint256",
332978
+ internalType: "uint256"
332979
+ },
332980
+ {
332981
+ name: "accruedFees",
332982
+ type: "uint256",
332983
+ internalType: "uint256"
332984
+ },
332985
+ {
332986
+ name: "totalDebtUSD",
332987
+ type: "uint256",
332988
+ internalType: "uint256"
332989
+ },
332990
+ {
332991
+ name: "totalValueUSD",
332992
+ type: "uint256",
332993
+ internalType: "uint256"
332994
+ },
332995
+ {
332996
+ name: "twvUSD",
332997
+ type: "uint256",
332998
+ internalType: "uint256"
332999
+ },
333000
+ {
333001
+ name: "totalValue",
333002
+ type: "uint256",
333003
+ internalType: "uint256"
333004
+ },
333005
+ {
333006
+ name: "healthFactor",
333007
+ type: "uint16",
333008
+ internalType: "uint16"
333009
+ },
333010
+ {
333011
+ name: "success",
333012
+ type: "bool",
333013
+ internalType: "bool"
332866
333014
  },
332867
- { name: "debt", internalType: "uint256", type: "uint256" },
332868
- { name: "accruedInterest", internalType: "uint256", type: "uint256" },
332869
- { name: "accruedFees", internalType: "uint256", type: "uint256" },
332870
- { name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
332871
- { name: "totalValueUSD", internalType: "uint256", type: "uint256" },
332872
- { name: "twvUSD", internalType: "uint256", type: "uint256" },
332873
- { name: "totalValue", internalType: "uint256", type: "uint256" },
332874
- { name: "healthFactor", internalType: "uint16", type: "uint16" },
332875
- { name: "success", internalType: "bool", type: "bool" },
332876
333015
  {
332877
333016
  name: "tokens",
332878
- internalType: "struct TokenInfo[]",
332879
333017
  type: "tuple[]",
333018
+ internalType: "struct TokenInfo[]",
332880
333019
  components: [
332881
- { name: "token", internalType: "address", type: "address" },
332882
- { name: "mask", internalType: "uint256", type: "uint256" },
332883
- { name: "balance", internalType: "uint256", type: "uint256" },
332884
- { name: "quota", internalType: "uint256", type: "uint256" },
332885
- { name: "success", internalType: "bool", type: "bool" }
333020
+ {
333021
+ name: "token",
333022
+ type: "address",
333023
+ internalType: "address"
333024
+ },
333025
+ {
333026
+ name: "mask",
333027
+ type: "uint256",
333028
+ internalType: "uint256"
333029
+ },
333030
+ {
333031
+ name: "balance",
333032
+ type: "uint256",
333033
+ internalType: "uint256"
333034
+ },
333035
+ {
333036
+ name: "quota",
333037
+ type: "uint256",
333038
+ internalType: "uint256"
333039
+ },
333040
+ {
333041
+ name: "success",
333042
+ type: "bool",
333043
+ internalType: "bool"
333044
+ }
332886
333045
  ]
332887
333046
  }
332888
333047
  ]
@@ -332892,277 +333051,759 @@ var iCreditAccountCompressorAbi = [
332892
333051
  },
332893
333052
  {
332894
333053
  type: "function",
333054
+ name: "getCreditAccounts",
332895
333055
  inputs: [
332896
333056
  {
332897
333057
  name: "cmFilter",
332898
- internalType: "struct MarketFilter",
332899
333058
  type: "tuple",
333059
+ internalType: "struct MarketFilter",
332900
333060
  components: [
332901
- { name: "curators", internalType: "address[]", type: "address[]" },
332902
- { name: "pools", internalType: "address[]", type: "address[]" },
332903
- { name: "underlying", internalType: "address", type: "address" }
333061
+ {
333062
+ name: "configurators",
333063
+ type: "address[]",
333064
+ internalType: "address[]"
333065
+ },
333066
+ {
333067
+ name: "pools",
333068
+ type: "address[]",
333069
+ internalType: "address[]"
333070
+ },
333071
+ {
333072
+ name: "underlying",
333073
+ type: "address",
333074
+ internalType: "address"
333075
+ }
332904
333076
  ]
332905
333077
  },
332906
333078
  {
332907
333079
  name: "caFilter",
332908
- internalType: "struct CreditAccountFilter",
332909
333080
  type: "tuple",
333081
+ internalType: "struct CreditAccountFilter",
332910
333082
  components: [
332911
- { name: "owner", internalType: "address", type: "address" },
332912
- { name: "includeZeroDebt", internalType: "bool", type: "bool" },
332913
- { name: "minHealthFactor", internalType: "uint16", type: "uint16" },
332914
- { name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
332915
- { name: "reverting", internalType: "bool", type: "bool" }
333083
+ {
333084
+ name: "owner",
333085
+ type: "address",
333086
+ internalType: "address"
333087
+ },
333088
+ {
333089
+ name: "includeZeroDebt",
333090
+ type: "bool",
333091
+ internalType: "bool"
333092
+ },
333093
+ {
333094
+ name: "minHealthFactor",
333095
+ type: "uint16",
333096
+ internalType: "uint16"
333097
+ },
333098
+ {
333099
+ name: "maxHealthFactor",
333100
+ type: "uint16",
333101
+ internalType: "uint16"
333102
+ },
333103
+ {
333104
+ name: "reverting",
333105
+ type: "bool",
333106
+ internalType: "bool"
333107
+ }
332916
333108
  ]
332917
333109
  },
332918
- { name: "offset", internalType: "uint256", type: "uint256" }
333110
+ {
333111
+ name: "offset",
333112
+ type: "uint256",
333113
+ internalType: "uint256"
333114
+ }
332919
333115
  ],
332920
- name: "getCreditAccounts",
332921
333116
  outputs: [
332922
333117
  {
332923
333118
  name: "data",
332924
- internalType: "struct CreditAccountData[]",
332925
333119
  type: "tuple[]",
333120
+ internalType: "struct CreditAccountData[]",
332926
333121
  components: [
332927
- { name: "creditAccount", internalType: "address", type: "address" },
332928
- { name: "creditManager", internalType: "address", type: "address" },
332929
- { name: "creditFacade", internalType: "address", type: "address" },
332930
- { name: "underlying", internalType: "address", type: "address" },
332931
- { name: "owner", internalType: "address", type: "address" },
333122
+ {
333123
+ name: "creditAccount",
333124
+ type: "address",
333125
+ internalType: "address"
333126
+ },
333127
+ {
333128
+ name: "creditManager",
333129
+ type: "address",
333130
+ internalType: "address"
333131
+ },
333132
+ {
333133
+ name: "creditFacade",
333134
+ type: "address",
333135
+ internalType: "address"
333136
+ },
333137
+ {
333138
+ name: "underlying",
333139
+ type: "address",
333140
+ internalType: "address"
333141
+ },
333142
+ {
333143
+ name: "owner",
333144
+ type: "address",
333145
+ internalType: "address"
333146
+ },
333147
+ {
333148
+ name: "expirationDate",
333149
+ type: "uint40",
333150
+ internalType: "uint40"
333151
+ },
332932
333152
  {
332933
333153
  name: "enabledTokensMask",
332934
- internalType: "uint256",
332935
- type: "uint256"
333154
+ type: "uint256",
333155
+ internalType: "uint256"
333156
+ },
333157
+ {
333158
+ name: "debt",
333159
+ type: "uint256",
333160
+ internalType: "uint256"
333161
+ },
333162
+ {
333163
+ name: "accruedInterest",
333164
+ type: "uint256",
333165
+ internalType: "uint256"
333166
+ },
333167
+ {
333168
+ name: "accruedFees",
333169
+ type: "uint256",
333170
+ internalType: "uint256"
333171
+ },
333172
+ {
333173
+ name: "totalDebtUSD",
333174
+ type: "uint256",
333175
+ internalType: "uint256"
333176
+ },
333177
+ {
333178
+ name: "totalValueUSD",
333179
+ type: "uint256",
333180
+ internalType: "uint256"
333181
+ },
333182
+ {
333183
+ name: "twvUSD",
333184
+ type: "uint256",
333185
+ internalType: "uint256"
333186
+ },
333187
+ {
333188
+ name: "totalValue",
333189
+ type: "uint256",
333190
+ internalType: "uint256"
333191
+ },
333192
+ {
333193
+ name: "healthFactor",
333194
+ type: "uint16",
333195
+ internalType: "uint16"
333196
+ },
333197
+ {
333198
+ name: "success",
333199
+ type: "bool",
333200
+ internalType: "bool"
332936
333201
  },
332937
- { name: "debt", internalType: "uint256", type: "uint256" },
332938
- { name: "accruedInterest", internalType: "uint256", type: "uint256" },
332939
- { name: "accruedFees", internalType: "uint256", type: "uint256" },
332940
- { name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
332941
- { name: "totalValueUSD", internalType: "uint256", type: "uint256" },
332942
- { name: "twvUSD", internalType: "uint256", type: "uint256" },
332943
- { name: "totalValue", internalType: "uint256", type: "uint256" },
332944
- { name: "healthFactor", internalType: "uint16", type: "uint16" },
332945
- { name: "success", internalType: "bool", type: "bool" },
332946
333202
  {
332947
333203
  name: "tokens",
332948
- internalType: "struct TokenInfo[]",
332949
333204
  type: "tuple[]",
333205
+ internalType: "struct TokenInfo[]",
332950
333206
  components: [
332951
- { name: "token", internalType: "address", type: "address" },
332952
- { name: "mask", internalType: "uint256", type: "uint256" },
332953
- { name: "balance", internalType: "uint256", type: "uint256" },
332954
- { name: "quota", internalType: "uint256", type: "uint256" },
332955
- { name: "success", internalType: "bool", type: "bool" }
333207
+ {
333208
+ name: "token",
333209
+ type: "address",
333210
+ internalType: "address"
333211
+ },
333212
+ {
333213
+ name: "mask",
333214
+ type: "uint256",
333215
+ internalType: "uint256"
333216
+ },
333217
+ {
333218
+ name: "balance",
333219
+ type: "uint256",
333220
+ internalType: "uint256"
333221
+ },
333222
+ {
333223
+ name: "quota",
333224
+ type: "uint256",
333225
+ internalType: "uint256"
333226
+ },
333227
+ {
333228
+ name: "success",
333229
+ type: "bool",
333230
+ internalType: "bool"
333231
+ }
332956
333232
  ]
332957
333233
  }
332958
333234
  ]
332959
333235
  },
332960
- { name: "nextOffset", internalType: "uint256", type: "uint256" }
333236
+ {
333237
+ name: "nextOffset",
333238
+ type: "uint256",
333239
+ internalType: "uint256"
333240
+ }
332961
333241
  ],
332962
333242
  stateMutability: "view"
332963
333243
  },
332964
333244
  {
332965
333245
  type: "function",
333246
+ name: "getCreditAccounts",
332966
333247
  inputs: [
332967
- { name: "creditManager", internalType: "address", type: "address" },
333248
+ {
333249
+ name: "creditManager",
333250
+ type: "address",
333251
+ internalType: "address"
333252
+ },
332968
333253
  {
332969
333254
  name: "caFilter",
332970
- internalType: "struct CreditAccountFilter",
332971
333255
  type: "tuple",
333256
+ internalType: "struct CreditAccountFilter",
332972
333257
  components: [
332973
- { name: "owner", internalType: "address", type: "address" },
332974
- { name: "includeZeroDebt", internalType: "bool", type: "bool" },
332975
- { name: "minHealthFactor", internalType: "uint16", type: "uint16" },
332976
- { name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
332977
- { name: "reverting", internalType: "bool", type: "bool" }
333258
+ {
333259
+ name: "owner",
333260
+ type: "address",
333261
+ internalType: "address"
333262
+ },
333263
+ {
333264
+ name: "includeZeroDebt",
333265
+ type: "bool",
333266
+ internalType: "bool"
333267
+ },
333268
+ {
333269
+ name: "minHealthFactor",
333270
+ type: "uint16",
333271
+ internalType: "uint16"
333272
+ },
333273
+ {
333274
+ name: "maxHealthFactor",
333275
+ type: "uint16",
333276
+ internalType: "uint16"
333277
+ },
333278
+ {
333279
+ name: "reverting",
333280
+ type: "bool",
333281
+ internalType: "bool"
333282
+ }
332978
333283
  ]
332979
333284
  },
332980
- { name: "offset", internalType: "uint256", type: "uint256" }
333285
+ {
333286
+ name: "offset",
333287
+ type: "uint256",
333288
+ internalType: "uint256"
333289
+ }
332981
333290
  ],
332982
- name: "getCreditAccounts",
332983
333291
  outputs: [
332984
333292
  {
332985
333293
  name: "data",
332986
- internalType: "struct CreditAccountData[]",
332987
333294
  type: "tuple[]",
333295
+ internalType: "struct CreditAccountData[]",
332988
333296
  components: [
332989
- { name: "creditAccount", internalType: "address", type: "address" },
332990
- { name: "creditManager", internalType: "address", type: "address" },
332991
- { name: "creditFacade", internalType: "address", type: "address" },
332992
- { name: "underlying", internalType: "address", type: "address" },
332993
- { name: "owner", internalType: "address", type: "address" },
333297
+ {
333298
+ name: "creditAccount",
333299
+ type: "address",
333300
+ internalType: "address"
333301
+ },
333302
+ {
333303
+ name: "creditManager",
333304
+ type: "address",
333305
+ internalType: "address"
333306
+ },
333307
+ {
333308
+ name: "creditFacade",
333309
+ type: "address",
333310
+ internalType: "address"
333311
+ },
333312
+ {
333313
+ name: "underlying",
333314
+ type: "address",
333315
+ internalType: "address"
333316
+ },
333317
+ {
333318
+ name: "owner",
333319
+ type: "address",
333320
+ internalType: "address"
333321
+ },
333322
+ {
333323
+ name: "expirationDate",
333324
+ type: "uint40",
333325
+ internalType: "uint40"
333326
+ },
332994
333327
  {
332995
333328
  name: "enabledTokensMask",
332996
- internalType: "uint256",
332997
- type: "uint256"
333329
+ type: "uint256",
333330
+ internalType: "uint256"
333331
+ },
333332
+ {
333333
+ name: "debt",
333334
+ type: "uint256",
333335
+ internalType: "uint256"
333336
+ },
333337
+ {
333338
+ name: "accruedInterest",
333339
+ type: "uint256",
333340
+ internalType: "uint256"
333341
+ },
333342
+ {
333343
+ name: "accruedFees",
333344
+ type: "uint256",
333345
+ internalType: "uint256"
333346
+ },
333347
+ {
333348
+ name: "totalDebtUSD",
333349
+ type: "uint256",
333350
+ internalType: "uint256"
333351
+ },
333352
+ {
333353
+ name: "totalValueUSD",
333354
+ type: "uint256",
333355
+ internalType: "uint256"
333356
+ },
333357
+ {
333358
+ name: "twvUSD",
333359
+ type: "uint256",
333360
+ internalType: "uint256"
333361
+ },
333362
+ {
333363
+ name: "totalValue",
333364
+ type: "uint256",
333365
+ internalType: "uint256"
333366
+ },
333367
+ {
333368
+ name: "healthFactor",
333369
+ type: "uint16",
333370
+ internalType: "uint16"
333371
+ },
333372
+ {
333373
+ name: "success",
333374
+ type: "bool",
333375
+ internalType: "bool"
332998
333376
  },
332999
- { name: "debt", internalType: "uint256", type: "uint256" },
333000
- { name: "accruedInterest", internalType: "uint256", type: "uint256" },
333001
- { name: "accruedFees", internalType: "uint256", type: "uint256" },
333002
- { name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
333003
- { name: "totalValueUSD", internalType: "uint256", type: "uint256" },
333004
- { name: "twvUSD", internalType: "uint256", type: "uint256" },
333005
- { name: "totalValue", internalType: "uint256", type: "uint256" },
333006
- { name: "healthFactor", internalType: "uint16", type: "uint16" },
333007
- { name: "success", internalType: "bool", type: "bool" },
333008
333377
  {
333009
333378
  name: "tokens",
333010
- internalType: "struct TokenInfo[]",
333011
333379
  type: "tuple[]",
333380
+ internalType: "struct TokenInfo[]",
333012
333381
  components: [
333013
- { name: "token", internalType: "address", type: "address" },
333014
- { name: "mask", internalType: "uint256", type: "uint256" },
333015
- { name: "balance", internalType: "uint256", type: "uint256" },
333016
- { name: "quota", internalType: "uint256", type: "uint256" },
333017
- { name: "success", internalType: "bool", type: "bool" }
333382
+ {
333383
+ name: "token",
333384
+ type: "address",
333385
+ internalType: "address"
333386
+ },
333387
+ {
333388
+ name: "mask",
333389
+ type: "uint256",
333390
+ internalType: "uint256"
333391
+ },
333392
+ {
333393
+ name: "balance",
333394
+ type: "uint256",
333395
+ internalType: "uint256"
333396
+ },
333397
+ {
333398
+ name: "quota",
333399
+ type: "uint256",
333400
+ internalType: "uint256"
333401
+ },
333402
+ {
333403
+ name: "success",
333404
+ type: "bool",
333405
+ internalType: "bool"
333406
+ }
333018
333407
  ]
333019
333408
  }
333020
333409
  ]
333021
333410
  },
333022
- { name: "nextOffset", internalType: "uint256", type: "uint256" }
333411
+ {
333412
+ name: "nextOffset",
333413
+ type: "uint256",
333414
+ internalType: "uint256"
333415
+ }
333023
333416
  ],
333024
333417
  stateMutability: "view"
333025
333418
  },
333026
333419
  {
333027
333420
  type: "function",
333421
+ name: "getCreditAccounts",
333028
333422
  inputs: [
333029
- { name: "creditManager", internalType: "address", type: "address" },
333423
+ {
333424
+ name: "creditManager",
333425
+ type: "address",
333426
+ internalType: "address"
333427
+ },
333030
333428
  {
333031
333429
  name: "caFilter",
333032
- internalType: "struct CreditAccountFilter",
333033
333430
  type: "tuple",
333431
+ internalType: "struct CreditAccountFilter",
333034
333432
  components: [
333035
- { name: "owner", internalType: "address", type: "address" },
333036
- { name: "includeZeroDebt", internalType: "bool", type: "bool" },
333037
- { name: "minHealthFactor", internalType: "uint16", type: "uint16" },
333038
- { name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
333039
- { name: "reverting", internalType: "bool", type: "bool" }
333433
+ {
333434
+ name: "owner",
333435
+ type: "address",
333436
+ internalType: "address"
333437
+ },
333438
+ {
333439
+ name: "includeZeroDebt",
333440
+ type: "bool",
333441
+ internalType: "bool"
333442
+ },
333443
+ {
333444
+ name: "minHealthFactor",
333445
+ type: "uint16",
333446
+ internalType: "uint16"
333447
+ },
333448
+ {
333449
+ name: "maxHealthFactor",
333450
+ type: "uint16",
333451
+ internalType: "uint16"
333452
+ },
333453
+ {
333454
+ name: "reverting",
333455
+ type: "bool",
333456
+ internalType: "bool"
333457
+ }
333040
333458
  ]
333041
333459
  },
333042
- { name: "offset", internalType: "uint256", type: "uint256" },
333043
- { name: "limit", internalType: "uint256", type: "uint256" }
333460
+ {
333461
+ name: "offset",
333462
+ type: "uint256",
333463
+ internalType: "uint256"
333464
+ },
333465
+ {
333466
+ name: "limit",
333467
+ type: "uint256",
333468
+ internalType: "uint256"
333469
+ }
333044
333470
  ],
333045
- name: "getCreditAccounts",
333046
333471
  outputs: [
333047
333472
  {
333048
333473
  name: "data",
333049
- internalType: "struct CreditAccountData[]",
333050
333474
  type: "tuple[]",
333475
+ internalType: "struct CreditAccountData[]",
333051
333476
  components: [
333052
- { name: "creditAccount", internalType: "address", type: "address" },
333053
- { name: "creditManager", internalType: "address", type: "address" },
333054
- { name: "creditFacade", internalType: "address", type: "address" },
333055
- { name: "underlying", internalType: "address", type: "address" },
333056
- { name: "owner", internalType: "address", type: "address" },
333477
+ {
333478
+ name: "creditAccount",
333479
+ type: "address",
333480
+ internalType: "address"
333481
+ },
333482
+ {
333483
+ name: "creditManager",
333484
+ type: "address",
333485
+ internalType: "address"
333486
+ },
333487
+ {
333488
+ name: "creditFacade",
333489
+ type: "address",
333490
+ internalType: "address"
333491
+ },
333492
+ {
333493
+ name: "underlying",
333494
+ type: "address",
333495
+ internalType: "address"
333496
+ },
333497
+ {
333498
+ name: "owner",
333499
+ type: "address",
333500
+ internalType: "address"
333501
+ },
333502
+ {
333503
+ name: "expirationDate",
333504
+ type: "uint40",
333505
+ internalType: "uint40"
333506
+ },
333057
333507
  {
333058
333508
  name: "enabledTokensMask",
333059
- internalType: "uint256",
333060
- type: "uint256"
333509
+ type: "uint256",
333510
+ internalType: "uint256"
333511
+ },
333512
+ {
333513
+ name: "debt",
333514
+ type: "uint256",
333515
+ internalType: "uint256"
333516
+ },
333517
+ {
333518
+ name: "accruedInterest",
333519
+ type: "uint256",
333520
+ internalType: "uint256"
333521
+ },
333522
+ {
333523
+ name: "accruedFees",
333524
+ type: "uint256",
333525
+ internalType: "uint256"
333526
+ },
333527
+ {
333528
+ name: "totalDebtUSD",
333529
+ type: "uint256",
333530
+ internalType: "uint256"
333531
+ },
333532
+ {
333533
+ name: "totalValueUSD",
333534
+ type: "uint256",
333535
+ internalType: "uint256"
333536
+ },
333537
+ {
333538
+ name: "twvUSD",
333539
+ type: "uint256",
333540
+ internalType: "uint256"
333541
+ },
333542
+ {
333543
+ name: "totalValue",
333544
+ type: "uint256",
333545
+ internalType: "uint256"
333546
+ },
333547
+ {
333548
+ name: "healthFactor",
333549
+ type: "uint16",
333550
+ internalType: "uint16"
333551
+ },
333552
+ {
333553
+ name: "success",
333554
+ type: "bool",
333555
+ internalType: "bool"
333061
333556
  },
333062
- { name: "debt", internalType: "uint256", type: "uint256" },
333063
- { name: "accruedInterest", internalType: "uint256", type: "uint256" },
333064
- { name: "accruedFees", internalType: "uint256", type: "uint256" },
333065
- { name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
333066
- { name: "totalValueUSD", internalType: "uint256", type: "uint256" },
333067
- { name: "twvUSD", internalType: "uint256", type: "uint256" },
333068
- { name: "totalValue", internalType: "uint256", type: "uint256" },
333069
- { name: "healthFactor", internalType: "uint16", type: "uint16" },
333070
- { name: "success", internalType: "bool", type: "bool" },
333071
333557
  {
333072
333558
  name: "tokens",
333073
- internalType: "struct TokenInfo[]",
333074
333559
  type: "tuple[]",
333560
+ internalType: "struct TokenInfo[]",
333075
333561
  components: [
333076
- { name: "token", internalType: "address", type: "address" },
333077
- { name: "mask", internalType: "uint256", type: "uint256" },
333078
- { name: "balance", internalType: "uint256", type: "uint256" },
333079
- { name: "quota", internalType: "uint256", type: "uint256" },
333080
- { name: "success", internalType: "bool", type: "bool" }
333562
+ {
333563
+ name: "token",
333564
+ type: "address",
333565
+ internalType: "address"
333566
+ },
333567
+ {
333568
+ name: "mask",
333569
+ type: "uint256",
333570
+ internalType: "uint256"
333571
+ },
333572
+ {
333573
+ name: "balance",
333574
+ type: "uint256",
333575
+ internalType: "uint256"
333576
+ },
333577
+ {
333578
+ name: "quota",
333579
+ type: "uint256",
333580
+ internalType: "uint256"
333581
+ },
333582
+ {
333583
+ name: "success",
333584
+ type: "bool",
333585
+ internalType: "bool"
333586
+ }
333081
333587
  ]
333082
333588
  }
333083
333589
  ]
333084
333590
  },
333085
- { name: "nextOffset", internalType: "uint256", type: "uint256" }
333591
+ {
333592
+ name: "nextOffset",
333593
+ type: "uint256",
333594
+ internalType: "uint256"
333595
+ }
333086
333596
  ],
333087
333597
  stateMutability: "view"
333088
333598
  },
333089
333599
  {
333090
333600
  type: "function",
333601
+ name: "getCreditAccounts",
333091
333602
  inputs: [
333092
333603
  {
333093
333604
  name: "cmFilter",
333094
- internalType: "struct MarketFilter",
333095
333605
  type: "tuple",
333606
+ internalType: "struct MarketFilter",
333096
333607
  components: [
333097
- { name: "curators", internalType: "address[]", type: "address[]" },
333098
- { name: "pools", internalType: "address[]", type: "address[]" },
333099
- { name: "underlying", internalType: "address", type: "address" }
333608
+ {
333609
+ name: "configurators",
333610
+ type: "address[]",
333611
+ internalType: "address[]"
333612
+ },
333613
+ {
333614
+ name: "pools",
333615
+ type: "address[]",
333616
+ internalType: "address[]"
333617
+ },
333618
+ {
333619
+ name: "underlying",
333620
+ type: "address",
333621
+ internalType: "address"
333622
+ }
333100
333623
  ]
333101
333624
  },
333102
333625
  {
333103
333626
  name: "caFilter",
333104
- internalType: "struct CreditAccountFilter",
333105
333627
  type: "tuple",
333628
+ internalType: "struct CreditAccountFilter",
333106
333629
  components: [
333107
- { name: "owner", internalType: "address", type: "address" },
333108
- { name: "includeZeroDebt", internalType: "bool", type: "bool" },
333109
- { name: "minHealthFactor", internalType: "uint16", type: "uint16" },
333110
- { name: "maxHealthFactor", internalType: "uint16", type: "uint16" },
333111
- { name: "reverting", internalType: "bool", type: "bool" }
333630
+ {
333631
+ name: "owner",
333632
+ type: "address",
333633
+ internalType: "address"
333634
+ },
333635
+ {
333636
+ name: "includeZeroDebt",
333637
+ type: "bool",
333638
+ internalType: "bool"
333639
+ },
333640
+ {
333641
+ name: "minHealthFactor",
333642
+ type: "uint16",
333643
+ internalType: "uint16"
333644
+ },
333645
+ {
333646
+ name: "maxHealthFactor",
333647
+ type: "uint16",
333648
+ internalType: "uint16"
333649
+ },
333650
+ {
333651
+ name: "reverting",
333652
+ type: "bool",
333653
+ internalType: "bool"
333654
+ }
333112
333655
  ]
333113
333656
  },
333114
- { name: "offset", internalType: "uint256", type: "uint256" },
333115
- { name: "limit", internalType: "uint256", type: "uint256" }
333657
+ {
333658
+ name: "offset",
333659
+ type: "uint256",
333660
+ internalType: "uint256"
333661
+ },
333662
+ {
333663
+ name: "limit",
333664
+ type: "uint256",
333665
+ internalType: "uint256"
333666
+ }
333116
333667
  ],
333117
- name: "getCreditAccounts",
333118
333668
  outputs: [
333119
333669
  {
333120
333670
  name: "data",
333121
- internalType: "struct CreditAccountData[]",
333122
333671
  type: "tuple[]",
333672
+ internalType: "struct CreditAccountData[]",
333123
333673
  components: [
333124
- { name: "creditAccount", internalType: "address", type: "address" },
333125
- { name: "creditManager", internalType: "address", type: "address" },
333126
- { name: "creditFacade", internalType: "address", type: "address" },
333127
- { name: "underlying", internalType: "address", type: "address" },
333128
- { name: "owner", internalType: "address", type: "address" },
333674
+ {
333675
+ name: "creditAccount",
333676
+ type: "address",
333677
+ internalType: "address"
333678
+ },
333679
+ {
333680
+ name: "creditManager",
333681
+ type: "address",
333682
+ internalType: "address"
333683
+ },
333684
+ {
333685
+ name: "creditFacade",
333686
+ type: "address",
333687
+ internalType: "address"
333688
+ },
333689
+ {
333690
+ name: "underlying",
333691
+ type: "address",
333692
+ internalType: "address"
333693
+ },
333694
+ {
333695
+ name: "owner",
333696
+ type: "address",
333697
+ internalType: "address"
333698
+ },
333699
+ {
333700
+ name: "expirationDate",
333701
+ type: "uint40",
333702
+ internalType: "uint40"
333703
+ },
333129
333704
  {
333130
333705
  name: "enabledTokensMask",
333131
- internalType: "uint256",
333132
- type: "uint256"
333706
+ type: "uint256",
333707
+ internalType: "uint256"
333708
+ },
333709
+ {
333710
+ name: "debt",
333711
+ type: "uint256",
333712
+ internalType: "uint256"
333713
+ },
333714
+ {
333715
+ name: "accruedInterest",
333716
+ type: "uint256",
333717
+ internalType: "uint256"
333718
+ },
333719
+ {
333720
+ name: "accruedFees",
333721
+ type: "uint256",
333722
+ internalType: "uint256"
333723
+ },
333724
+ {
333725
+ name: "totalDebtUSD",
333726
+ type: "uint256",
333727
+ internalType: "uint256"
333728
+ },
333729
+ {
333730
+ name: "totalValueUSD",
333731
+ type: "uint256",
333732
+ internalType: "uint256"
333733
+ },
333734
+ {
333735
+ name: "twvUSD",
333736
+ type: "uint256",
333737
+ internalType: "uint256"
333738
+ },
333739
+ {
333740
+ name: "totalValue",
333741
+ type: "uint256",
333742
+ internalType: "uint256"
333743
+ },
333744
+ {
333745
+ name: "healthFactor",
333746
+ type: "uint16",
333747
+ internalType: "uint16"
333748
+ },
333749
+ {
333750
+ name: "success",
333751
+ type: "bool",
333752
+ internalType: "bool"
333133
333753
  },
333134
- { name: "debt", internalType: "uint256", type: "uint256" },
333135
- { name: "accruedInterest", internalType: "uint256", type: "uint256" },
333136
- { name: "accruedFees", internalType: "uint256", type: "uint256" },
333137
- { name: "totalDebtUSD", internalType: "uint256", type: "uint256" },
333138
- { name: "totalValueUSD", internalType: "uint256", type: "uint256" },
333139
- { name: "twvUSD", internalType: "uint256", type: "uint256" },
333140
- { name: "totalValue", internalType: "uint256", type: "uint256" },
333141
- { name: "healthFactor", internalType: "uint16", type: "uint16" },
333142
- { name: "success", internalType: "bool", type: "bool" },
333143
333754
  {
333144
333755
  name: "tokens",
333145
- internalType: "struct TokenInfo[]",
333146
333756
  type: "tuple[]",
333757
+ internalType: "struct TokenInfo[]",
333147
333758
  components: [
333148
- { name: "token", internalType: "address", type: "address" },
333149
- { name: "mask", internalType: "uint256", type: "uint256" },
333150
- { name: "balance", internalType: "uint256", type: "uint256" },
333151
- { name: "quota", internalType: "uint256", type: "uint256" },
333152
- { name: "success", internalType: "bool", type: "bool" }
333759
+ {
333760
+ name: "token",
333761
+ type: "address",
333762
+ internalType: "address"
333763
+ },
333764
+ {
333765
+ name: "mask",
333766
+ type: "uint256",
333767
+ internalType: "uint256"
333768
+ },
333769
+ {
333770
+ name: "balance",
333771
+ type: "uint256",
333772
+ internalType: "uint256"
333773
+ },
333774
+ {
333775
+ name: "quota",
333776
+ type: "uint256",
333777
+ internalType: "uint256"
333778
+ },
333779
+ {
333780
+ name: "success",
333781
+ type: "bool",
333782
+ internalType: "bool"
333783
+ }
333153
333784
  ]
333154
333785
  }
333155
333786
  ]
333156
333787
  },
333157
- { name: "nextOffset", internalType: "uint256", type: "uint256" }
333788
+ {
333789
+ name: "nextOffset",
333790
+ type: "uint256",
333791
+ internalType: "uint256"
333792
+ }
333158
333793
  ],
333159
333794
  stateMutability: "view"
333160
333795
  },
333161
333796
  {
333162
333797
  type: "function",
333163
- inputs: [],
333164
333798
  name: "version",
333165
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
333799
+ inputs: [],
333800
+ outputs: [
333801
+ {
333802
+ name: "",
333803
+ type: "uint256",
333804
+ internalType: "uint256"
333805
+ }
333806
+ ],
333166
333807
  stateMutability: "view"
333167
333808
  }
333168
333809
  ];
@@ -333188,6 +333829,11 @@ var iMarketCompressorAbi = [
333188
333829
  name: "pool",
333189
333830
  type: "address",
333190
333831
  internalType: "address"
333832
+ },
333833
+ {
333834
+ name: "configurator",
333835
+ type: "address",
333836
+ internalType: "address"
333191
333837
  }
333192
333838
  ],
333193
333839
  outputs: [
@@ -333197,46 +333843,988 @@ var iMarketCompressorAbi = [
333197
333843
  internalType: "struct MarketData",
333198
333844
  components: [
333199
333845
  {
333200
- name: "baseParams",
333846
+ name: "acl",
333847
+ type: "address",
333848
+ internalType: "address"
333849
+ },
333850
+ {
333851
+ name: "contractsRegister",
333852
+ type: "address",
333853
+ internalType: "address"
333854
+ },
333855
+ {
333856
+ name: "treasury",
333857
+ type: "address",
333858
+ internalType: "address"
333859
+ },
333860
+ {
333861
+ name: "pool",
333201
333862
  type: "tuple",
333202
- internalType: "struct BaseParams",
333863
+ internalType: "struct PoolState",
333203
333864
  components: [
333204
333865
  {
333205
- name: "addr",
333866
+ name: "baseParams",
333867
+ type: "tuple",
333868
+ internalType: "struct BaseParams",
333869
+ components: [
333870
+ {
333871
+ name: "addr",
333872
+ type: "address",
333873
+ internalType: "address"
333874
+ },
333875
+ {
333876
+ name: "version",
333877
+ type: "uint256",
333878
+ internalType: "uint256"
333879
+ },
333880
+ {
333881
+ name: "contractType",
333882
+ type: "bytes32",
333883
+ internalType: "bytes32"
333884
+ },
333885
+ {
333886
+ name: "serializedParams",
333887
+ type: "bytes",
333888
+ internalType: "bytes"
333889
+ }
333890
+ ]
333891
+ },
333892
+ {
333893
+ name: "symbol",
333894
+ type: "string",
333895
+ internalType: "string"
333896
+ },
333897
+ {
333898
+ name: "name",
333899
+ type: "string",
333900
+ internalType: "string"
333901
+ },
333902
+ {
333903
+ name: "decimals",
333904
+ type: "uint8",
333905
+ internalType: "uint8"
333906
+ },
333907
+ {
333908
+ name: "totalSupply",
333909
+ type: "uint256",
333910
+ internalType: "uint256"
333911
+ },
333912
+ {
333913
+ name: "poolQuotaKeeper",
333206
333914
  type: "address",
333207
333915
  internalType: "address"
333208
333916
  },
333209
333917
  {
333210
- name: "version",
333918
+ name: "interestRateModel",
333919
+ type: "address",
333920
+ internalType: "address"
333921
+ },
333922
+ {
333923
+ name: "underlying",
333924
+ type: "address",
333925
+ internalType: "address"
333926
+ },
333927
+ {
333928
+ name: "availableLiquidity",
333211
333929
  type: "uint256",
333212
333930
  internalType: "uint256"
333213
333931
  },
333214
333932
  {
333215
- name: "contractType",
333216
- type: "bytes32",
333217
- internalType: "bytes32"
333933
+ name: "expectedLiquidity",
333934
+ type: "uint256",
333935
+ internalType: "uint256"
333218
333936
  },
333219
333937
  {
333220
- name: "serializedParams",
333221
- type: "bytes",
333222
- internalType: "bytes"
333938
+ name: "baseInterestIndex",
333939
+ type: "uint256",
333940
+ internalType: "uint256"
333941
+ },
333942
+ {
333943
+ name: "baseInterestRate",
333944
+ type: "uint256",
333945
+ internalType: "uint256"
333946
+ },
333947
+ {
333948
+ name: "dieselRate",
333949
+ type: "uint256",
333950
+ internalType: "uint256"
333951
+ },
333952
+ {
333953
+ name: "supplyRate",
333954
+ type: "uint256",
333955
+ internalType: "uint256"
333956
+ },
333957
+ {
333958
+ name: "withdrawFee",
333959
+ type: "uint256",
333960
+ internalType: "uint256"
333961
+ },
333962
+ {
333963
+ name: "totalBorrowed",
333964
+ type: "uint256",
333965
+ internalType: "uint256"
333966
+ },
333967
+ {
333968
+ name: "totalDebtLimit",
333969
+ type: "uint256",
333970
+ internalType: "uint256"
333971
+ },
333972
+ {
333973
+ name: "creditManagerDebtParams",
333974
+ type: "tuple[]",
333975
+ internalType: "struct CreditManagerDebtParams[]",
333976
+ components: [
333977
+ {
333978
+ name: "creditManager",
333979
+ type: "address",
333980
+ internalType: "address"
333981
+ },
333982
+ {
333983
+ name: "borrowed",
333984
+ type: "uint256",
333985
+ internalType: "uint256"
333986
+ },
333987
+ {
333988
+ name: "limit",
333989
+ type: "uint256",
333990
+ internalType: "uint256"
333991
+ },
333992
+ {
333993
+ name: "available",
333994
+ type: "uint256",
333995
+ internalType: "uint256"
333996
+ }
333997
+ ]
333998
+ },
333999
+ {
334000
+ name: "baseInterestIndexLU",
334001
+ type: "uint256",
334002
+ internalType: "uint256"
334003
+ },
334004
+ {
334005
+ name: "expectedLiquidityLU",
334006
+ type: "uint256",
334007
+ internalType: "uint256"
334008
+ },
334009
+ {
334010
+ name: "quotaRevenue",
334011
+ type: "uint256",
334012
+ internalType: "uint256"
334013
+ },
334014
+ {
334015
+ name: "lastBaseInterestUpdate",
334016
+ type: "uint40",
334017
+ internalType: "uint40"
334018
+ },
334019
+ {
334020
+ name: "lastQuotaRevenueUpdate",
334021
+ type: "uint40",
334022
+ internalType: "uint40"
334023
+ },
334024
+ {
334025
+ name: "isPaused",
334026
+ type: "bool",
334027
+ internalType: "bool"
333223
334028
  }
333224
334029
  ]
333225
334030
  },
333226
334031
  {
333227
- name: "owner",
334032
+ name: "poolQuotaKeeper",
334033
+ type: "tuple",
334034
+ internalType: "struct PoolQuotaKeeperState",
334035
+ components: [
334036
+ {
334037
+ name: "baseParams",
334038
+ type: "tuple",
334039
+ internalType: "struct BaseParams",
334040
+ components: [
334041
+ {
334042
+ name: "addr",
334043
+ type: "address",
334044
+ internalType: "address"
334045
+ },
334046
+ {
334047
+ name: "version",
334048
+ type: "uint256",
334049
+ internalType: "uint256"
334050
+ },
334051
+ {
334052
+ name: "contractType",
334053
+ type: "bytes32",
334054
+ internalType: "bytes32"
334055
+ },
334056
+ {
334057
+ name: "serializedParams",
334058
+ type: "bytes",
334059
+ internalType: "bytes"
334060
+ }
334061
+ ]
334062
+ },
334063
+ {
334064
+ name: "rateKeeper",
334065
+ type: "address",
334066
+ internalType: "address"
334067
+ },
334068
+ {
334069
+ name: "quotas",
334070
+ type: "tuple[]",
334071
+ internalType: "struct QuotaTokenParams[]",
334072
+ components: [
334073
+ {
334074
+ name: "token",
334075
+ type: "address",
334076
+ internalType: "address"
334077
+ },
334078
+ {
334079
+ name: "rate",
334080
+ type: "uint16",
334081
+ internalType: "uint16"
334082
+ },
334083
+ {
334084
+ name: "cumulativeIndexLU",
334085
+ type: "uint192",
334086
+ internalType: "uint192"
334087
+ },
334088
+ {
334089
+ name: "quotaIncreaseFee",
334090
+ type: "uint16",
334091
+ internalType: "uint16"
334092
+ },
334093
+ {
334094
+ name: "totalQuoted",
334095
+ type: "uint96",
334096
+ internalType: "uint96"
334097
+ },
334098
+ {
334099
+ name: "limit",
334100
+ type: "uint96",
334101
+ internalType: "uint96"
334102
+ },
334103
+ {
334104
+ name: "isActive",
334105
+ type: "bool",
334106
+ internalType: "bool"
334107
+ }
334108
+ ]
334109
+ },
334110
+ {
334111
+ name: "creditManagers",
334112
+ type: "address[]",
334113
+ internalType: "address[]"
334114
+ },
334115
+ {
334116
+ name: "lastQuotaRateUpdate",
334117
+ type: "uint40",
334118
+ internalType: "uint40"
334119
+ }
334120
+ ]
334121
+ },
334122
+ {
334123
+ name: "interestRateModel",
334124
+ type: "tuple",
334125
+ internalType: "struct BaseState",
334126
+ components: [
334127
+ {
334128
+ name: "baseParams",
334129
+ type: "tuple",
334130
+ internalType: "struct BaseParams",
334131
+ components: [
334132
+ {
334133
+ name: "addr",
334134
+ type: "address",
334135
+ internalType: "address"
334136
+ },
334137
+ {
334138
+ name: "version",
334139
+ type: "uint256",
334140
+ internalType: "uint256"
334141
+ },
334142
+ {
334143
+ name: "contractType",
334144
+ type: "bytes32",
334145
+ internalType: "bytes32"
334146
+ },
334147
+ {
334148
+ name: "serializedParams",
334149
+ type: "bytes",
334150
+ internalType: "bytes"
334151
+ }
334152
+ ]
334153
+ }
334154
+ ]
334155
+ },
334156
+ {
334157
+ name: "rateKeeper",
334158
+ type: "tuple",
334159
+ internalType: "struct RateKeeperState",
334160
+ components: [
334161
+ {
334162
+ name: "baseParams",
334163
+ type: "tuple",
334164
+ internalType: "struct BaseParams",
334165
+ components: [
334166
+ {
334167
+ name: "addr",
334168
+ type: "address",
334169
+ internalType: "address"
334170
+ },
334171
+ {
334172
+ name: "version",
334173
+ type: "uint256",
334174
+ internalType: "uint256"
334175
+ },
334176
+ {
334177
+ name: "contractType",
334178
+ type: "bytes32",
334179
+ internalType: "bytes32"
334180
+ },
334181
+ {
334182
+ name: "serializedParams",
334183
+ type: "bytes",
334184
+ internalType: "bytes"
334185
+ }
334186
+ ]
334187
+ },
334188
+ {
334189
+ name: "rates",
334190
+ type: "tuple[]",
334191
+ internalType: "struct Rate[]",
334192
+ components: [
334193
+ {
334194
+ name: "token",
334195
+ type: "address",
334196
+ internalType: "address"
334197
+ },
334198
+ {
334199
+ name: "rate",
334200
+ type: "uint16",
334201
+ internalType: "uint16"
334202
+ }
334203
+ ]
334204
+ }
334205
+ ]
334206
+ },
334207
+ {
334208
+ name: "priceOracleData",
334209
+ type: "tuple",
334210
+ internalType: "struct PriceOracleState",
334211
+ components: [
334212
+ {
334213
+ name: "baseParams",
334214
+ type: "tuple",
334215
+ internalType: "struct BaseParams",
334216
+ components: [
334217
+ {
334218
+ name: "addr",
334219
+ type: "address",
334220
+ internalType: "address"
334221
+ },
334222
+ {
334223
+ name: "version",
334224
+ type: "uint256",
334225
+ internalType: "uint256"
334226
+ },
334227
+ {
334228
+ name: "contractType",
334229
+ type: "bytes32",
334230
+ internalType: "bytes32"
334231
+ },
334232
+ {
334233
+ name: "serializedParams",
334234
+ type: "bytes",
334235
+ internalType: "bytes"
334236
+ }
334237
+ ]
334238
+ },
334239
+ {
334240
+ name: "priceFeedMapping",
334241
+ type: "tuple[]",
334242
+ internalType: "struct PriceFeedMapEntry[]",
334243
+ components: [
334244
+ {
334245
+ name: "token",
334246
+ type: "address",
334247
+ internalType: "address"
334248
+ },
334249
+ {
334250
+ name: "reserve",
334251
+ type: "bool",
334252
+ internalType: "bool"
334253
+ },
334254
+ {
334255
+ name: "priceFeed",
334256
+ type: "address",
334257
+ internalType: "address"
334258
+ },
334259
+ {
334260
+ name: "stalenessPeriod",
334261
+ type: "uint32",
334262
+ internalType: "uint32"
334263
+ }
334264
+ ]
334265
+ },
334266
+ {
334267
+ name: "priceFeedStructure",
334268
+ type: "tuple[]",
334269
+ internalType: "struct PriceFeedTreeNode[]",
334270
+ components: [
334271
+ {
334272
+ name: "baseParams",
334273
+ type: "tuple",
334274
+ internalType: "struct BaseParams",
334275
+ components: [
334276
+ {
334277
+ name: "addr",
334278
+ type: "address",
334279
+ internalType: "address"
334280
+ },
334281
+ {
334282
+ name: "version",
334283
+ type: "uint256",
334284
+ internalType: "uint256"
334285
+ },
334286
+ {
334287
+ name: "contractType",
334288
+ type: "bytes32",
334289
+ internalType: "bytes32"
334290
+ },
334291
+ {
334292
+ name: "serializedParams",
334293
+ type: "bytes",
334294
+ internalType: "bytes"
334295
+ }
334296
+ ]
334297
+ },
334298
+ {
334299
+ name: "decimals",
334300
+ type: "uint8",
334301
+ internalType: "uint8"
334302
+ },
334303
+ {
334304
+ name: "skipCheck",
334305
+ type: "bool",
334306
+ internalType: "bool"
334307
+ },
334308
+ {
334309
+ name: "updatable",
334310
+ type: "bool",
334311
+ internalType: "bool"
334312
+ },
334313
+ {
334314
+ name: "underlyingFeeds",
334315
+ type: "address[]",
334316
+ internalType: "address[]"
334317
+ },
334318
+ {
334319
+ name: "underlyingStalenessPeriods",
334320
+ type: "uint32[]",
334321
+ internalType: "uint32[]"
334322
+ },
334323
+ {
334324
+ name: "answer",
334325
+ type: "tuple",
334326
+ internalType: "struct PriceFeedAnswer",
334327
+ components: [
334328
+ {
334329
+ name: "price",
334330
+ type: "int256",
334331
+ internalType: "int256"
334332
+ },
334333
+ {
334334
+ name: "updatedAt",
334335
+ type: "uint256",
334336
+ internalType: "uint256"
334337
+ },
334338
+ {
334339
+ name: "success",
334340
+ type: "bool",
334341
+ internalType: "bool"
334342
+ }
334343
+ ]
334344
+ }
334345
+ ]
334346
+ }
334347
+ ]
334348
+ },
334349
+ {
334350
+ name: "lossPolicy",
334351
+ type: "tuple",
334352
+ internalType: "struct BaseState",
334353
+ components: [
334354
+ {
334355
+ name: "baseParams",
334356
+ type: "tuple",
334357
+ internalType: "struct BaseParams",
334358
+ components: [
334359
+ {
334360
+ name: "addr",
334361
+ type: "address",
334362
+ internalType: "address"
334363
+ },
334364
+ {
334365
+ name: "version",
334366
+ type: "uint256",
334367
+ internalType: "uint256"
334368
+ },
334369
+ {
334370
+ name: "contractType",
334371
+ type: "bytes32",
334372
+ internalType: "bytes32"
334373
+ },
334374
+ {
334375
+ name: "serializedParams",
334376
+ type: "bytes",
334377
+ internalType: "bytes"
334378
+ }
334379
+ ]
334380
+ }
334381
+ ]
334382
+ },
334383
+ {
334384
+ name: "tokens",
334385
+ type: "tuple[]",
334386
+ internalType: "struct TokenData[]",
334387
+ components: [
334388
+ {
334389
+ name: "addr",
334390
+ type: "address",
334391
+ internalType: "address"
334392
+ },
334393
+ {
334394
+ name: "symbol",
334395
+ type: "string",
334396
+ internalType: "string"
334397
+ },
334398
+ {
334399
+ name: "name",
334400
+ type: "string",
334401
+ internalType: "string"
334402
+ },
334403
+ {
334404
+ name: "decimals",
334405
+ type: "uint8",
334406
+ internalType: "uint8"
334407
+ }
334408
+ ]
334409
+ },
334410
+ {
334411
+ name: "creditManagers",
334412
+ type: "tuple[]",
334413
+ internalType: "struct CreditSuiteData[]",
334414
+ components: [
334415
+ {
334416
+ name: "creditFacade",
334417
+ type: "tuple",
334418
+ internalType: "struct CreditFacadeState",
334419
+ components: [
334420
+ {
334421
+ name: "baseParams",
334422
+ type: "tuple",
334423
+ internalType: "struct BaseParams",
334424
+ components: [
334425
+ {
334426
+ name: "addr",
334427
+ type: "address",
334428
+ internalType: "address"
334429
+ },
334430
+ {
334431
+ name: "version",
334432
+ type: "uint256",
334433
+ internalType: "uint256"
334434
+ },
334435
+ {
334436
+ name: "contractType",
334437
+ type: "bytes32",
334438
+ internalType: "bytes32"
334439
+ },
334440
+ {
334441
+ name: "serializedParams",
334442
+ type: "bytes",
334443
+ internalType: "bytes"
334444
+ }
334445
+ ]
334446
+ },
334447
+ {
334448
+ name: "creditManager",
334449
+ type: "address",
334450
+ internalType: "address"
334451
+ },
334452
+ {
334453
+ name: "degenNFT",
334454
+ type: "address",
334455
+ internalType: "address"
334456
+ },
334457
+ {
334458
+ name: "botList",
334459
+ type: "address",
334460
+ internalType: "address"
334461
+ },
334462
+ {
334463
+ name: "expirable",
334464
+ type: "bool",
334465
+ internalType: "bool"
334466
+ },
334467
+ {
334468
+ name: "expirationDate",
334469
+ type: "uint40",
334470
+ internalType: "uint40"
334471
+ },
334472
+ {
334473
+ name: "maxDebtPerBlockMultiplier",
334474
+ type: "uint8",
334475
+ internalType: "uint8"
334476
+ },
334477
+ {
334478
+ name: "minDebt",
334479
+ type: "uint256",
334480
+ internalType: "uint256"
334481
+ },
334482
+ {
334483
+ name: "maxDebt",
334484
+ type: "uint256",
334485
+ internalType: "uint256"
334486
+ },
334487
+ {
334488
+ name: "forbiddenTokenMask",
334489
+ type: "uint256",
334490
+ internalType: "uint256"
334491
+ },
334492
+ {
334493
+ name: "isPaused",
334494
+ type: "bool",
334495
+ internalType: "bool"
334496
+ }
334497
+ ]
334498
+ },
334499
+ {
334500
+ name: "creditManager",
334501
+ type: "tuple",
334502
+ internalType: "struct CreditManagerState",
334503
+ components: [
334504
+ {
334505
+ name: "baseParams",
334506
+ type: "tuple",
334507
+ internalType: "struct BaseParams",
334508
+ components: [
334509
+ {
334510
+ name: "addr",
334511
+ type: "address",
334512
+ internalType: "address"
334513
+ },
334514
+ {
334515
+ name: "version",
334516
+ type: "uint256",
334517
+ internalType: "uint256"
334518
+ },
334519
+ {
334520
+ name: "contractType",
334521
+ type: "bytes32",
334522
+ internalType: "bytes32"
334523
+ },
334524
+ {
334525
+ name: "serializedParams",
334526
+ type: "bytes",
334527
+ internalType: "bytes"
334528
+ }
334529
+ ]
334530
+ },
334531
+ {
334532
+ name: "name",
334533
+ type: "string",
334534
+ internalType: "string"
334535
+ },
334536
+ {
334537
+ name: "accountFactory",
334538
+ type: "address",
334539
+ internalType: "address"
334540
+ },
334541
+ {
334542
+ name: "underlying",
334543
+ type: "address",
334544
+ internalType: "address"
334545
+ },
334546
+ {
334547
+ name: "pool",
334548
+ type: "address",
334549
+ internalType: "address"
334550
+ },
334551
+ {
334552
+ name: "creditFacade",
334553
+ type: "address",
334554
+ internalType: "address"
334555
+ },
334556
+ {
334557
+ name: "creditConfigurator",
334558
+ type: "address",
334559
+ internalType: "address"
334560
+ },
334561
+ {
334562
+ name: "maxEnabledTokens",
334563
+ type: "uint8",
334564
+ internalType: "uint8"
334565
+ },
334566
+ {
334567
+ name: "collateralTokens",
334568
+ type: "tuple[]",
334569
+ internalType: "struct CollateralToken[]",
334570
+ components: [
334571
+ {
334572
+ name: "token",
334573
+ type: "address",
334574
+ internalType: "address"
334575
+ },
334576
+ {
334577
+ name: "liquidationThreshold",
334578
+ type: "uint16",
334579
+ internalType: "uint16"
334580
+ }
334581
+ ]
334582
+ },
334583
+ {
334584
+ name: "feeInterest",
334585
+ type: "uint16",
334586
+ internalType: "uint16"
334587
+ },
334588
+ {
334589
+ name: "feeLiquidation",
334590
+ type: "uint16",
334591
+ internalType: "uint16"
334592
+ },
334593
+ {
334594
+ name: "liquidationDiscount",
334595
+ type: "uint16",
334596
+ internalType: "uint16"
334597
+ },
334598
+ {
334599
+ name: "feeLiquidationExpired",
334600
+ type: "uint16",
334601
+ internalType: "uint16"
334602
+ },
334603
+ {
334604
+ name: "liquidationDiscountExpired",
334605
+ type: "uint16",
334606
+ internalType: "uint16"
334607
+ }
334608
+ ]
334609
+ },
334610
+ {
334611
+ name: "creditConfigurator",
334612
+ type: "tuple",
334613
+ internalType: "struct BaseState",
334614
+ components: [
334615
+ {
334616
+ name: "baseParams",
334617
+ type: "tuple",
334618
+ internalType: "struct BaseParams",
334619
+ components: [
334620
+ {
334621
+ name: "addr",
334622
+ type: "address",
334623
+ internalType: "address"
334624
+ },
334625
+ {
334626
+ name: "version",
334627
+ type: "uint256",
334628
+ internalType: "uint256"
334629
+ },
334630
+ {
334631
+ name: "contractType",
334632
+ type: "bytes32",
334633
+ internalType: "bytes32"
334634
+ },
334635
+ {
334636
+ name: "serializedParams",
334637
+ type: "bytes",
334638
+ internalType: "bytes"
334639
+ }
334640
+ ]
334641
+ }
334642
+ ]
334643
+ },
334644
+ {
334645
+ name: "adapters",
334646
+ type: "tuple[]",
334647
+ internalType: "struct AdapterState[]",
334648
+ components: [
334649
+ {
334650
+ name: "baseParams",
334651
+ type: "tuple",
334652
+ internalType: "struct BaseParams",
334653
+ components: [
334654
+ {
334655
+ name: "addr",
334656
+ type: "address",
334657
+ internalType: "address"
334658
+ },
334659
+ {
334660
+ name: "version",
334661
+ type: "uint256",
334662
+ internalType: "uint256"
334663
+ },
334664
+ {
334665
+ name: "contractType",
334666
+ type: "bytes32",
334667
+ internalType: "bytes32"
334668
+ },
334669
+ {
334670
+ name: "serializedParams",
334671
+ type: "bytes",
334672
+ internalType: "bytes"
334673
+ }
334674
+ ]
334675
+ },
334676
+ {
334677
+ name: "targetContract",
334678
+ type: "address",
334679
+ internalType: "address"
334680
+ }
334681
+ ]
334682
+ }
334683
+ ]
334684
+ },
334685
+ {
334686
+ name: "configurator",
333228
334687
  type: "address",
333229
334688
  internalType: "address"
333230
334689
  },
334690
+ {
334691
+ name: "pausableAdmins",
334692
+ type: "address[]",
334693
+ internalType: "address[]"
334694
+ },
334695
+ {
334696
+ name: "unpausableAdmins",
334697
+ type: "address[]",
334698
+ internalType: "address[]"
334699
+ },
334700
+ {
334701
+ name: "emergencyLiquidators",
334702
+ type: "address[]",
334703
+ internalType: "address[]"
334704
+ },
334705
+ {
334706
+ name: "zappers",
334707
+ type: "tuple[]",
334708
+ internalType: "struct ZapperState[]",
334709
+ components: [
334710
+ {
334711
+ name: "baseParams",
334712
+ type: "tuple",
334713
+ internalType: "struct BaseParams",
334714
+ components: [
334715
+ {
334716
+ name: "addr",
334717
+ type: "address",
334718
+ internalType: "address"
334719
+ },
334720
+ {
334721
+ name: "version",
334722
+ type: "uint256",
334723
+ internalType: "uint256"
334724
+ },
334725
+ {
334726
+ name: "contractType",
334727
+ type: "bytes32",
334728
+ internalType: "bytes32"
334729
+ },
334730
+ {
334731
+ name: "serializedParams",
334732
+ type: "bytes",
334733
+ internalType: "bytes"
334734
+ }
334735
+ ]
334736
+ },
334737
+ {
334738
+ name: "tokenIn",
334739
+ type: "tuple",
334740
+ internalType: "struct TokenData",
334741
+ components: [
334742
+ {
334743
+ name: "addr",
334744
+ type: "address",
334745
+ internalType: "address"
334746
+ },
334747
+ {
334748
+ name: "symbol",
334749
+ type: "string",
334750
+ internalType: "string"
334751
+ },
334752
+ {
334753
+ name: "name",
334754
+ type: "string",
334755
+ internalType: "string"
334756
+ },
334757
+ {
334758
+ name: "decimals",
334759
+ type: "uint8",
334760
+ internalType: "uint8"
334761
+ }
334762
+ ]
334763
+ },
334764
+ {
334765
+ name: "tokenOut",
334766
+ type: "tuple",
334767
+ internalType: "struct TokenData",
334768
+ components: [
334769
+ {
334770
+ name: "addr",
334771
+ type: "address",
334772
+ internalType: "address"
334773
+ },
334774
+ {
334775
+ name: "symbol",
334776
+ type: "string",
334777
+ internalType: "string"
334778
+ },
334779
+ {
334780
+ name: "name",
334781
+ type: "string",
334782
+ internalType: "string"
334783
+ },
334784
+ {
334785
+ name: "decimals",
334786
+ type: "uint8",
334787
+ internalType: "uint8"
334788
+ }
334789
+ ]
334790
+ }
334791
+ ]
334792
+ }
334793
+ ]
334794
+ }
334795
+ ],
334796
+ stateMutability: "view"
334797
+ },
334798
+ {
334799
+ type: "function",
334800
+ name: "getMarketData",
334801
+ inputs: [
334802
+ {
334803
+ name: "pool",
334804
+ type: "address",
334805
+ internalType: "address"
334806
+ }
334807
+ ],
334808
+ outputs: [
334809
+ {
334810
+ name: "result",
334811
+ type: "tuple",
334812
+ internalType: "struct MarketData",
334813
+ components: [
333231
334814
  {
333232
334815
  name: "acl",
333233
334816
  type: "address",
333234
334817
  internalType: "address"
333235
334818
  },
333236
334819
  {
333237
- name: "name",
333238
- type: "string",
333239
- internalType: "string"
334820
+ name: "contractsRegister",
334821
+ type: "address",
334822
+ internalType: "address"
334823
+ },
334824
+ {
334825
+ name: "treasury",
334826
+ type: "address",
334827
+ internalType: "address"
333240
334828
  },
333241
334829
  {
333242
334830
  name: "pool",
@@ -333300,16 +334888,6 @@ var iMarketCompressorAbi = [
333300
334888
  type: "address",
333301
334889
  internalType: "address"
333302
334890
  },
333303
- {
333304
- name: "treasury",
333305
- type: "address",
333306
- internalType: "address"
333307
- },
333308
- {
333309
- name: "controller",
333310
- type: "address",
333311
- internalType: "address"
333312
- },
333313
334891
  {
333314
334892
  name: "underlying",
333315
334893
  type: "address",
@@ -333341,22 +334919,17 @@ var iMarketCompressorAbi = [
333341
334919
  internalType: "uint256"
333342
334920
  },
333343
334921
  {
333344
- name: "totalBorrowed",
333345
- type: "uint256",
333346
- internalType: "uint256"
333347
- },
333348
- {
333349
- name: "totalAssets",
334922
+ name: "supplyRate",
333350
334923
  type: "uint256",
333351
334924
  internalType: "uint256"
333352
334925
  },
333353
334926
  {
333354
- name: "supplyRate",
334927
+ name: "withdrawFee",
333355
334928
  type: "uint256",
333356
334929
  internalType: "uint256"
333357
334930
  },
333358
334931
  {
333359
- name: "withdrawFee",
334932
+ name: "totalBorrowed",
333360
334933
  type: "uint256",
333361
334934
  internalType: "uint256"
333362
334935
  },
@@ -333384,6 +334957,11 @@ var iMarketCompressorAbi = [
333384
334957
  name: "limit",
333385
334958
  type: "uint256",
333386
334959
  internalType: "uint256"
334960
+ },
334961
+ {
334962
+ name: "available",
334963
+ type: "uint256",
334964
+ internalType: "uint256"
333387
334965
  }
333388
334966
  ]
333389
334967
  },
@@ -333737,6 +335315,40 @@ var iMarketCompressorAbi = [
333737
335315
  }
333738
335316
  ]
333739
335317
  },
335318
+ {
335319
+ name: "lossPolicy",
335320
+ type: "tuple",
335321
+ internalType: "struct BaseState",
335322
+ components: [
335323
+ {
335324
+ name: "baseParams",
335325
+ type: "tuple",
335326
+ internalType: "struct BaseParams",
335327
+ components: [
335328
+ {
335329
+ name: "addr",
335330
+ type: "address",
335331
+ internalType: "address"
335332
+ },
335333
+ {
335334
+ name: "version",
335335
+ type: "uint256",
335336
+ internalType: "uint256"
335337
+ },
335338
+ {
335339
+ name: "contractType",
335340
+ type: "bytes32",
335341
+ internalType: "bytes32"
335342
+ },
335343
+ {
335344
+ name: "serializedParams",
335345
+ type: "bytes",
335346
+ internalType: "bytes"
335347
+ }
335348
+ ]
335349
+ }
335350
+ ]
335351
+ },
333740
335352
  {
333741
335353
  name: "tokens",
333742
335354
  type: "tuple[]",
@@ -333767,7 +335379,7 @@ var iMarketCompressorAbi = [
333767
335379
  {
333768
335380
  name: "creditManagers",
333769
335381
  type: "tuple[]",
333770
- internalType: "struct CreditManagerData[]",
335382
+ internalType: "struct CreditSuiteData[]",
333771
335383
  components: [
333772
335384
  {
333773
335385
  name: "creditFacade",
@@ -333802,17 +335414,17 @@ var iMarketCompressorAbi = [
333802
335414
  ]
333803
335415
  },
333804
335416
  {
333805
- name: "maxQuotaMultiplier",
333806
- type: "uint256",
333807
- internalType: "uint256"
335417
+ name: "creditManager",
335418
+ type: "address",
335419
+ internalType: "address"
333808
335420
  },
333809
335421
  {
333810
- name: "creditManager",
335422
+ name: "degenNFT",
333811
335423
  type: "address",
333812
335424
  internalType: "address"
333813
335425
  },
333814
335426
  {
333815
- name: "treasury",
335427
+ name: "botList",
333816
335428
  type: "address",
333817
335429
  internalType: "address"
333818
335430
  },
@@ -333821,11 +335433,6 @@ var iMarketCompressorAbi = [
333821
335433
  type: "bool",
333822
335434
  internalType: "bool"
333823
335435
  },
333824
- {
333825
- name: "degenNFT",
333826
- type: "address",
333827
- internalType: "address"
333828
- },
333829
335436
  {
333830
335437
  name: "expirationDate",
333831
335438
  type: "uint40",
@@ -333836,11 +335443,6 @@ var iMarketCompressorAbi = [
333836
335443
  type: "uint8",
333837
335444
  internalType: "uint8"
333838
335445
  },
333839
- {
333840
- name: "botList",
333841
- type: "address",
333842
- internalType: "address"
333843
- },
333844
335446
  {
333845
335447
  name: "minDebt",
333846
335448
  type: "uint256",
@@ -333856,11 +335458,6 @@ var iMarketCompressorAbi = [
333856
335458
  type: "uint256",
333857
335459
  internalType: "uint256"
333858
335460
  },
333859
- {
333860
- name: "lossLiquidator",
333861
- type: "address",
333862
- internalType: "address"
333863
- },
333864
335461
  {
333865
335462
  name: "isPaused",
333866
335463
  type: "bool",
@@ -333930,11 +335527,6 @@ var iMarketCompressorAbi = [
333930
335527
  type: "address",
333931
335528
  internalType: "address"
333932
335529
  },
333933
- {
333934
- name: "priceOracle",
333935
- type: "address",
333936
- internalType: "address"
333937
- },
333938
335530
  {
333939
335531
  name: "maxEnabledTokens",
333940
335532
  type: "uint8",
@@ -333942,13 +335534,20 @@ var iMarketCompressorAbi = [
333942
335534
  },
333943
335535
  {
333944
335536
  name: "collateralTokens",
333945
- type: "address[]",
333946
- internalType: "address[]"
333947
- },
333948
- {
333949
- name: "liquidationThresholds",
333950
- type: "uint16[]",
333951
- internalType: "uint16[]"
335537
+ type: "tuple[]",
335538
+ internalType: "struct CollateralToken[]",
335539
+ components: [
335540
+ {
335541
+ name: "token",
335542
+ type: "address",
335543
+ internalType: "address"
335544
+ },
335545
+ {
335546
+ name: "liquidationThreshold",
335547
+ type: "uint16",
335548
+ internalType: "uint16"
335549
+ }
335550
+ ]
333952
335551
  },
333953
335552
  {
333954
335553
  name: "feeInterest",
@@ -334014,7 +335613,7 @@ var iMarketCompressorAbi = [
334014
335613
  {
334015
335614
  name: "adapters",
334016
335615
  type: "tuple[]",
334017
- internalType: "struct ContractAdapter[]",
335616
+ internalType: "struct AdapterState[]",
334018
335617
  components: [
334019
335618
  {
334020
335619
  name: "baseParams",
@@ -334049,28 +335648,33 @@ var iMarketCompressorAbi = [
334049
335648
  internalType: "address"
334050
335649
  }
334051
335650
  ]
334052
- },
334053
- {
334054
- name: "totalDebt",
334055
- type: "uint256",
334056
- internalType: "uint256"
334057
- },
334058
- {
334059
- name: "totalDebtLimit",
334060
- type: "uint256",
334061
- internalType: "uint256"
334062
- },
334063
- {
334064
- name: "availableToBorrow",
334065
- type: "uint256",
334066
- internalType: "uint256"
334067
335651
  }
334068
335652
  ]
334069
335653
  },
335654
+ {
335655
+ name: "configurator",
335656
+ type: "address",
335657
+ internalType: "address"
335658
+ },
335659
+ {
335660
+ name: "pausableAdmins",
335661
+ type: "address[]",
335662
+ internalType: "address[]"
335663
+ },
335664
+ {
335665
+ name: "unpausableAdmins",
335666
+ type: "address[]",
335667
+ internalType: "address[]"
335668
+ },
335669
+ {
335670
+ name: "emergencyLiquidators",
335671
+ type: "address[]",
335672
+ internalType: "address[]"
335673
+ },
334070
335674
  {
334071
335675
  name: "zappers",
334072
335676
  type: "tuple[]",
334073
- internalType: "struct ZapperInfo[]",
335677
+ internalType: "struct ZapperState[]",
334074
335678
  components: [
334075
335679
  {
334076
335680
  name: "baseParams",
@@ -334101,30 +335705,59 @@ var iMarketCompressorAbi = [
334101
335705
  },
334102
335706
  {
334103
335707
  name: "tokenIn",
334104
- type: "address",
334105
- internalType: "address"
335708
+ type: "tuple",
335709
+ internalType: "struct TokenData",
335710
+ components: [
335711
+ {
335712
+ name: "addr",
335713
+ type: "address",
335714
+ internalType: "address"
335715
+ },
335716
+ {
335717
+ name: "symbol",
335718
+ type: "string",
335719
+ internalType: "string"
335720
+ },
335721
+ {
335722
+ name: "name",
335723
+ type: "string",
335724
+ internalType: "string"
335725
+ },
335726
+ {
335727
+ name: "decimals",
335728
+ type: "uint8",
335729
+ internalType: "uint8"
335730
+ }
335731
+ ]
334106
335732
  },
334107
335733
  {
334108
335734
  name: "tokenOut",
334109
- type: "address",
334110
- internalType: "address"
335735
+ type: "tuple",
335736
+ internalType: "struct TokenData",
335737
+ components: [
335738
+ {
335739
+ name: "addr",
335740
+ type: "address",
335741
+ internalType: "address"
335742
+ },
335743
+ {
335744
+ name: "symbol",
335745
+ type: "string",
335746
+ internalType: "string"
335747
+ },
335748
+ {
335749
+ name: "name",
335750
+ type: "string",
335751
+ internalType: "string"
335752
+ },
335753
+ {
335754
+ name: "decimals",
335755
+ type: "uint8",
335756
+ internalType: "uint8"
335757
+ }
335758
+ ]
334111
335759
  }
334112
335760
  ]
334113
- },
334114
- {
334115
- name: "pausableAdmins",
334116
- type: "address[]",
334117
- internalType: "address[]"
334118
- },
334119
- {
334120
- name: "unpausableAdmins",
334121
- type: "address[]",
334122
- internalType: "address[]"
334123
- },
334124
- {
334125
- name: "emergencyLiquidators",
334126
- type: "address[]",
334127
- internalType: "address[]"
334128
335761
  }
334129
335762
  ]
334130
335763
  }
@@ -334141,7 +335774,7 @@ var iMarketCompressorAbi = [
334141
335774
  internalType: "struct MarketFilter",
334142
335775
  components: [
334143
335776
  {
334144
- name: "curators",
335777
+ name: "configurators",
334145
335778
  type: "address[]",
334146
335779
  internalType: "address[]"
334147
335780
  },
@@ -334165,46 +335798,19 @@ var iMarketCompressorAbi = [
334165
335798
  internalType: "struct MarketData[]",
334166
335799
  components: [
334167
335800
  {
334168
- name: "baseParams",
334169
- type: "tuple",
334170
- internalType: "struct BaseParams",
334171
- components: [
334172
- {
334173
- name: "addr",
334174
- type: "address",
334175
- internalType: "address"
334176
- },
334177
- {
334178
- name: "version",
334179
- type: "uint256",
334180
- internalType: "uint256"
334181
- },
334182
- {
334183
- name: "contractType",
334184
- type: "bytes32",
334185
- internalType: "bytes32"
334186
- },
334187
- {
334188
- name: "serializedParams",
334189
- type: "bytes",
334190
- internalType: "bytes"
334191
- }
334192
- ]
334193
- },
334194
- {
334195
- name: "owner",
335801
+ name: "acl",
334196
335802
  type: "address",
334197
335803
  internalType: "address"
334198
335804
  },
334199
335805
  {
334200
- name: "acl",
335806
+ name: "contractsRegister",
334201
335807
  type: "address",
334202
335808
  internalType: "address"
334203
335809
  },
334204
335810
  {
334205
- name: "name",
334206
- type: "string",
334207
- internalType: "string"
335811
+ name: "treasury",
335812
+ type: "address",
335813
+ internalType: "address"
334208
335814
  },
334209
335815
  {
334210
335816
  name: "pool",
@@ -334268,16 +335874,6 @@ var iMarketCompressorAbi = [
334268
335874
  type: "address",
334269
335875
  internalType: "address"
334270
335876
  },
334271
- {
334272
- name: "treasury",
334273
- type: "address",
334274
- internalType: "address"
334275
- },
334276
- {
334277
- name: "controller",
334278
- type: "address",
334279
- internalType: "address"
334280
- },
334281
335877
  {
334282
335878
  name: "underlying",
334283
335879
  type: "address",
@@ -334309,22 +335905,17 @@ var iMarketCompressorAbi = [
334309
335905
  internalType: "uint256"
334310
335906
  },
334311
335907
  {
334312
- name: "totalBorrowed",
334313
- type: "uint256",
334314
- internalType: "uint256"
334315
- },
334316
- {
334317
- name: "totalAssets",
335908
+ name: "supplyRate",
334318
335909
  type: "uint256",
334319
335910
  internalType: "uint256"
334320
335911
  },
334321
335912
  {
334322
- name: "supplyRate",
335913
+ name: "withdrawFee",
334323
335914
  type: "uint256",
334324
335915
  internalType: "uint256"
334325
335916
  },
334326
335917
  {
334327
- name: "withdrawFee",
335918
+ name: "totalBorrowed",
334328
335919
  type: "uint256",
334329
335920
  internalType: "uint256"
334330
335921
  },
@@ -334352,6 +335943,11 @@ var iMarketCompressorAbi = [
334352
335943
  name: "limit",
334353
335944
  type: "uint256",
334354
335945
  internalType: "uint256"
335946
+ },
335947
+ {
335948
+ name: "available",
335949
+ type: "uint256",
335950
+ internalType: "uint256"
334355
335951
  }
334356
335952
  ]
334357
335953
  },
@@ -334705,6 +336301,40 @@ var iMarketCompressorAbi = [
334705
336301
  }
334706
336302
  ]
334707
336303
  },
336304
+ {
336305
+ name: "lossPolicy",
336306
+ type: "tuple",
336307
+ internalType: "struct BaseState",
336308
+ components: [
336309
+ {
336310
+ name: "baseParams",
336311
+ type: "tuple",
336312
+ internalType: "struct BaseParams",
336313
+ components: [
336314
+ {
336315
+ name: "addr",
336316
+ type: "address",
336317
+ internalType: "address"
336318
+ },
336319
+ {
336320
+ name: "version",
336321
+ type: "uint256",
336322
+ internalType: "uint256"
336323
+ },
336324
+ {
336325
+ name: "contractType",
336326
+ type: "bytes32",
336327
+ internalType: "bytes32"
336328
+ },
336329
+ {
336330
+ name: "serializedParams",
336331
+ type: "bytes",
336332
+ internalType: "bytes"
336333
+ }
336334
+ ]
336335
+ }
336336
+ ]
336337
+ },
334708
336338
  {
334709
336339
  name: "tokens",
334710
336340
  type: "tuple[]",
@@ -334735,7 +336365,7 @@ var iMarketCompressorAbi = [
334735
336365
  {
334736
336366
  name: "creditManagers",
334737
336367
  type: "tuple[]",
334738
- internalType: "struct CreditManagerData[]",
336368
+ internalType: "struct CreditSuiteData[]",
334739
336369
  components: [
334740
336370
  {
334741
336371
  name: "creditFacade",
@@ -334770,17 +336400,17 @@ var iMarketCompressorAbi = [
334770
336400
  ]
334771
336401
  },
334772
336402
  {
334773
- name: "maxQuotaMultiplier",
334774
- type: "uint256",
334775
- internalType: "uint256"
336403
+ name: "creditManager",
336404
+ type: "address",
336405
+ internalType: "address"
334776
336406
  },
334777
336407
  {
334778
- name: "creditManager",
336408
+ name: "degenNFT",
334779
336409
  type: "address",
334780
336410
  internalType: "address"
334781
336411
  },
334782
336412
  {
334783
- name: "treasury",
336413
+ name: "botList",
334784
336414
  type: "address",
334785
336415
  internalType: "address"
334786
336416
  },
@@ -334789,11 +336419,6 @@ var iMarketCompressorAbi = [
334789
336419
  type: "bool",
334790
336420
  internalType: "bool"
334791
336421
  },
334792
- {
334793
- name: "degenNFT",
334794
- type: "address",
334795
- internalType: "address"
334796
- },
334797
336422
  {
334798
336423
  name: "expirationDate",
334799
336424
  type: "uint40",
@@ -334804,11 +336429,6 @@ var iMarketCompressorAbi = [
334804
336429
  type: "uint8",
334805
336430
  internalType: "uint8"
334806
336431
  },
334807
- {
334808
- name: "botList",
334809
- type: "address",
334810
- internalType: "address"
334811
- },
334812
336432
  {
334813
336433
  name: "minDebt",
334814
336434
  type: "uint256",
@@ -334824,11 +336444,6 @@ var iMarketCompressorAbi = [
334824
336444
  type: "uint256",
334825
336445
  internalType: "uint256"
334826
336446
  },
334827
- {
334828
- name: "lossLiquidator",
334829
- type: "address",
334830
- internalType: "address"
334831
- },
334832
336447
  {
334833
336448
  name: "isPaused",
334834
336449
  type: "bool",
@@ -334898,11 +336513,6 @@ var iMarketCompressorAbi = [
334898
336513
  type: "address",
334899
336514
  internalType: "address"
334900
336515
  },
334901
- {
334902
- name: "priceOracle",
334903
- type: "address",
334904
- internalType: "address"
334905
- },
334906
336516
  {
334907
336517
  name: "maxEnabledTokens",
334908
336518
  type: "uint8",
@@ -334910,13 +336520,20 @@ var iMarketCompressorAbi = [
334910
336520
  },
334911
336521
  {
334912
336522
  name: "collateralTokens",
334913
- type: "address[]",
334914
- internalType: "address[]"
334915
- },
334916
- {
334917
- name: "liquidationThresholds",
334918
- type: "uint16[]",
334919
- internalType: "uint16[]"
336523
+ type: "tuple[]",
336524
+ internalType: "struct CollateralToken[]",
336525
+ components: [
336526
+ {
336527
+ name: "token",
336528
+ type: "address",
336529
+ internalType: "address"
336530
+ },
336531
+ {
336532
+ name: "liquidationThreshold",
336533
+ type: "uint16",
336534
+ internalType: "uint16"
336535
+ }
336536
+ ]
334920
336537
  },
334921
336538
  {
334922
336539
  name: "feeInterest",
@@ -334982,7 +336599,7 @@ var iMarketCompressorAbi = [
334982
336599
  {
334983
336600
  name: "adapters",
334984
336601
  type: "tuple[]",
334985
- internalType: "struct ContractAdapter[]",
336602
+ internalType: "struct AdapterState[]",
334986
336603
  components: [
334987
336604
  {
334988
336605
  name: "baseParams",
@@ -335017,28 +336634,33 @@ var iMarketCompressorAbi = [
335017
336634
  internalType: "address"
335018
336635
  }
335019
336636
  ]
335020
- },
335021
- {
335022
- name: "totalDebt",
335023
- type: "uint256",
335024
- internalType: "uint256"
335025
- },
335026
- {
335027
- name: "totalDebtLimit",
335028
- type: "uint256",
335029
- internalType: "uint256"
335030
- },
335031
- {
335032
- name: "availableToBorrow",
335033
- type: "uint256",
335034
- internalType: "uint256"
335035
336637
  }
335036
336638
  ]
335037
336639
  },
336640
+ {
336641
+ name: "configurator",
336642
+ type: "address",
336643
+ internalType: "address"
336644
+ },
336645
+ {
336646
+ name: "pausableAdmins",
336647
+ type: "address[]",
336648
+ internalType: "address[]"
336649
+ },
336650
+ {
336651
+ name: "unpausableAdmins",
336652
+ type: "address[]",
336653
+ internalType: "address[]"
336654
+ },
336655
+ {
336656
+ name: "emergencyLiquidators",
336657
+ type: "address[]",
336658
+ internalType: "address[]"
336659
+ },
335038
336660
  {
335039
336661
  name: "zappers",
335040
336662
  type: "tuple[]",
335041
- internalType: "struct ZapperInfo[]",
336663
+ internalType: "struct ZapperState[]",
335042
336664
  components: [
335043
336665
  {
335044
336666
  name: "baseParams",
@@ -335069,30 +336691,59 @@ var iMarketCompressorAbi = [
335069
336691
  },
335070
336692
  {
335071
336693
  name: "tokenIn",
335072
- type: "address",
335073
- internalType: "address"
336694
+ type: "tuple",
336695
+ internalType: "struct TokenData",
336696
+ components: [
336697
+ {
336698
+ name: "addr",
336699
+ type: "address",
336700
+ internalType: "address"
336701
+ },
336702
+ {
336703
+ name: "symbol",
336704
+ type: "string",
336705
+ internalType: "string"
336706
+ },
336707
+ {
336708
+ name: "name",
336709
+ type: "string",
336710
+ internalType: "string"
336711
+ },
336712
+ {
336713
+ name: "decimals",
336714
+ type: "uint8",
336715
+ internalType: "uint8"
336716
+ }
336717
+ ]
335074
336718
  },
335075
336719
  {
335076
336720
  name: "tokenOut",
335077
- type: "address",
335078
- internalType: "address"
336721
+ type: "tuple",
336722
+ internalType: "struct TokenData",
336723
+ components: [
336724
+ {
336725
+ name: "addr",
336726
+ type: "address",
336727
+ internalType: "address"
336728
+ },
336729
+ {
336730
+ name: "symbol",
336731
+ type: "string",
336732
+ internalType: "string"
336733
+ },
336734
+ {
336735
+ name: "name",
336736
+ type: "string",
336737
+ internalType: "string"
336738
+ },
336739
+ {
336740
+ name: "decimals",
336741
+ type: "uint8",
336742
+ internalType: "uint8"
336743
+ }
336744
+ ]
335079
336745
  }
335080
336746
  ]
335081
- },
335082
- {
335083
- name: "pausableAdmins",
335084
- type: "address[]",
335085
- internalType: "address[]"
335086
- },
335087
- {
335088
- name: "unpausableAdmins",
335089
- type: "address[]",
335090
- internalType: "address[]"
335091
- },
335092
- {
335093
- name: "emergencyLiquidators",
335094
- type: "address[]",
335095
- internalType: "address[]"
335096
336747
  }
335097
336748
  ]
335098
336749
  }
@@ -335109,7 +336760,7 @@ var iMarketCompressorAbi = [
335109
336760
  internalType: "struct MarketFilter",
335110
336761
  components: [
335111
336762
  {
335112
- name: "curators",
336763
+ name: "configurators",
335113
336764
  type: "address[]",
335114
336765
  internalType: "address[]"
335115
336766
  },
@@ -335174,75 +336825,137 @@ var iMarketCompressorAbi = [
335174
336825
  var iPriceFeedCompressorAbi = [
335175
336826
  {
335176
336827
  type: "function",
335177
- inputs: [],
335178
336828
  name: "contractType",
335179
- outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
336829
+ inputs: [],
336830
+ outputs: [
336831
+ {
336832
+ name: "",
336833
+ type: "bytes32",
336834
+ internalType: "bytes32"
336835
+ }
336836
+ ],
335180
336837
  stateMutability: "view"
335181
336838
  },
335182
336839
  {
335183
336840
  type: "function",
336841
+ name: "getPriceFeeds",
335184
336842
  inputs: [
335185
- { name: "priceOracle", internalType: "address", type: "address" },
335186
- { name: "tokens", internalType: "address[]", type: "address[]" }
336843
+ {
336844
+ name: "priceOracle",
336845
+ type: "address",
336846
+ internalType: "address"
336847
+ },
336848
+ {
336849
+ name: "tokens",
336850
+ type: "address[]",
336851
+ internalType: "address[]"
336852
+ }
335187
336853
  ],
335188
- name: "getPriceFeeds",
335189
336854
  outputs: [
335190
336855
  {
335191
336856
  name: "priceFeedMap",
335192
- internalType: "struct PriceFeedMapEntry[]",
335193
336857
  type: "tuple[]",
336858
+ internalType: "struct PriceFeedMapEntry[]",
335194
336859
  components: [
335195
- { name: "token", internalType: "address", type: "address" },
335196
- { name: "reserve", internalType: "bool", type: "bool" },
335197
- { name: "priceFeed", internalType: "address", type: "address" },
335198
- { name: "stalenessPeriod", internalType: "uint32", type: "uint32" }
336860
+ {
336861
+ name: "token",
336862
+ type: "address",
336863
+ internalType: "address"
336864
+ },
336865
+ {
336866
+ name: "reserve",
336867
+ type: "bool",
336868
+ internalType: "bool"
336869
+ },
336870
+ {
336871
+ name: "priceFeed",
336872
+ type: "address",
336873
+ internalType: "address"
336874
+ },
336875
+ {
336876
+ name: "stalenessPeriod",
336877
+ type: "uint32",
336878
+ internalType: "uint32"
336879
+ }
335199
336880
  ]
335200
336881
  },
335201
336882
  {
335202
336883
  name: "priceFeedTree",
335203
- internalType: "struct PriceFeedTreeNode[]",
335204
336884
  type: "tuple[]",
336885
+ internalType: "struct PriceFeedTreeNode[]",
335205
336886
  components: [
335206
336887
  {
335207
336888
  name: "baseParams",
335208
- internalType: "struct BaseParams",
335209
336889
  type: "tuple",
336890
+ internalType: "struct BaseParams",
335210
336891
  components: [
335211
- { name: "addr", internalType: "address", type: "address" },
335212
- { name: "version", internalType: "uint256", type: "uint256" },
336892
+ {
336893
+ name: "addr",
336894
+ type: "address",
336895
+ internalType: "address"
336896
+ },
336897
+ {
336898
+ name: "version",
336899
+ type: "uint256",
336900
+ internalType: "uint256"
336901
+ },
335213
336902
  {
335214
336903
  name: "contractType",
335215
- internalType: "bytes32",
335216
- type: "bytes32"
336904
+ type: "bytes32",
336905
+ internalType: "bytes32"
335217
336906
  },
335218
336907
  {
335219
336908
  name: "serializedParams",
335220
- internalType: "bytes",
335221
- type: "bytes"
336909
+ type: "bytes",
336910
+ internalType: "bytes"
335222
336911
  }
335223
336912
  ]
335224
336913
  },
335225
- { name: "decimals", internalType: "uint8", type: "uint8" },
335226
- { name: "skipCheck", internalType: "bool", type: "bool" },
335227
- { name: "updatable", internalType: "bool", type: "bool" },
336914
+ {
336915
+ name: "decimals",
336916
+ type: "uint8",
336917
+ internalType: "uint8"
336918
+ },
336919
+ {
336920
+ name: "skipCheck",
336921
+ type: "bool",
336922
+ internalType: "bool"
336923
+ },
336924
+ {
336925
+ name: "updatable",
336926
+ type: "bool",
336927
+ internalType: "bool"
336928
+ },
335228
336929
  {
335229
336930
  name: "underlyingFeeds",
335230
- internalType: "address[]",
335231
- type: "address[]"
336931
+ type: "address[]",
336932
+ internalType: "address[]"
335232
336933
  },
335233
336934
  {
335234
336935
  name: "underlyingStalenessPeriods",
335235
- internalType: "uint32[]",
335236
- type: "uint32[]"
336936
+ type: "uint32[]",
336937
+ internalType: "uint32[]"
335237
336938
  },
335238
336939
  {
335239
336940
  name: "answer",
335240
- internalType: "struct PriceFeedAnswer",
335241
336941
  type: "tuple",
336942
+ internalType: "struct PriceFeedAnswer",
335242
336943
  components: [
335243
- { name: "price", internalType: "int256", type: "int256" },
335244
- { name: "updatedAt", internalType: "uint256", type: "uint256" },
335245
- { name: "success", internalType: "bool", type: "bool" }
336944
+ {
336945
+ name: "price",
336946
+ type: "int256",
336947
+ internalType: "int256"
336948
+ },
336949
+ {
336950
+ name: "updatedAt",
336951
+ type: "uint256",
336952
+ internalType: "uint256"
336953
+ },
336954
+ {
336955
+ name: "success",
336956
+ type: "bool",
336957
+ internalType: "bool"
336958
+ }
335246
336959
  ]
335247
336960
  }
335248
336961
  ]
@@ -335252,65 +336965,119 @@ var iPriceFeedCompressorAbi = [
335252
336965
  },
335253
336966
  {
335254
336967
  type: "function",
335255
- inputs: [{ name: "priceOracle", internalType: "address", type: "address" }],
335256
336968
  name: "getPriceFeeds",
336969
+ inputs: [
336970
+ {
336971
+ name: "priceOracle",
336972
+ type: "address",
336973
+ internalType: "address"
336974
+ }
336975
+ ],
335257
336976
  outputs: [
335258
336977
  {
335259
336978
  name: "priceFeedMap",
335260
- internalType: "struct PriceFeedMapEntry[]",
335261
336979
  type: "tuple[]",
336980
+ internalType: "struct PriceFeedMapEntry[]",
335262
336981
  components: [
335263
- { name: "token", internalType: "address", type: "address" },
335264
- { name: "reserve", internalType: "bool", type: "bool" },
335265
- { name: "priceFeed", internalType: "address", type: "address" },
335266
- { name: "stalenessPeriod", internalType: "uint32", type: "uint32" }
336982
+ {
336983
+ name: "token",
336984
+ type: "address",
336985
+ internalType: "address"
336986
+ },
336987
+ {
336988
+ name: "reserve",
336989
+ type: "bool",
336990
+ internalType: "bool"
336991
+ },
336992
+ {
336993
+ name: "priceFeed",
336994
+ type: "address",
336995
+ internalType: "address"
336996
+ },
336997
+ {
336998
+ name: "stalenessPeriod",
336999
+ type: "uint32",
337000
+ internalType: "uint32"
337001
+ }
335267
337002
  ]
335268
337003
  },
335269
337004
  {
335270
337005
  name: "priceFeedTree",
335271
- internalType: "struct PriceFeedTreeNode[]",
335272
337006
  type: "tuple[]",
337007
+ internalType: "struct PriceFeedTreeNode[]",
335273
337008
  components: [
335274
337009
  {
335275
337010
  name: "baseParams",
335276
- internalType: "struct BaseParams",
335277
337011
  type: "tuple",
337012
+ internalType: "struct BaseParams",
335278
337013
  components: [
335279
- { name: "addr", internalType: "address", type: "address" },
335280
- { name: "version", internalType: "uint256", type: "uint256" },
337014
+ {
337015
+ name: "addr",
337016
+ type: "address",
337017
+ internalType: "address"
337018
+ },
337019
+ {
337020
+ name: "version",
337021
+ type: "uint256",
337022
+ internalType: "uint256"
337023
+ },
335281
337024
  {
335282
337025
  name: "contractType",
335283
- internalType: "bytes32",
335284
- type: "bytes32"
337026
+ type: "bytes32",
337027
+ internalType: "bytes32"
335285
337028
  },
335286
337029
  {
335287
337030
  name: "serializedParams",
335288
- internalType: "bytes",
335289
- type: "bytes"
337031
+ type: "bytes",
337032
+ internalType: "bytes"
335290
337033
  }
335291
337034
  ]
335292
337035
  },
335293
- { name: "decimals", internalType: "uint8", type: "uint8" },
335294
- { name: "skipCheck", internalType: "bool", type: "bool" },
335295
- { name: "updatable", internalType: "bool", type: "bool" },
337036
+ {
337037
+ name: "decimals",
337038
+ type: "uint8",
337039
+ internalType: "uint8"
337040
+ },
337041
+ {
337042
+ name: "skipCheck",
337043
+ type: "bool",
337044
+ internalType: "bool"
337045
+ },
337046
+ {
337047
+ name: "updatable",
337048
+ type: "bool",
337049
+ internalType: "bool"
337050
+ },
335296
337051
  {
335297
337052
  name: "underlyingFeeds",
335298
- internalType: "address[]",
335299
- type: "address[]"
337053
+ type: "address[]",
337054
+ internalType: "address[]"
335300
337055
  },
335301
337056
  {
335302
337057
  name: "underlyingStalenessPeriods",
335303
- internalType: "uint32[]",
335304
- type: "uint32[]"
337058
+ type: "uint32[]",
337059
+ internalType: "uint32[]"
335305
337060
  },
335306
337061
  {
335307
337062
  name: "answer",
335308
- internalType: "struct PriceFeedAnswer",
335309
337063
  type: "tuple",
337064
+ internalType: "struct PriceFeedAnswer",
335310
337065
  components: [
335311
- { name: "price", internalType: "int256", type: "int256" },
335312
- { name: "updatedAt", internalType: "uint256", type: "uint256" },
335313
- { name: "success", internalType: "bool", type: "bool" }
337066
+ {
337067
+ name: "price",
337068
+ type: "int256",
337069
+ internalType: "int256"
337070
+ },
337071
+ {
337072
+ name: "updatedAt",
337073
+ type: "uint256",
337074
+ internalType: "uint256"
337075
+ },
337076
+ {
337077
+ name: "success",
337078
+ type: "bool",
337079
+ internalType: "bool"
337080
+ }
335314
337081
  ]
335315
337082
  }
335316
337083
  ]
@@ -335320,56 +337087,92 @@ var iPriceFeedCompressorAbi = [
335320
337087
  },
335321
337088
  {
335322
337089
  type: "function",
337090
+ name: "loadPriceFeedTree",
335323
337091
  inputs: [
335324
- { name: "priceFeeds", internalType: "address[]", type: "address[]" }
337092
+ {
337093
+ name: "priceFeeds",
337094
+ type: "address[]",
337095
+ internalType: "address[]"
337096
+ }
335325
337097
  ],
335326
- name: "loadPriceFeedTree",
335327
337098
  outputs: [
335328
337099
  {
335329
337100
  name: "priceFeedTree",
335330
- internalType: "struct PriceFeedTreeNode[]",
335331
337101
  type: "tuple[]",
337102
+ internalType: "struct PriceFeedTreeNode[]",
335332
337103
  components: [
335333
337104
  {
335334
337105
  name: "baseParams",
335335
- internalType: "struct BaseParams",
335336
337106
  type: "tuple",
337107
+ internalType: "struct BaseParams",
335337
337108
  components: [
335338
- { name: "addr", internalType: "address", type: "address" },
335339
- { name: "version", internalType: "uint256", type: "uint256" },
337109
+ {
337110
+ name: "addr",
337111
+ type: "address",
337112
+ internalType: "address"
337113
+ },
337114
+ {
337115
+ name: "version",
337116
+ type: "uint256",
337117
+ internalType: "uint256"
337118
+ },
335340
337119
  {
335341
337120
  name: "contractType",
335342
- internalType: "bytes32",
335343
- type: "bytes32"
337121
+ type: "bytes32",
337122
+ internalType: "bytes32"
335344
337123
  },
335345
337124
  {
335346
337125
  name: "serializedParams",
335347
- internalType: "bytes",
335348
- type: "bytes"
337126
+ type: "bytes",
337127
+ internalType: "bytes"
335349
337128
  }
335350
337129
  ]
335351
337130
  },
335352
- { name: "decimals", internalType: "uint8", type: "uint8" },
335353
- { name: "skipCheck", internalType: "bool", type: "bool" },
335354
- { name: "updatable", internalType: "bool", type: "bool" },
337131
+ {
337132
+ name: "decimals",
337133
+ type: "uint8",
337134
+ internalType: "uint8"
337135
+ },
337136
+ {
337137
+ name: "skipCheck",
337138
+ type: "bool",
337139
+ internalType: "bool"
337140
+ },
337141
+ {
337142
+ name: "updatable",
337143
+ type: "bool",
337144
+ internalType: "bool"
337145
+ },
335355
337146
  {
335356
337147
  name: "underlyingFeeds",
335357
- internalType: "address[]",
335358
- type: "address[]"
337148
+ type: "address[]",
337149
+ internalType: "address[]"
335359
337150
  },
335360
337151
  {
335361
337152
  name: "underlyingStalenessPeriods",
335362
- internalType: "uint32[]",
335363
- type: "uint32[]"
337153
+ type: "uint32[]",
337154
+ internalType: "uint32[]"
335364
337155
  },
335365
337156
  {
335366
337157
  name: "answer",
335367
- internalType: "struct PriceFeedAnswer",
335368
337158
  type: "tuple",
337159
+ internalType: "struct PriceFeedAnswer",
335369
337160
  components: [
335370
- { name: "price", internalType: "int256", type: "int256" },
335371
- { name: "updatedAt", internalType: "uint256", type: "uint256" },
335372
- { name: "success", internalType: "bool", type: "bool" }
337161
+ {
337162
+ name: "price",
337163
+ type: "int256",
337164
+ internalType: "int256"
337165
+ },
337166
+ {
337167
+ name: "updatedAt",
337168
+ type: "uint256",
337169
+ internalType: "uint256"
337170
+ },
337171
+ {
337172
+ name: "success",
337173
+ type: "bool",
337174
+ internalType: "bool"
337175
+ }
335373
337176
  ]
335374
337177
  }
335375
337178
  ]
@@ -335379,29 +337182,35 @@ var iPriceFeedCompressorAbi = [
335379
337182
  },
335380
337183
  {
335381
337184
  type: "function",
335382
- inputs: [],
335383
337185
  name: "version",
335384
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
337186
+ inputs: [],
337187
+ outputs: [
337188
+ {
337189
+ name: "",
337190
+ type: "uint256",
337191
+ internalType: "uint256"
337192
+ }
337193
+ ],
335385
337194
  stateMutability: "view"
335386
337195
  },
335387
337196
  {
335388
337197
  type: "event",
335389
- anonymous: false,
337198
+ name: "SetSerializer",
335390
337199
  inputs: [
335391
337200
  {
335392
337201
  name: "contractType",
335393
- internalType: "bytes32",
335394
337202
  type: "bytes32",
335395
- indexed: true
337203
+ indexed: true,
337204
+ internalType: "bytes32"
335396
337205
  },
335397
337206
  {
335398
337207
  name: "serializer",
335399
- internalType: "address",
335400
337208
  type: "address",
335401
- indexed: true
337209
+ indexed: true,
337210
+ internalType: "address"
335402
337211
  }
335403
337212
  ],
335404
- name: "SetSerializer"
337213
+ anonymous: false
335405
337214
  }
335406
337215
  ];
335407
337216
  var bptStablePriceFeedAbi = [
@@ -358105,7 +359914,6 @@ var CreditFacadeV300Contract = class extends BaseContract {
358105
359914
  const decimals = this.sdk.tokensMeta.decimals(this.underlying);
358106
359915
  return {
358107
359916
  ...super.stateHuman(raw),
358108
- maxQuotaMultiplier: Number(this.maxQuotaMultiplier),
358109
359917
  expirable: this.expirable,
358110
359918
  isDegenMode: this.degenNFT !== ADDRESS_0X0,
358111
359919
  degenNFT: this.labelAddress(this.degenNFT),
@@ -358242,7 +360050,6 @@ var CreditFacadeV310Contract = class extends BaseContract {
358242
360050
  const decimals = this.sdk.tokensMeta.decimals(this.underlying);
358243
360051
  return {
358244
360052
  ...super.stateHuman(raw),
358245
- maxQuotaMultiplier: Number(this.maxQuotaMultiplier),
358246
360053
  expirable: this.expirable,
358247
360054
  isDegenMode: this.degenNFT !== ADDRESS_0X0,
358248
360055
  degenNFT: this.labelAddress(this.degenNFT),
@@ -358363,7 +360170,7 @@ var CreditManagerV300Contract = class extends BaseContract {
358363
360170
  */
358364
360171
  liquidationThresholds;
358365
360172
  constructor(sdk, { creditManager, adapters }) {
358366
- const { baseParams, collateralTokens, liquidationThresholds, ...rest } = creditManager;
360173
+ const { baseParams, collateralTokens, ...rest } = creditManager;
358367
360174
  super(sdk, {
358368
360175
  ...baseParams,
358369
360176
  name: `CreditManagerV300(${creditManager.name})`,
@@ -358371,7 +360178,7 @@ var CreditManagerV300Contract = class extends BaseContract {
358371
360178
  });
358372
360179
  Object.assign(this, rest);
358373
360180
  this.liquidationThresholds = new AddressMap(
358374
- collateralTokens.map((t, i) => [t, liquidationThresholds[i]])
360181
+ collateralTokens.map((ct) => [ct.token, ct.liquidationThreshold])
358375
360182
  );
358376
360183
  this.adapters = new AddressMap();
358377
360184
  for (const adapterData of adapters) {
@@ -358393,7 +360200,6 @@ var CreditManagerV300Contract = class extends BaseContract {
358393
360200
  pool: this.labelAddress(this.pool),
358394
360201
  creditFacade: this.labelAddress(this.creditFacade),
358395
360202
  creditConfigurator: this.labelAddress(this.creditConfigurator),
358396
- priceOracle: this.labelAddress(this.priceOracle),
358397
360203
  maxEnabledTokens: this.maxEnabledTokens,
358398
360204
  collateralTokens: Object.fromEntries(
358399
360205
  this.liquidationThresholds.entries().map(([k, v]) => [
@@ -358443,7 +360249,7 @@ var CreditManagerV310Contract = class extends BaseContract {
358443
360249
  */
358444
360250
  liquidationThresholds;
358445
360251
  constructor(sdk, { creditManager, adapters }) {
358446
- const { baseParams, collateralTokens, liquidationThresholds, ...rest } = creditManager;
360252
+ const { baseParams, collateralTokens, ...rest } = creditManager;
358447
360253
  super(sdk, {
358448
360254
  ...baseParams,
358449
360255
  name: `CreditManagerV310(${creditManager.name})`,
@@ -358451,7 +360257,7 @@ var CreditManagerV310Contract = class extends BaseContract {
358451
360257
  });
358452
360258
  Object.assign(this, rest);
358453
360259
  this.liquidationThresholds = new AddressMap(
358454
- collateralTokens.map((t, i) => [t, liquidationThresholds[i]])
360260
+ collateralTokens.map((ct) => [ct.token, ct.liquidationThreshold])
358455
360261
  );
358456
360262
  this.adapters = new AddressMap();
358457
360263
  for (const adapterData of adapters) {
@@ -358473,7 +360279,6 @@ var CreditManagerV310Contract = class extends BaseContract {
358473
360279
  pool: this.labelAddress(this.pool),
358474
360280
  creditFacade: this.labelAddress(this.creditFacade),
358475
360281
  creditConfigurator: this.labelAddress(this.creditConfigurator),
358476
- priceOracle: this.labelAddress(this.priceOracle),
358477
360282
  maxEnabledTokens: this.maxEnabledTokens,
358478
360283
  collateralTokens: Object.fromEntries(
358479
360284
  this.liquidationThresholds.entries().map(([k, v]) => [
@@ -358527,12 +360332,12 @@ var CreditFactory = class extends SDKConstruct {
358527
360332
  super(sdk);
358528
360333
  const { creditManagers, pool } = marketData;
358529
360334
  const creditManager = creditManagers[index2];
358530
- const { name, collateralTokens, liquidationThresholds } = creditManager.creditManager;
360335
+ const { name, collateralTokens } = creditManager.creditManager;
358531
360336
  this.name = name;
358532
360337
  this.pool = pool.baseParams.addr;
358533
360338
  this.underlying = pool.underlying;
358534
360339
  this.collateralTokens = Object.fromEntries(
358535
- collateralTokens.map((t, i) => [t, liquidationThresholds[i]])
360340
+ collateralTokens.map((ct) => [ct.token, ct.liquidationThreshold])
358536
360341
  );
358537
360342
  if (creditManager.creditManager.baseParams.version < 310) {
358538
360343
  this.creditManager = new CreditManagerV300Contract(sdk, creditManager);
@@ -358707,7 +360512,30 @@ var LinearModelContract = class extends BaseContract {
358707
360512
  };
358708
360513
  }
358709
360514
  };
358710
- var abi27 = poolV3Abi;
360515
+ var abi27 = iMarketConfiguratorV310Abi;
360516
+ var MarketConfiguratorContract = class extends BaseContract {
360517
+ constructor(sdk, address) {
360518
+ super(sdk, {
360519
+ abi: abi27,
360520
+ addr: address,
360521
+ contractType: AP_MARKET_CONFIGURATOR,
360522
+ version: 0
360523
+ });
360524
+ }
360525
+ processLog(log2) {
360526
+ switch (log2.eventName) {
360527
+ // case "DeployDegenNFT":
360528
+ // case "SetName":
360529
+ // case "SetPriceFeedFromStore":
360530
+ // case "SetReservePriceFeedFromStore":
360531
+ case "RemoveMarket":
360532
+ case "CreateMarket":
360533
+ this.dirty = true;
360534
+ break;
360535
+ }
360536
+ }
360537
+ };
360538
+ var abi28 = poolV3Abi;
358711
360539
  var PoolContract = class extends BaseContract {
358712
360540
  creditManagerDebtParams;
358713
360541
  constructor(sdk, data) {
@@ -358715,7 +360543,7 @@ var PoolContract = class extends BaseContract {
358715
360543
  super(sdk, {
358716
360544
  ...data.baseParams,
358717
360545
  name: `PoolV3(${data.name})`,
358718
- abi: abi27
360546
+ abi: abi28
358719
360547
  });
358720
360548
  Object.assign(this, rest);
358721
360549
  this.creditManagerDebtParams = new AddressMap(
@@ -358760,7 +360588,6 @@ var PoolContract = class extends BaseContract {
358760
360588
  }
358761
360589
  ])
358762
360590
  ),
358763
- totalAssets: formatBNvalue(this.totalAssets, this.decimals, 2, raw),
358764
360591
  totalSupply: formatBNvalue(this.totalSupply, this.decimals, 2, raw),
358765
360592
  supplyRate: `${formatBNvalue(this.supplyRate, 25, 2, raw)}%`,
358766
360593
  baseInterestIndex: `${formatBNvalue(this.totalSupply, 25, 2, raw)}%`,
@@ -359262,7 +361089,7 @@ var MellowLRTPriceFeedContract = class extends AbstractLPPriceFeedContract {
359262
361089
  return stack.totalValue * BigInt(1e18) / stack.totalSupply;
359263
361090
  }
359264
361091
  };
359265
- var abi28 = pendleTWAPPTPriceFeedAbi;
361092
+ var abi29 = pendleTWAPPTPriceFeedAbi;
359266
361093
  var PendleTWAPPTPriceFeed = class extends AbstractPriceFeedContract {
359267
361094
  market;
359268
361095
  sy;
@@ -359274,7 +361101,7 @@ var PendleTWAPPTPriceFeed = class extends AbstractPriceFeedContract {
359274
361101
  super(sdk, {
359275
361102
  ...args,
359276
361103
  name: "PendleTWAPPTPriceFeed",
359277
- abi: abi28
361104
+ abi: abi29
359278
361105
  });
359279
361106
  const decoded = decodeAbiParameters(
359280
361107
  [
@@ -359667,8 +361494,11 @@ var PriceFeedRegister = class extends SDKConstruct {
359667
361494
  * Loads PARTIAL information about all updatable price feeds from MarketCompressor
359668
361495
  * This can later be used to load price feed updates
359669
361496
  */
359670
- async preloadUpdatablePriceFeeds(curators, pools) {
359671
- const feedsData = await this.#loadUpdatablePriceFeeds(curators, pools);
361497
+ async preloadUpdatablePriceFeeds(marketConfigurators, pools) {
361498
+ const feedsData = await this.#loadUpdatablePriceFeeds(
361499
+ marketConfigurators,
361500
+ pools
361501
+ );
359672
361502
  for (const data of feedsData) {
359673
361503
  const feed = this.#create({ baseParams: data });
359674
361504
  this.#feeds.upsert(feed.address, feed);
@@ -359676,12 +361506,15 @@ var PriceFeedRegister = class extends SDKConstruct {
359676
361506
  }
359677
361507
  /**
359678
361508
  * Generates price update transaction via multicall3 without any market data knowledge
359679
- * @param curators
361509
+ * @param marketConfigurators
359680
361510
  * @param pools
359681
361511
  * @returns
359682
361512
  */
359683
- async getUpdatePriceFeedsTx(curators, pools) {
359684
- const feedsData = await this.#loadUpdatablePriceFeeds(curators, pools);
361513
+ async getUpdatePriceFeedsTx(marketConfigurators, pools) {
361514
+ const feedsData = await this.#loadUpdatablePriceFeeds(
361515
+ marketConfigurators,
361516
+ pools
361517
+ );
359685
361518
  const feeds = feedsData.map((data) => this.#create({ baseParams: data }));
359686
361519
  const updates = await this.#generatePriceFeedsUpdateTxs(feeds);
359687
361520
  return createRawTx(
@@ -359733,18 +361566,23 @@ var PriceFeedRegister = class extends SDKConstruct {
359733
361566
  }
359734
361567
  return result;
359735
361568
  }
359736
- async #loadUpdatablePriceFeeds(curators, pools) {
361569
+ async #loadUpdatablePriceFeeds(marketConfigurators, pools) {
359737
361570
  const marketCompressorAddress = this.sdk.addressProvider.getAddress(
359738
361571
  AP_MARKET_COMPRESSOR,
359739
361572
  310
359740
361573
  );
361574
+ const configurators = marketConfigurators ?? this.sdk.marketRegister.marketConfigurators.map((mc) => mc.address);
361575
+ this.logger?.debug(
361576
+ { configurators, pools },
361577
+ "calling getUpdatablePriceFeeds"
361578
+ );
359741
361579
  const result = await this.provider.publicClient.readContract({
359742
361580
  address: marketCompressorAddress,
359743
361581
  abi: iMarketCompressorAbi,
359744
361582
  functionName: "getUpdatablePriceFeeds",
359745
361583
  args: [
359746
361584
  {
359747
- curators: curators ?? this.sdk.marketRegister.curators,
361585
+ configurators,
359748
361586
  pools: pools ?? [],
359749
361587
  underlying: ADDRESS_0X0
359750
361588
  }
@@ -360134,7 +361972,7 @@ var PriceOracleV310Contract = class extends PriceOracleBaseContract {
360134
361972
  };
360135
361973
  var MarketFactory = class extends SDKConstruct {
360136
361974
  acl;
360137
- riskCurator;
361975
+ configurator;
360138
361976
  poolFactory;
360139
361977
  priceOracle;
360140
361978
  creditManagers = [];
@@ -360146,9 +361984,16 @@ var MarketFactory = class extends SDKConstruct {
360146
361984
  constructor(sdk, marketData) {
360147
361985
  super(sdk);
360148
361986
  this.state = marketData;
360149
- this.riskCurator = marketData.owner;
361987
+ this.configurator = new MarketConfiguratorContract(
361988
+ sdk,
361989
+ marketData.configurator
361990
+ );
360150
361991
  this.acl = marketData.acl;
360151
- for (const t of marketData.tokens) {
361992
+ const allTokens = [
361993
+ ...marketData.tokens,
361994
+ ...marketData.zappers.flatMap((z2) => [z2.tokenIn, z2.tokenOut])
361995
+ ];
361996
+ for (const t of allTokens) {
360152
361997
  sdk.tokensMeta.upsert(t.addr, t);
360153
361998
  sdk.provider.addressLabels.set(t.addr, t.symbol);
360154
361999
  }
@@ -360172,7 +362017,7 @@ var MarketFactory = class extends SDKConstruct {
360172
362017
  }
360173
362018
  }
360174
362019
  get dirty() {
360175
- return this.poolFactory.dirty || this.priceOracle.dirty || this.creditManagers.some((cm) => cm.dirty);
362020
+ return this.configurator.dirty || this.poolFactory.dirty || this.priceOracle.dirty || this.creditManagers.some((cm) => cm.dirty);
360176
362021
  }
360177
362022
  stateHuman(raw = true) {
360178
362023
  return {
@@ -360190,8 +362035,8 @@ var MarketFactory = class extends SDKConstruct {
360190
362035
  address: z2.baseParams.addr,
360191
362036
  contractType: z2.baseParams.contractType,
360192
362037
  version: Number(z2.baseParams.version),
360193
- tokenIn: this.labelAddress(z2.tokenIn),
360194
- tokenOut: this.labelAddress(z2.tokenOut)
362038
+ tokenIn: this.labelAddress(z2.tokenIn.addr),
362039
+ tokenOut: this.labelAddress(z2.tokenOut.addr)
360195
362040
  }))
360196
362041
  };
360197
362042
  }
@@ -360430,81 +362275,47 @@ async function simulateMulticall(client, parameters) {
360430
362275
  throw new BaseError2("multicall results mismatch");
360431
362276
  return results;
360432
362277
  }
360433
- var abi29 = iMarketConfiguratorV310Abi;
360434
- var MarketConfiguratorContract = class extends BaseContract {
360435
- constructor(sdk, address) {
360436
- super(sdk, {
360437
- abi: abi29,
360438
- addr: address,
360439
- contractType: AP_MARKET_CONFIGURATOR,
360440
- version: 0
360441
- });
360442
- }
360443
- processLog(log2) {
360444
- switch (log2.eventName) {
360445
- // case "DeployDegenNFT":
360446
- // case "SetName":
360447
- // case "SetPriceFeedFromStore":
360448
- // case "SetReservePriceFeedFromStore":
360449
- case "RemoveMarket":
360450
- case "CreateMarket":
360451
- this.dirty = true;
360452
- break;
360453
- }
360454
- }
360455
- };
360456
362278
  var MarketRegister = class extends SDKConstruct {
360457
362279
  #logger;
360458
- #curators;
360459
362280
  /**
360460
362281
  * Mapping pool.address -> MarketFactory
360461
362282
  */
360462
362283
  #markets = new AddressMap();
360463
- // TODO: MarketRegister can be this contract, but v3.0 does not have it
360464
- marketConfigurator;
360465
362284
  constructor(sdk) {
360466
362285
  super(sdk);
360467
362286
  this.#logger = childLogger("MarketRegister", sdk.logger);
360468
- try {
360469
- const mkAddr = this.sdk.addressProvider.getLatestVersion(
360470
- AP_MARKET_CONFIGURATOR
360471
- );
360472
- this.marketConfigurator = new MarketConfiguratorContract(sdk, mkAddr);
360473
- } catch (e) {
360474
- this.#logger?.warn(e);
360475
- }
360476
362287
  }
360477
- async loadMarkets(curators, ignoreUpdateablePrices) {
360478
- if (!curators.length) {
360479
- this.#logger?.warn("no curators provided, skipping loadMarkets");
362288
+ async loadMarkets(marketConfigurators, ignoreUpdateablePrices) {
362289
+ if (!marketConfigurators.length) {
362290
+ this.#logger?.warn(
362291
+ "no market configurators provided, skipping loadMarkets"
362292
+ );
360480
362293
  return;
360481
362294
  }
360482
- this.#curators = curators;
360483
- await this.#loadMarkets(curators, [], ignoreUpdateablePrices);
362295
+ await this.#loadMarkets(marketConfigurators, [], ignoreUpdateablePrices);
360484
362296
  }
360485
362297
  async syncState() {
360486
- if (this.marketConfigurator?.dirty) {
360487
- this.#logger?.debug(`need to reload all markets`);
360488
- await this.#loadMarkets(this.curators, []);
360489
- return;
360490
- }
360491
362298
  const pools = this.markets.filter((m) => m.dirty).map((m) => m.poolFactory.pool.address);
360492
362299
  if (pools.length) {
360493
362300
  this.#logger?.debug(`need to reload ${pools.length} markets`);
360494
362301
  await this.#loadMarkets([], pools);
360495
362302
  }
360496
362303
  }
360497
- async #loadMarkets(curators, pools, ignoreUpdateablePrices) {
362304
+ async #loadMarkets(configurators, pools, ignoreUpdateablePrices) {
360498
362305
  const marketCompressorAddress = this.sdk.addressProvider.getAddress(
360499
362306
  AP_MARKET_COMPRESSOR,
360500
362307
  310
360501
362308
  );
360502
362309
  let txs = [];
360503
362310
  if (!ignoreUpdateablePrices) {
360504
- await this.sdk.priceFeeds.preloadUpdatablePriceFeeds(curators, pools);
362311
+ await this.sdk.priceFeeds.preloadUpdatablePriceFeeds(
362312
+ configurators,
362313
+ pools
362314
+ );
360505
362315
  const updates = await this.sdk.priceFeeds.generatePriceFeedsUpdateTxs();
360506
362316
  txs = updates.txs;
360507
362317
  }
362318
+ this.#logger?.debug({ configurators, pools }, "calling getMarkets");
360508
362319
  const resp = await simulateMulticall(this.provider.publicClient, {
360509
362320
  contracts: [
360510
362321
  ...txs.map(rawTxToMulticallPriceUpdate),
@@ -360514,7 +362325,7 @@ var MarketRegister = class extends SDKConstruct {
360514
362325
  functionName: "getMarkets",
360515
362326
  args: [
360516
362327
  {
360517
- curators,
362328
+ configurators,
360518
362329
  pools,
360519
362330
  underlying: ADDRESS_0X0
360520
362331
  }
@@ -360574,6 +362385,9 @@ var MarketRegister = class extends SDKConstruct {
360574
362385
  get creditManagers() {
360575
362386
  return this.markets.flatMap((market) => market.creditManagers);
360576
362387
  }
362388
+ get marketConfigurators() {
362389
+ return this.markets.flatMap((market) => market.configurator);
362390
+ }
360577
362391
  findCreditManager(creditManager) {
360578
362392
  const addr = creditManager.toLowerCase();
360579
362393
  for (const market of this.markets) {
@@ -360624,12 +362438,6 @@ var MarketRegister = class extends SDKConstruct {
360624
362438
  { tvl: 0n, tvlUSD: 0n }
360625
362439
  );
360626
362440
  }
360627
- get curators() {
360628
- if (!this.#curators) {
360629
- throw new Error(`market register has no markets loaded`);
360630
- }
360631
- return this.#curators;
360632
- }
360633
362441
  };
360634
362442
  var PathOptionFactory = class _PathOptionFactory {
360635
362443
  // TODO: get rid of token data from SDK
@@ -361074,7 +362882,7 @@ var CreditAccountsService = class extends SDKConstruct {
361074
362882
  owner = ADDRESS_0X0
361075
362883
  } = args ?? {};
361076
362884
  const arg0 = creditManager ?? {
361077
- curators: [],
362885
+ configurators: [],
361078
362886
  pools: this.pools,
361079
362887
  underlying: ADDRESS_0X0
361080
362888
  };
@@ -361750,7 +363558,8 @@ var AddressProviderContractV3_1 = class extends AbstractAddressProviderContract
361750
363558
  super(sdk, {
361751
363559
  addr: address,
361752
363560
  name: "AddressProviderV3_1",
361753
- abi: abi30
363561
+ abi: abi30,
363562
+ version: 310
361754
363563
  });
361755
363564
  }
361756
363565
  parseFunctionParams(params) {
@@ -361803,7 +363612,8 @@ var AddressProviderContractV3 = class extends AbstractAddressProviderContract {
361803
363612
  super(sdk, {
361804
363613
  addr: address,
361805
363614
  name: "AddressProviderV3",
361806
- abi: abi31
363615
+ abi: abi31,
363616
+ version: 300
361807
363617
  });
361808
363618
  }
361809
363619
  parseFunctionParams(params) {
@@ -362037,10 +363847,10 @@ var GearboxSDK = class _GearboxSDK {
362037
363847
  static async attach(options) {
362038
363848
  const {
362039
363849
  logger: logger2,
362040
- riskCurators,
362041
363850
  blockNumber,
362042
363851
  redstoneHistoricTimestamp,
362043
- ignoreUpdateablePrices
363852
+ ignoreUpdateablePrices,
363853
+ marketConfigurators
362044
363854
  } = options;
362045
363855
  let { networkType, addressProvider, chainId } = options;
362046
363856
  const attachClient = createPublicClient({
@@ -362069,10 +363879,10 @@ var GearboxSDK = class _GearboxSDK {
362069
363879
  logger: logger2
362070
363880
  }).#attach({
362071
363881
  addressProvider,
362072
- riskCurators,
362073
363882
  blockNumber,
362074
363883
  redstoneHistoricTimestamp,
362075
- ignoreUpdateablePrices
363884
+ ignoreUpdateablePrices,
363885
+ marketConfigurators
362076
363886
  });
362077
363887
  }
362078
363888
  constructor(options) {
@@ -362085,8 +363895,8 @@ var GearboxSDK = class _GearboxSDK {
362085
363895
  addressProvider,
362086
363896
  blockNumber,
362087
363897
  redstoneHistoricTimestamp,
362088
- riskCurators,
362089
- ignoreUpdateablePrices
363898
+ ignoreUpdateablePrices,
363899
+ marketConfigurators
362090
363900
  } = opts;
362091
363901
  const time = Date.now();
362092
363902
  const block = await this.provider.publicClient.getBlock(
@@ -362125,7 +363935,7 @@ var GearboxSDK = class _GearboxSDK {
362125
363935
  );
362126
363936
  this.#marketRegister = new MarketRegister(this);
362127
363937
  await this.#marketRegister.loadMarkets(
362128
- riskCurators ?? GEARBOX_RISK_CURATORS[this.#provider.networkType],
363938
+ marketConfigurators,
362129
363939
  ignoreUpdateablePrices
362130
363940
  );
362131
363941
  try {
@@ -395165,28 +396975,36 @@ function audit() {
395165
396975
  }
395166
396976
 
395167
396977
  // src/commands/open-accounts.ts
395168
- import { readFile as readFile7, writeFile as writeFile4 } from "node:fs/promises";
396978
+ import { writeFile as writeFile5 } from "node:fs/promises";
395169
396979
  import path8 from "node:path";
395170
- function openAccounts() {
395171
- return newCommand().name("open-accounts").description("Script to open accounts in v3.1").addOption(
395172
- new Option(
395173
- "--address-provider <address>",
395174
- "new address provider address"
395175
- ).env("ADDRESS_PROVIDER")
395176
- ).addOption(
395177
- new Option("--shared-dir <dir>", "dir to put output files").env(
395178
- "SHARED_DIR"
395179
- )
395180
- ).addOption(
395181
- new Option("--anvil-url <url>", "anvil rpc url").env("ANVIL_URL")
395182
- ).action(async (opts) => {
395183
- log_default.info("starting sdk v3.1 example");
396980
+
396981
+ // src/commands/sdk/SdkExample.ts
396982
+ import { readFile as readFile7, writeFile as writeFile4 } from "node:fs/promises";
396983
+ var SdkExample = class {
396984
+ #sdk;
396985
+ async run(opts) {
395184
396986
  let {
395185
396987
  addressProvider,
395186
396988
  addressProviderJson,
396989
+ marketConfiguratorJson,
395187
396990
  anvilUrl = "http://127.0.0.1:8545",
395188
- sharedDir = "."
396991
+ outFile
395189
396992
  } = opts;
396993
+ let marketConfigurator;
396994
+ try {
396995
+ const mc = await readFile7(marketConfiguratorJson, "utf-8").then(
396996
+ JSON.parse
396997
+ );
396998
+ marketConfigurator = mc.marketConfigurator;
396999
+ if (!isAddress(marketConfigurator)) {
397000
+ throw new Error("marketConfigurator is not a valid address");
397001
+ }
397002
+ log_default.info(`market configurator from json: ${marketConfigurator}`);
397003
+ } catch (e) {
397004
+ throw new Error(
397005
+ `cannot read market configurator json ${marketConfiguratorJson}: ${e}`
397006
+ );
397007
+ }
395190
397008
  if (!addressProvider) {
395191
397009
  if (!addressProviderJson) {
395192
397010
  throw new Error("addressProvider is not specified");
@@ -395204,17 +397022,16 @@ function openAccounts() {
395204
397022
  if (!isAddress(addressProvider)) {
395205
397023
  throw new Error("addressProvider is not a valid address");
395206
397024
  }
395207
- const sdk = await GearboxSDK.attach({
397025
+ this.#sdk = await GearboxSDK.attach({
395208
397026
  rpcURLs: [anvilUrl],
395209
397027
  timeout: 48e4,
395210
397028
  addressProvider,
395211
397029
  logger: log_default,
395212
397030
  ignoreUpdateablePrices: true,
395213
- riskCurators: []
395214
- // load without risk curator
397031
+ marketConfigurators: [marketConfigurator]
395215
397032
  });
395216
- const puTx = await sdk.priceFeeds.getUpdatePriceFeedsTx(
395217
- GEARBOX_RISK_CURATORS[sdk.provider.networkType]
397033
+ const puTx = await this.#sdk.priceFeeds.getUpdatePriceFeedsTx(
397034
+ GEARBOX_RISK_CURATORS[this.#sdk.provider.networkType]
395218
397035
  );
395219
397036
  const updater = createWalletClient({
395220
397037
  account: privateKeyToAccount(
@@ -395228,19 +397045,75 @@ function openAccounts() {
395228
397045
  });
395229
397046
  const hash2 = await sendRawTx(updater, { tx: puTx });
395230
397047
  await publicClient.waitForTransactionReceipt({ hash: hash2 });
395231
- await sdk.marketRegister.loadMarkets(
395232
- GEARBOX_RISK_CURATORS[sdk.provider.networkType],
397048
+ await this.#sdk.marketRegister.loadMarkets(
397049
+ GEARBOX_RISK_CURATORS[this.#sdk.provider.networkType],
395233
397050
  true
395234
397051
  );
395235
397052
  log_default.info("attached sdk");
395236
- const faucetAddr = await sdk.provider.publicClient.readContract({
395237
- address: ADDRESS_PROVIDER[sdk.provider.networkType],
397053
+ if (outFile) {
397054
+ try {
397055
+ await writeFile4(
397056
+ outFile,
397057
+ json_stringify(this.#sdk.stateHuman()),
397058
+ "utf-8"
397059
+ );
397060
+ } catch (e) {
397061
+ log_default.error(`failed to write to ${outFile}: ${e}`);
397062
+ }
397063
+ }
397064
+ }
397065
+ get sdk() {
397066
+ if (!this.#sdk) {
397067
+ throw new Error("sdk is not attached");
397068
+ }
397069
+ return this.#sdk;
397070
+ }
397071
+ };
397072
+
397073
+ // src/commands/open-accounts.ts
397074
+ function openAccounts() {
397075
+ return newCommand().name("open-accounts").description("Script to open accounts in v3.1").addOption(
397076
+ new Option(
397077
+ "--address-provider <address>",
397078
+ "new address provider address"
397079
+ ).env("ADDRESS_PROVIDER")
397080
+ ).addOption(
397081
+ new Option("--shared-dir <dir>", "dir to put output files").env(
397082
+ "SHARED_DIR"
397083
+ )
397084
+ ).addOption(
397085
+ new Option("--anvil-url <url>", "anvil rpc url").env("ANVIL_URL")
397086
+ ).action(async (opts) => {
397087
+ log_default.info("starting sdk v3.1 example");
397088
+ let {
397089
+ addressProvider,
397090
+ addressProviderJson,
397091
+ anvilUrl = "http://127.0.0.1:8545",
397092
+ sharedDir = "."
397093
+ } = opts;
397094
+ const sdkExample2 = new SdkExample();
397095
+ await sdkExample2.run({
397096
+ addressProvider,
397097
+ addressProviderJson,
397098
+ marketConfiguratorJson: path8.resolve(
397099
+ sharedDir,
397100
+ "market-configurator-gearbox.json"
397101
+ ),
397102
+ anvilUrl,
397103
+ outFile: path8.resolve(
397104
+ sharedDir,
397105
+ "deploy-state",
397106
+ "stateAfter.human.json"
397107
+ )
397108
+ });
397109
+ const faucetAddr = await sdkExample2.sdk.provider.publicClient.readContract({
397110
+ address: ADDRESS_PROVIDER[sdkExample2.sdk.provider.networkType],
395238
397111
  abi: iAddressProviderV3_1Abi,
395239
397112
  functionName: "getAddressOrRevert",
395240
397113
  args: [stringToHex("FAUCET", { size: 32 }), 0n]
395241
397114
  });
395242
397115
  log_default.debug(`faucet address: ${faucetAddr}`);
395243
- const accService = new CreditAccountsService(sdk);
397116
+ const accService = new CreditAccountsService(sdkExample2.sdk);
395244
397117
  const accountOpener = new AccountOpener(accService, {
395245
397118
  faucet: faucetAddr
395246
397119
  });
@@ -395271,7 +397144,7 @@ function openAccounts() {
395271
397144
  // sUSDe
395272
397145
  }
395273
397146
  ]);
395274
- await writeFile4(
397147
+ await writeFile5(
395275
397148
  path8.resolve(sharedDir, "opened-accounts.json"),
395276
397149
  json_stringify(opened),
395277
397150
  "utf-8"
@@ -395284,7 +397157,7 @@ function openAccounts() {
395284
397157
  }
395285
397158
 
395286
397159
  // src/commands/parse.ts
395287
- import { writeFile as writeFile5 } from "node:fs/promises";
397160
+ import { writeFile as writeFile6 } from "node:fs/promises";
395288
397161
 
395289
397162
  // src/renderer/html/HtmlRenderer.tsx
395290
397163
  var import_react = __toESM(require_react(), 1);
@@ -395330,7 +397203,7 @@ function getRenderer(opts) {
395330
397203
  var package_default = {
395331
397204
  name: "@gearbox-protocol/deploy-tools",
395332
397205
  description: "Gearbox deploy tools",
395333
- version: "5.1.6",
397206
+ version: "5.2.1",
395334
397207
  homepage: "https://gearbox.fi",
395335
397208
  keywords: [
395336
397209
  "gearbox"
@@ -395373,7 +397246,7 @@ var package_default = {
395373
397246
  "@gearbox-protocol/deploy-tools-node": "0.0.0",
395374
397247
  "@gearbox-protocol/deploy-tools-shared": "0.0.0",
395375
397248
  "@gearbox-protocol/deploy-tools-types": "0.0.0",
395376
- "@gearbox-protocol/sdk": "^3.0.0-vfour.130",
397249
+ "@gearbox-protocol/sdk": "^3.0.0-vfour.132",
395377
397250
  "@gearbox-protocol/sdk-gov": "^2.33.1",
395378
397251
  "@types/lodash-es": "^4.17.12",
395379
397252
  "@types/node": "^22.10.2",
@@ -395452,7 +397325,7 @@ function parse() {
395452
397325
  const parser = new UpdateParser(opts, version_default);
395453
397326
  const result = await parser.parse(opts);
395454
397327
  if (opts.outFile) {
395455
- await writeFile5(opts.outFile, json_stringify(result), "utf-8");
397328
+ await writeFile6(opts.outFile, json_stringify(result), "utf-8");
395456
397329
  }
395457
397330
  const renderer = getRenderer(opts);
395458
397331
  return renderer?.render(result);
@@ -395473,7 +397346,6 @@ function printSafeTx() {
395473
397346
  }
395474
397347
 
395475
397348
  // src/commands/sdk-example.ts
395476
- import { readFile as readFile8, writeFile as writeFile6 } from "node:fs/promises";
395477
397349
  import path10 from "node:path";
395478
397350
  function sdkExample() {
395479
397351
  return newCommand().name("sdk-example").description("SDK example for v3.1").addOption(
@@ -395495,63 +397367,27 @@ function sdkExample() {
395495
397367
  anvilUrl = "http://127.0.0.1:8545",
395496
397368
  sharedDir = "."
395497
397369
  } = opts;
395498
- if (!addressProvider) {
395499
- if (!addressProviderJson) {
395500
- throw new Error("addressProvider is not specified");
395501
- }
395502
- log_default.debug(`reading address provider json ${addressProviderJson}`);
395503
- const apFile = await readFile8(addressProviderJson, "utf-8").then(
395504
- JSON.parse
395505
- );
395506
- addressProvider = apFile.addressProvider;
395507
- }
395508
- if (!addressProvider) {
395509
- throw new Error("addressProvider is not specified");
395510
- }
395511
- log_default.info(`using address provider ${addressProvider}`);
395512
- if (!isAddress(addressProvider)) {
395513
- throw new Error("addressProvider is not a valid address");
395514
- }
395515
- const sdk = await GearboxSDK.attach({
395516
- rpcURLs: [anvilUrl],
395517
- timeout: 48e4,
397370
+ const sdkExample2 = new SdkExample();
397371
+ await sdkExample2.run({
395518
397372
  addressProvider,
395519
- logger: log_default,
395520
- ignoreUpdateablePrices: true,
395521
- riskCurators: []
395522
- // load without risk curator
395523
- });
395524
- const puTx = await sdk.priceFeeds.getUpdatePriceFeedsTx(
395525
- GEARBOX_RISK_CURATORS[sdk.provider.networkType]
395526
- );
395527
- const updater = createWalletClient({
395528
- account: privateKeyToAccount(
395529
- "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
395530
- // well-known anvil private key
397373
+ addressProviderJson,
397374
+ marketConfiguratorJson: path10.resolve(
397375
+ sharedDir,
397376
+ "market-configurator-gearbox.json"
395531
397377
  ),
395532
- transport: http(anvilUrl)
395533
- });
395534
- const publicClient = createPublicClient({
395535
- transport: http(anvilUrl)
397378
+ anvilUrl,
397379
+ outFile: path10.resolve(
397380
+ sharedDir,
397381
+ "deploy-state",
397382
+ "stateAfter.human.json"
397383
+ )
395536
397384
  });
395537
- const hash2 = await sendRawTx(updater, { tx: puTx });
395538
- await publicClient.waitForTransactionReceipt({ hash: hash2 });
395539
- await sdk.marketRegister.loadMarkets(
395540
- GEARBOX_RISK_CURATORS[sdk.provider.networkType],
395541
- true
395542
- );
395543
- log_default.info("attached sdk");
395544
- await writeFile6(
395545
- path10.resolve(sharedDir, "deploy-state", "stateAfter.human.json"),
395546
- json_stringify(sdk.stateHuman()),
395547
- "utf-8"
395548
- );
395549
397385
  log_default.info("done");
395550
397386
  });
395551
397387
  }
395552
397388
 
395553
397389
  // src/commands/verify-etherscan.ts
395554
- import { readFile as readFile9 } from "node:fs/promises";
397390
+ import { readFile as readFile8 } from "node:fs/promises";
395555
397391
  function verifyEtherscan() {
395556
397392
  return newCommand().name("verify-etherscan").description(
395557
397393
  "performs bulk verification of gearbox contracts using etherscan"
@@ -395568,7 +397404,7 @@ function verifyEtherscan() {
395568
397404
  }
395569
397405
  let addresses = opts.addresses ?? [];
395570
397406
  if (addresses.length === 0 && opts.addressesFile) {
395571
- const content = await readFile9(opts.addressesFile, "utf-8");
397407
+ const content = await readFile8(opts.addressesFile, "utf-8");
395572
397408
  addresses = Object.keys(json_parse(content));
395573
397409
  }
395574
397410
  if (!addresses.length) {