@gearbox-protocol/deploy-tools 5.9.8 → 5.9.9

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 +191 -9
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -340123,6 +340123,149 @@ var iCreditAccountCompressorAbi = [
340123
340123
  stateMutability: "view"
340124
340124
  }
340125
340125
  ];
340126
+ var iGaugeCompressorAbi = [
340127
+ {
340128
+ type: "function",
340129
+ inputs: [],
340130
+ name: "contractType",
340131
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
340132
+ stateMutability: "view"
340133
+ },
340134
+ {
340135
+ type: "function",
340136
+ inputs: [
340137
+ { name: "gauge", internalType: "address", type: "address" },
340138
+ { name: "staker", internalType: "address", type: "address" }
340139
+ ],
340140
+ name: "getGauge",
340141
+ outputs: [
340142
+ {
340143
+ name: "result",
340144
+ internalType: "struct GaugeInfo",
340145
+ type: "tuple",
340146
+ components: [
340147
+ { name: "addr", internalType: "address", type: "address" },
340148
+ { name: "pool", internalType: "address", type: "address" },
340149
+ { name: "symbol", internalType: "string", type: "string" },
340150
+ { name: "name", internalType: "string", type: "string" },
340151
+ { name: "voter", internalType: "address", type: "address" },
340152
+ { name: "underlying", internalType: "address", type: "address" },
340153
+ { name: "currentEpoch", internalType: "uint16", type: "uint16" },
340154
+ { name: "epochLastUpdate", internalType: "uint16", type: "uint16" },
340155
+ { name: "epochFrozen", internalType: "bool", type: "bool" },
340156
+ {
340157
+ name: "quotaParams",
340158
+ internalType: "struct GaugeQuotaParams[]",
340159
+ type: "tuple[]",
340160
+ components: [
340161
+ { name: "token", internalType: "address", type: "address" },
340162
+ { name: "minRate", internalType: "uint16", type: "uint16" },
340163
+ { name: "maxRate", internalType: "uint16", type: "uint16" },
340164
+ {
340165
+ name: "totalVotesLpSide",
340166
+ internalType: "uint96",
340167
+ type: "uint96"
340168
+ },
340169
+ {
340170
+ name: "totalVotesCaSide",
340171
+ internalType: "uint96",
340172
+ type: "uint96"
340173
+ },
340174
+ {
340175
+ name: "stakerVotesLpSide",
340176
+ internalType: "uint96",
340177
+ type: "uint96"
340178
+ },
340179
+ {
340180
+ name: "stakerVotesCaSide",
340181
+ internalType: "uint96",
340182
+ type: "uint96"
340183
+ }
340184
+ ]
340185
+ }
340186
+ ]
340187
+ }
340188
+ ],
340189
+ stateMutability: "view"
340190
+ },
340191
+ {
340192
+ type: "function",
340193
+ inputs: [
340194
+ {
340195
+ name: "filter",
340196
+ internalType: "struct MarketFilter",
340197
+ type: "tuple",
340198
+ components: [
340199
+ {
340200
+ name: "configurators",
340201
+ internalType: "address[]",
340202
+ type: "address[]"
340203
+ },
340204
+ { name: "pools", internalType: "address[]", type: "address[]" },
340205
+ { name: "underlying", internalType: "address", type: "address" }
340206
+ ]
340207
+ },
340208
+ { name: "staker", internalType: "address", type: "address" }
340209
+ ],
340210
+ name: "getGauges",
340211
+ outputs: [
340212
+ {
340213
+ name: "result",
340214
+ internalType: "struct GaugeInfo[]",
340215
+ type: "tuple[]",
340216
+ components: [
340217
+ { name: "addr", internalType: "address", type: "address" },
340218
+ { name: "pool", internalType: "address", type: "address" },
340219
+ { name: "symbol", internalType: "string", type: "string" },
340220
+ { name: "name", internalType: "string", type: "string" },
340221
+ { name: "voter", internalType: "address", type: "address" },
340222
+ { name: "underlying", internalType: "address", type: "address" },
340223
+ { name: "currentEpoch", internalType: "uint16", type: "uint16" },
340224
+ { name: "epochLastUpdate", internalType: "uint16", type: "uint16" },
340225
+ { name: "epochFrozen", internalType: "bool", type: "bool" },
340226
+ {
340227
+ name: "quotaParams",
340228
+ internalType: "struct GaugeQuotaParams[]",
340229
+ type: "tuple[]",
340230
+ components: [
340231
+ { name: "token", internalType: "address", type: "address" },
340232
+ { name: "minRate", internalType: "uint16", type: "uint16" },
340233
+ { name: "maxRate", internalType: "uint16", type: "uint16" },
340234
+ {
340235
+ name: "totalVotesLpSide",
340236
+ internalType: "uint96",
340237
+ type: "uint96"
340238
+ },
340239
+ {
340240
+ name: "totalVotesCaSide",
340241
+ internalType: "uint96",
340242
+ type: "uint96"
340243
+ },
340244
+ {
340245
+ name: "stakerVotesLpSide",
340246
+ internalType: "uint96",
340247
+ type: "uint96"
340248
+ },
340249
+ {
340250
+ name: "stakerVotesCaSide",
340251
+ internalType: "uint96",
340252
+ type: "uint96"
340253
+ }
340254
+ ]
340255
+ }
340256
+ ]
340257
+ }
340258
+ ],
340259
+ stateMutability: "view"
340260
+ },
340261
+ {
340262
+ type: "function",
340263
+ inputs: [],
340264
+ name: "version",
340265
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
340266
+ stateMutability: "view"
340267
+ }
340268
+ ];
340126
340269
  var iMarketCompressorAbi = [
340127
340270
  {
340128
340271
  type: "function",
@@ -364490,6 +364633,7 @@ var DEPRECIATED_POOLS = {
364490
364633
  var NO_VERSION = 0;
364491
364634
  var AP_BOT_LIST = "BOT_LIST";
364492
364635
  var AP_CREDIT_ACCOUNT_COMPRESSOR = "CREDIT_ACCOUNT_COMPRESSOR";
364636
+ var AP_GAUGE_COMPRESSOR = "GAUGE_COMPRESSOR";
364493
364637
  var AP_GEAR_STAKING = "GEAR_STAKING";
364494
364638
  var AP_GEAR_TOKEN = "GEAR_TOKEN";
364495
364639
  var AP_MARKET_COMPRESSOR = "MARKET_COMPRESSOR";
@@ -375173,6 +375317,7 @@ var MarketRegister = class extends SDKConstruct {
375173
375317
  */
375174
375318
  #markets = new AddressMap();
375175
375319
  #zappers = [];
375320
+ #marketFilter;
375176
375321
  constructor(sdk, markets) {
375177
375322
  super(sdk);
375178
375323
  this.#logger = childLogger("MarketRegister", sdk.logger);
@@ -375214,6 +375359,32 @@ var MarketRegister = class extends SDKConstruct {
375214
375359
  this.sdk.provider.addressLabels.set(t.addr, t.symbol);
375215
375360
  }
375216
375361
  }
375362
+ async getGauges(staker) {
375363
+ const gcAddr = this.sdk.addressProvider.getLatestVersion(AP_GAUGE_COMPRESSOR);
375364
+ if (!this.#marketFilter) {
375365
+ throw new Error("market filter is not set");
375366
+ }
375367
+ const resp = await this.provider.publicClient.readContract({
375368
+ abi: iGaugeCompressorAbi,
375369
+ address: gcAddr,
375370
+ functionName: "getGauges",
375371
+ args: [this.#marketFilter, staker]
375372
+ });
375373
+ return [...resp];
375374
+ }
375375
+ async getGauge(gauge, staker) {
375376
+ const gcAddr = this.sdk.addressProvider.getLatestVersion(AP_GAUGE_COMPRESSOR);
375377
+ if (!this.#marketFilter) {
375378
+ throw new Error("market filter is not set");
375379
+ }
375380
+ const resp = await this.provider.publicClient.readContract({
375381
+ abi: iGaugeCompressorAbi,
375382
+ address: gcAddr,
375383
+ functionName: "getGauge",
375384
+ args: [gauge, staker]
375385
+ });
375386
+ return resp;
375387
+ }
375217
375388
  async syncState() {
375218
375389
  const pools = this.markets.filter((m) => m.dirty).map((m) => m.pool.pool.address);
375219
375390
  if (pools.length) {
@@ -375222,6 +375393,11 @@ var MarketRegister = class extends SDKConstruct {
375222
375393
  }
375223
375394
  }
375224
375395
  async #loadMarkets(configurators, pools, ignoreUpdateablePrices) {
375396
+ this.#marketFilter = {
375397
+ configurators,
375398
+ pools,
375399
+ underlying: ADDRESS_0X0
375400
+ };
375225
375401
  const marketCompressorAddress = this.sdk.addressProvider.getAddress(
375226
375402
  AP_MARKET_COMPRESSOR,
375227
375403
  310
@@ -375246,13 +375422,7 @@ var MarketRegister = class extends SDKConstruct {
375246
375422
  abi: iMarketCompressorAbi,
375247
375423
  address: marketCompressorAddress,
375248
375424
  functionName: "getMarkets",
375249
- args: [
375250
- {
375251
- configurators,
375252
- pools,
375253
- underlying: ADDRESS_0X0
375254
- }
375255
- ]
375425
+ args: [this.#marketFilter]
375256
375426
  }
375257
375427
  ],
375258
375428
  allowFailure: false,
@@ -375947,6 +376117,15 @@ var CreditAccountsService = class extends SDKConstruct {
375947
376117
  });
375948
376118
  return [...rewards];
375949
376119
  }
376120
+ async getActiveBots(marketConfigurator, account) {
376121
+ const botsData = await this.provider.publicClient.readContract({
376122
+ abi: iPeripheryCompressorAbi,
376123
+ address: this.peripheryCompressor,
376124
+ functionName: "getActiveBots",
376125
+ args: [marketConfigurator, account]
376126
+ });
376127
+ return [...botsData];
376128
+ }
375950
376129
  /**
375951
376130
  * Generates transaction to liquidate credit account
375952
376131
  * @param account
@@ -376536,6 +376715,9 @@ var CreditAccountsService = class extends SDKConstruct {
376536
376715
  get rewardCompressor() {
376537
376716
  return this.sdk.addressProvider.getLatestVersion(AP_REWARDS_COMPRESSOR);
376538
376717
  }
376718
+ get peripheryCompressor() {
376719
+ return this.sdk.addressProvider.getLatestVersion(AP_PERIPHERY_COMPRESSOR);
376720
+ }
376539
376721
  };
376540
376722
  var AbstractAddressProviderContract = class extends BaseContract {
376541
376723
  #addresses = {};
@@ -409418,7 +409600,7 @@ function getRenderer(opts) {
409418
409600
  var package_default = {
409419
409601
  name: "@gearbox-protocol/deploy-tools",
409420
409602
  description: "Gearbox deploy tools",
409421
- version: "5.9.8",
409603
+ version: "5.9.9",
409422
409604
  homepage: "https://gearbox.fi",
409423
409605
  keywords: [
409424
409606
  "gearbox"
@@ -409461,7 +409643,7 @@ var package_default = {
409461
409643
  "@gearbox-protocol/deploy-tools-node": "0.0.0",
409462
409644
  "@gearbox-protocol/deploy-tools-shared": "0.0.0",
409463
409645
  "@gearbox-protocol/deploy-tools-types": "0.0.0",
409464
- "@gearbox-protocol/sdk": "3.0.0-vfour.211",
409646
+ "@gearbox-protocol/sdk": "3.0.0-vfour.212",
409465
409647
  "@gearbox-protocol/sdk-gov": "^2.34.0",
409466
409648
  "@types/lodash-es": "^4.17.12",
409467
409649
  "@types/node": "^22.12.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/deploy-tools",
3
3
  "description": "Gearbox deploy tools",
4
- "version": "5.9.8",
4
+ "version": "5.9.9",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"
@@ -44,7 +44,7 @@
44
44
  "@gearbox-protocol/deploy-tools-node": "0.0.0",
45
45
  "@gearbox-protocol/deploy-tools-shared": "0.0.0",
46
46
  "@gearbox-protocol/deploy-tools-types": "0.0.0",
47
- "@gearbox-protocol/sdk": "3.0.0-vfour.211",
47
+ "@gearbox-protocol/sdk": "3.0.0-vfour.212",
48
48
  "@gearbox-protocol/sdk-gov": "^2.34.0",
49
49
  "@types/lodash-es": "^4.17.12",
50
50
  "@types/node": "^22.12.0",