@gearbox-protocol/sdk 12.9.7 → 12.9.8

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.
@@ -43,7 +43,8 @@ class DegenDistributorsPlugin extends import_sdk.BasePlugin {
43
43
  const distributors = await import_MarketConfiguratorContract.MarketConfiguratorContract.getPeripheryContractBatch(
44
44
  Object.values(configurators),
45
45
  this.sdk.client,
46
- "DEGEN_DISTRIBUTOR"
46
+ "DEGEN_DISTRIBUTOR",
47
+ this.sdk.currentBlock
47
48
  );
48
49
  const distributorByConfigurator = configurators.reduce((acc, cfg, index) => {
49
50
  const cfgLC = cfg.address.toLowerCase();
@@ -52,7 +52,8 @@ class ZappersPlugin extends import_sdk.BasePlugin {
52
52
  })
53
53
  ),
54
54
  allowFailure: true,
55
- batchSize: 0
55
+ batchSize: 0,
56
+ blockNumber: this.sdk.currentBlock
56
57
  });
57
58
  this.#zappers = new import_sdk.AddressMap(void 0, "zappers");
58
59
  for (let i = 0; i < resp.length; i++) {
@@ -47,7 +47,7 @@ class MarketConfiguratorContract extends import_base.BaseContract {
47
47
  `Market configurator ${this.#curatorName}`
48
48
  );
49
49
  }
50
- static async getPeripheryContractBatch(configurators, client, contract) {
50
+ static async getPeripheryContractBatch(configurators, client, contract, blockNumber) {
51
51
  const resp = await client.multicall({
52
52
  allowFailure: true,
53
53
  contracts: configurators.map(
@@ -58,7 +58,8 @@ class MarketConfiguratorContract extends import_base.BaseContract {
58
58
  args: [(0, import_viem.stringToHex)(contract, { size: 32 })]
59
59
  })
60
60
  ),
61
- batchSize: 0
61
+ batchSize: 0,
62
+ blockNumber
62
63
  });
63
64
  return resp;
64
65
  }
@@ -20,7 +20,8 @@ class DegenDistributorsPlugin extends BasePlugin {
20
20
  const distributors = await MarketConfiguratorContract.getPeripheryContractBatch(
21
21
  Object.values(configurators),
22
22
  this.sdk.client,
23
- "DEGEN_DISTRIBUTOR"
23
+ "DEGEN_DISTRIBUTOR",
24
+ this.sdk.currentBlock
24
25
  );
25
26
  const distributorByConfigurator = configurators.reduce((acc, cfg, index) => {
26
27
  const cfgLC = cfg.address.toLowerCase();
@@ -35,7 +35,8 @@ class ZappersPlugin extends BasePlugin {
35
35
  })
36
36
  ),
37
37
  allowFailure: true,
38
- batchSize: 0
38
+ batchSize: 0,
39
+ blockNumber: this.sdk.currentBlock
39
40
  });
40
41
  this.#zappers = new AddressMap(void 0, "zappers");
41
42
  for (let i = 0; i < resp.length; i++) {
@@ -26,7 +26,7 @@ class MarketConfiguratorContract extends BaseContract {
26
26
  `Market configurator ${this.#curatorName}`
27
27
  );
28
28
  }
29
- static async getPeripheryContractBatch(configurators, client, contract) {
29
+ static async getPeripheryContractBatch(configurators, client, contract, blockNumber) {
30
30
  const resp = await client.multicall({
31
31
  allowFailure: true,
32
32
  contracts: configurators.map(
@@ -37,7 +37,8 @@ class MarketConfiguratorContract extends BaseContract {
37
37
  args: [stringToHex(contract, { size: 32 })]
38
38
  })
39
39
  ),
40
- batchSize: 0
40
+ batchSize: 0,
41
+ blockNumber
41
42
  });
42
43
  return resp;
43
44
  }
@@ -1531,7 +1531,7 @@ export declare class MarketConfiguratorContract extends BaseContract<abi> {
1531
1531
  #private;
1532
1532
  constructor(options: ConstructOptions, address: Address);
1533
1533
  loadCuratorName(): Promise<void>;
1534
- static getPeripheryContractBatch(configurators: MarketConfiguratorContract[], client: MarketConfiguratorContract["client"], contract: PeripheryContract): Promise<({
1534
+ static getPeripheryContractBatch(configurators: MarketConfiguratorContract[], client: MarketConfiguratorContract["client"], contract: PeripheryContract, blockNumber?: bigint): Promise<({
1535
1535
  error: Error;
1536
1536
  result?: undefined;
1537
1537
  status: "failure";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "12.9.7",
3
+ "version": "12.9.8",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",