@gearbox-protocol/deploy-tools 5.24.22 → 5.24.24

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 +30 -10
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -363324,11 +363324,12 @@ var BLOCK_DURATION_BY_NETWORK = {
363324
363324
  Base: 2.01,
363325
363325
  Sonic: 0.91,
363326
363326
  // New networks
363327
- // TODO: determine value
363328
- MegaETH: 1,
363327
+ MegaETH: 0.01,
363328
+ // <10ms/block, on testnet
363329
363329
  Monad: 1,
363330
- Berachain: 1,
363331
- Avalanche: 1
363330
+ // on testnet
363331
+ Berachain: 1.9,
363332
+ Avalanche: 1.7
363332
363333
  };
363333
363334
  var RAMP_TIME = 30 * 24 * 60 * 60 * 1.2;
363334
363335
  var RAMP_DURATION_BY_NETWORK = {
@@ -382830,7 +382831,12 @@ var multicallTimestampAbi = parseAbi([
382830
382831
  ]);
382831
382832
  var updatePriceFeedAbi = [...iUpdatablePriceFeedAbi, ...errorAbis];
382832
382833
  async function simulateWithPriceUpdates(client, parameters) {
382833
- const { contracts: restContracts, priceUpdates, ...rest } = parameters;
382834
+ const {
382835
+ contracts: restContracts,
382836
+ priceUpdates,
382837
+ strictPrices = false,
382838
+ ...rest
382839
+ } = parameters;
382834
382840
  if (restContracts.length === 0) {
382835
382841
  throw getSimulateWithPriceUpdatesError(
382836
382842
  new BaseError2("no contracts calls provided"),
@@ -382862,13 +382868,27 @@ async function simulateWithPriceUpdates(client, parameters) {
382862
382868
  batchSize: 0
382863
382869
  // we cannot have price updates and compressor request in different batches
382864
382870
  });
382865
- if (resp.some((r) => r.status === "failure")) {
382866
- throw getSimulateWithPriceUpdatesError(
382871
+ let hasError = false;
382872
+ let mustThrow = false;
382873
+ for (let i = 0; i < resp.length; i++) {
382874
+ if (resp[i].status === "failure") {
382875
+ hasError = true;
382876
+ if (i > priceUpdates.length || i > 0 && strictPrices) {
382877
+ mustThrow = true;
382878
+ }
382879
+ }
382880
+ }
382881
+ if (hasError) {
382882
+ const err = getSimulateWithPriceUpdatesError(
382867
382883
  void 0,
382868
382884
  priceUpdates,
382869
382885
  restContracts,
382870
382886
  resp
382871
382887
  );
382888
+ if (mustThrow) {
382889
+ throw err;
382890
+ }
382891
+ console.warn(err);
382872
382892
  }
382873
382893
  const restResults = resp.slice(priceUpdates.length + 1).map((r) => r.result);
382874
382894
  return restResults;
@@ -382915,7 +382935,7 @@ function getSimulateWithPriceUpdatesError(cause, priceUpdates, calls, results) {
382915
382935
  const callsResults = results.slice(1 + priceUpdates.length);
382916
382936
  const prettyPriceUpdates = priceUpdates.map((p, i) => {
382917
382937
  const result = priceUpdatesResults[i];
382918
- let tsValid = timestamp ? p.validateTimestamp(timestamp) : "";
382938
+ let tsValid = timestamp ? p.validateTimestamp(timestamp) : "missing";
382919
382939
  tsValid = tsValid === "valid" ? "" : `[timestamp ${tsValid}]`;
382920
382940
  return [extractCallError(result), p.pretty, tsValid].filter(Boolean).join(" ");
382921
382941
  });
@@ -421721,7 +421741,7 @@ function getRenderer(opts) {
421721
421741
  var package_default = {
421722
421742
  name: "@gearbox-protocol/deploy-tools",
421723
421743
  description: "Gearbox deploy tools",
421724
- version: "5.24.22",
421744
+ version: "5.24.24",
421725
421745
  homepage: "https://gearbox.fi",
421726
421746
  keywords: [
421727
421747
  "gearbox"
@@ -421764,7 +421784,7 @@ var package_default = {
421764
421784
  "@gearbox-protocol/deploy-tools-node": "0.0.0",
421765
421785
  "@gearbox-protocol/deploy-tools-shared": "0.0.0",
421766
421786
  "@gearbox-protocol/deploy-tools-types": "0.0.0",
421767
- "@gearbox-protocol/sdk": "3.0.0-vfour.350",
421787
+ "@gearbox-protocol/sdk": "3.0.0-vfour.353",
421768
421788
  "@gearbox-protocol/sdk-gov": "^2.36.6",
421769
421789
  "@types/lodash-es": "^4.17.12",
421770
421790
  "@types/node": "^22.13.14",
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.24.22",
4
+ "version": "5.24.24",
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.350",
47
+ "@gearbox-protocol/sdk": "3.0.0-vfour.353",
48
48
  "@gearbox-protocol/sdk-gov": "^2.36.6",
49
49
  "@types/lodash-es": "^4.17.12",
50
50
  "@types/node": "^22.13.14",