@gearbox-protocol/deploy-tools 5.16.10 → 5.16.12

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 +691 -588
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -4168,15 +4168,15 @@ var init_structs = __esm({
4168
4168
  // ../../node_modules/abitype/dist/esm/human-readable/parseAbi.js
4169
4169
  function parseAbi(signatures) {
4170
4170
  const structs = parseStructs(signatures);
4171
- const abi23 = [];
4171
+ const abi24 = [];
4172
4172
  const length = signatures.length;
4173
4173
  for (let i = 0; i < length; i++) {
4174
4174
  const signature = signatures[i];
4175
4175
  if (isStructSignature(signature))
4176
4176
  continue;
4177
- abi23.push(parseSignature(signature, structs));
4177
+ abi24.push(parseSignature(signature, structs));
4178
4178
  }
4179
- return abi23;
4179
+ return abi24;
4180
4180
  }
4181
4181
  var init_parseAbi = __esm({
4182
4182
  "../../node_modules/abitype/dist/esm/human-readable/parseAbi.js"() {
@@ -5893,9 +5893,9 @@ var init_toFunctionSelector = __esm({
5893
5893
 
5894
5894
  // ../../node_modules/viem/_esm/utils/abi/getAbiItem.js
5895
5895
  function getAbiItem(parameters) {
5896
- const { abi: abi23, args = [], name } = parameters;
5896
+ const { abi: abi24, args = [], name } = parameters;
5897
5897
  const isSelector = isHex(name, { strict: false });
5898
- const abiItems = abi23.filter((abiItem) => {
5898
+ const abiItems = abi24.filter((abiItem) => {
5899
5899
  if (isSelector) {
5900
5900
  if (abiItem.type === "function")
5901
5901
  return toFunctionSelector(abiItem) === name;
@@ -6025,11 +6025,11 @@ var init_parseAccount = __esm({
6025
6025
 
6026
6026
  // ../../node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
6027
6027
  function prepareEncodeFunctionData(parameters) {
6028
- const { abi: abi23, args, functionName } = parameters;
6029
- let abiItem = abi23[0];
6028
+ const { abi: abi24, args, functionName } = parameters;
6029
+ let abiItem = abi24[0];
6030
6030
  if (functionName) {
6031
6031
  const item = getAbiItem({
6032
- abi: abi23,
6032
+ abi: abi24,
6033
6033
  args,
6034
6034
  name: functionName
6035
6035
  });
@@ -6058,12 +6058,12 @@ var init_prepareEncodeFunctionData = __esm({
6058
6058
  // ../../node_modules/viem/_esm/utils/abi/encodeFunctionData.js
6059
6059
  function encodeFunctionData(parameters) {
6060
6060
  const { args } = parameters;
6061
- const { abi: abi23, functionName } = (() => {
6061
+ const { abi: abi24, functionName } = (() => {
6062
6062
  if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
6063
6063
  return parameters;
6064
6064
  return prepareEncodeFunctionData(parameters);
6065
6065
  })();
6066
- const abiItem = abi23[0];
6066
+ const abiItem = abi24[0];
6067
6067
  const signature = functionName;
6068
6068
  const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
6069
6069
  return concatHex([signature, data ?? "0x"]);
@@ -6558,11 +6558,11 @@ var init_decodeAbiParameters = __esm({
6558
6558
 
6559
6559
  // ../../node_modules/viem/_esm/utils/abi/decodeErrorResult.js
6560
6560
  function decodeErrorResult(parameters) {
6561
- const { abi: abi23, data } = parameters;
6561
+ const { abi: abi24, data } = parameters;
6562
6562
  const signature = slice(data, 0, 4);
6563
6563
  if (signature === "0x")
6564
6564
  throw new AbiDecodingZeroDataError();
6565
- const abi_ = [...abi23 || [], solidityError, solidityPanic];
6565
+ const abi_ = [...abi24 || [], solidityError, solidityPanic];
6566
6566
  const abiItem = abi_.find((x) => x.type === "error" && signature === toFunctionSelector(formatAbiItem2(x)));
6567
6567
  if (!abiItem)
6568
6568
  throw new AbiErrorSignatureNotFoundError(signature, {
@@ -6905,8 +6905,8 @@ ${prettyStateOverride(stateOverride)}`;
6905
6905
  }
6906
6906
  };
6907
6907
  ContractFunctionExecutionError = class extends BaseError2 {
6908
- constructor(cause, { abi: abi23, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
6909
- const abiItem = getAbiItem({ abi: abi23, args, name: functionName });
6908
+ constructor(cause, { abi: abi24, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
6909
+ const abiItem = getAbiItem({ abi: abi24, args, name: functionName });
6910
6910
  const formattedArgs = abiItem ? formatAbiItemWithArgs({
6911
6911
  abiItem,
6912
6912
  args,
@@ -6972,7 +6972,7 @@ ${prettyStateOverride(stateOverride)}`;
6972
6972
  writable: true,
6973
6973
  value: void 0
6974
6974
  });
6975
- this.abi = abi23;
6975
+ this.abi = abi24;
6976
6976
  this.args = args;
6977
6977
  this.cause = cause;
6978
6978
  this.contractAddress = contractAddress;
@@ -6981,14 +6981,14 @@ ${prettyStateOverride(stateOverride)}`;
6981
6981
  }
6982
6982
  };
6983
6983
  ContractFunctionRevertedError = class extends BaseError2 {
6984
- constructor({ abi: abi23, data, functionName, message }) {
6984
+ constructor({ abi: abi24, data, functionName, message }) {
6985
6985
  let cause;
6986
6986
  let decodedData = void 0;
6987
6987
  let metaMessages;
6988
6988
  let reason;
6989
6989
  if (data && data !== "0x") {
6990
6990
  try {
6991
- decodedData = decodeErrorResult({ abi: abi23, data });
6991
+ decodedData = decodeErrorResult({ abi: abi24, data });
6992
6992
  const { abiItem, errorName, args: errorArgs } = decodedData;
6993
6993
  if (errorName === "Error") {
6994
6994
  reason = errorArgs[0];
@@ -10595,10 +10595,10 @@ var init_isAddressEqual = __esm({
10595
10595
 
10596
10596
  // ../../node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
10597
10597
  function decodeFunctionResult(parameters) {
10598
- const { abi: abi23, args, functionName, data } = parameters;
10599
- let abiItem = abi23[0];
10598
+ const { abi: abi24, args, functionName, data } = parameters;
10599
+ let abiItem = abi24[0];
10600
10600
  if (functionName) {
10601
- const item = getAbiItem({ abi: abi23, args, name: functionName });
10601
+ const item = getAbiItem({ abi: abi24, args, name: functionName });
10602
10602
  if (!item)
10603
10603
  throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });
10604
10604
  abiItem = item;
@@ -11434,10 +11434,10 @@ var init_chain = __esm({
11434
11434
 
11435
11435
  // ../../node_modules/viem/_esm/utils/abi/encodeDeployData.js
11436
11436
  function encodeDeployData(parameters) {
11437
- const { abi: abi23, args, bytecode } = parameters;
11437
+ const { abi: abi24, args, bytecode } = parameters;
11438
11438
  if (!args || args.length === 0)
11439
11439
  return bytecode;
11440
- const description = abi23.find((x) => "type" in x && x.type === "constructor");
11440
+ const description = abi24.find((x) => "type" in x && x.type === "constructor");
11441
11441
  if (!description)
11442
11442
  throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });
11443
11443
  if (!("inputs" in description))
@@ -21294,13 +21294,13 @@ var require_interface = __commonJS({
21294
21294
  function Interface2(fragments) {
21295
21295
  var _newTarget = this.constructor;
21296
21296
  var _this = this;
21297
- var abi23 = [];
21297
+ var abi24 = [];
21298
21298
  if (typeof fragments === "string") {
21299
- abi23 = JSON.parse(fragments);
21299
+ abi24 = JSON.parse(fragments);
21300
21300
  } else {
21301
- abi23 = fragments;
21301
+ abi24 = fragments;
21302
21302
  }
21303
- (0, properties_1.defineReadOnly)(this, "fragments", abi23.map(function(fragment) {
21303
+ (0, properties_1.defineReadOnly)(this, "fragments", abi24.map(function(fragment) {
21304
21304
  return fragments_1.Fragment.from(fragment);
21305
21305
  }).filter(function(fragment) {
21306
21306
  return fragment != null;
@@ -21354,15 +21354,15 @@ var require_interface = __commonJS({
21354
21354
  if (format === fragments_1.FormatTypes.sighash) {
21355
21355
  logger2.throwArgumentError("interface does not support formatting sighash", "format", format);
21356
21356
  }
21357
- var abi23 = this.fragments.map(function(fragment) {
21357
+ var abi24 = this.fragments.map(function(fragment) {
21358
21358
  return fragment.format(format);
21359
21359
  });
21360
21360
  if (format === fragments_1.FormatTypes.json) {
21361
- return JSON.stringify(abi23.map(function(j) {
21361
+ return JSON.stringify(abi24.map(function(j) {
21362
21362
  return JSON.parse(j);
21363
21363
  }));
21364
21364
  }
21365
- return abi23;
21365
+ return abi24;
21366
21366
  };
21367
21367
  Interface2.getAbiCoder = function() {
21368
21368
  return abi_coder_1.defaultAbiCoder;
@@ -37061,14 +37061,14 @@ var require_lib29 = __commonJS({
37061
37061
  if (typeof compilerOutput === "string") {
37062
37062
  compilerOutput = JSON.parse(compilerOutput);
37063
37063
  }
37064
- var abi23 = compilerOutput.abi;
37064
+ var abi24 = compilerOutput.abi;
37065
37065
  var bytecode = null;
37066
37066
  if (compilerOutput.bytecode) {
37067
37067
  bytecode = compilerOutput.bytecode;
37068
37068
  } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {
37069
37069
  bytecode = compilerOutput.evm.bytecode;
37070
37070
  }
37071
- return new this(abi23, bytecode, signer);
37071
+ return new this(abi24, bytecode, signer);
37072
37072
  };
37073
37073
  ContractFactory2.getInterface = function(contractInterface) {
37074
37074
  return Contract.getInterface(contractInterface);
@@ -50175,7 +50175,7 @@ var require_node_gyp_build = __commonJS({
50175
50175
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
50176
50176
  var vars = process.config && process.config.variables || {};
50177
50177
  var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
50178
- var abi23 = process.versions.modules;
50178
+ var abi24 = process.versions.modules;
50179
50179
  var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
50180
50180
  var arch = process.env.npm_config_arch || os2.arch();
50181
50181
  var platform = process.env.npm_config_platform || os2.platform();
@@ -50207,7 +50207,7 @@ var require_node_gyp_build = __commonJS({
50207
50207
  "platform=" + platform,
50208
50208
  "arch=" + arch,
50209
50209
  "runtime=" + runtime,
50210
- "abi=" + abi23,
50210
+ "abi=" + abi24,
50211
50211
  "uv=" + uv,
50212
50212
  armv ? "armv=" + armv : "",
50213
50213
  "libc=" + libc,
@@ -50223,7 +50223,7 @@ var require_node_gyp_build = __commonJS({
50223
50223
  if (!tuple) return;
50224
50224
  var prebuilds = path12.join(dir2, "prebuilds", tuple.name);
50225
50225
  var parsed = readdirSync(prebuilds).map(parseTags);
50226
- var candidates = parsed.filter(matchTags(runtime, abi23));
50226
+ var candidates = parsed.filter(matchTags(runtime, abi24));
50227
50227
  var winner = candidates.sort(compareTags(runtime))[0];
50228
50228
  if (winner) return path12.join(prebuilds, winner.file);
50229
50229
  }
@@ -50288,11 +50288,11 @@ var require_node_gyp_build = __commonJS({
50288
50288
  }
50289
50289
  return tags;
50290
50290
  }
50291
- function matchTags(runtime2, abi24) {
50291
+ function matchTags(runtime2, abi25) {
50292
50292
  return function(tags) {
50293
50293
  if (tags == null) return false;
50294
50294
  if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
50295
- if (tags.abi && tags.abi !== abi24 && !tags.napi) return false;
50295
+ if (tags.abi && tags.abi !== abi25 && !tags.napi) return false;
50296
50296
  if (tags.uv && tags.uv !== uv) return false;
50297
50297
  if (tags.armv && tags.armv !== armv) return false;
50298
50298
  if (tags.libc && tags.libc !== libc) return false;
@@ -113406,17 +113406,17 @@ var require_interface2 = __commonJS({
113406
113406
  * Create a new Interface for the %%fragments%%.
113407
113407
  */
113408
113408
  constructor(fragments) {
113409
- let abi23 = [];
113409
+ let abi24 = [];
113410
113410
  if (typeof fragments === "string") {
113411
- abi23 = JSON.parse(fragments);
113411
+ abi24 = JSON.parse(fragments);
113412
113412
  } else {
113413
- abi23 = fragments;
113413
+ abi24 = fragments;
113414
113414
  }
113415
113415
  this.#functions = /* @__PURE__ */ new Map();
113416
113416
  this.#errors = /* @__PURE__ */ new Map();
113417
113417
  this.#events = /* @__PURE__ */ new Map();
113418
113418
  const frags = [];
113419
- for (const a of abi23) {
113419
+ for (const a of abi24) {
113420
113420
  try {
113421
113421
  frags.push(fragments_js_1.Fragment.from(a));
113422
113422
  } catch (error) {
@@ -113480,16 +113480,16 @@ var require_interface2 = __commonJS({
113480
113480
  */
113481
113481
  format(minimal) {
113482
113482
  const format = minimal ? "minimal" : "full";
113483
- const abi23 = this.fragments.map((f) => f.format(format));
113484
- return abi23;
113483
+ const abi24 = this.fragments.map((f) => f.format(format));
113484
+ return abi24;
113485
113485
  }
113486
113486
  /**
113487
113487
  * Return the JSON-encoded ABI. This is the format Solidiy
113488
113488
  * returns.
113489
113489
  */
113490
113490
  formatJson() {
113491
- const abi23 = this.fragments.map((f) => f.format("json"));
113492
- return JSON.stringify(abi23.map((j) => JSON.parse(j)));
113491
+ const abi24 = this.fragments.map((f) => f.format("json"));
113492
+ return JSON.stringify(abi24.map((j) => JSON.parse(j)));
113493
113493
  }
113494
113494
  /**
113495
113495
  * The ABI coder that will be used to encode and decode binary
@@ -116257,12 +116257,12 @@ var require_contract = __commonJS({
116257
116257
  * optionally connected to a %%runner%% to perform operations on behalf
116258
116258
  * of.
116259
116259
  */
116260
- constructor(target, abi23, runner, _deployTx) {
116260
+ constructor(target, abi24, runner, _deployTx) {
116261
116261
  (0, index_js_3.assertArgument)(typeof target === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
116262
116262
  if (runner == null) {
116263
116263
  runner = null;
116264
116264
  }
116265
- const iface = index_js_1.Interface.from(abi23);
116265
+ const iface = index_js_1.Interface.from(abi24);
116266
116266
  (0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
116267
116267
  Object.defineProperty(this, internal, { value: {} });
116268
116268
  let addrPromise;
@@ -116625,10 +116625,10 @@ var require_contract = __commonJS({
116625
116625
  /**
116626
116626
  * Create a new Class for the %%abi%%.
116627
116627
  */
116628
- static buildClass(abi23) {
116628
+ static buildClass(abi24) {
116629
116629
  class CustomContract extends _BaseContract {
116630
116630
  constructor(address, runner = null) {
116631
- super(address, abi23, runner);
116631
+ super(address, abi24, runner);
116632
116632
  }
116633
116633
  }
116634
116634
  return CustomContract;
@@ -116636,11 +116636,11 @@ var require_contract = __commonJS({
116636
116636
  /**
116637
116637
  * Create a new BaseContract with a specified Interface.
116638
116638
  */
116639
- static from(target, abi23, runner) {
116639
+ static from(target, abi24, runner) {
116640
116640
  if (runner == null) {
116641
116641
  runner = null;
116642
116642
  }
116643
- const contract = new this(target, abi23, runner);
116643
+ const contract = new this(target, abi24, runner);
116644
116644
  return contract;
116645
116645
  }
116646
116646
  };
@@ -116684,8 +116684,8 @@ var require_factory = __commonJS({
116684
116684
  * The %%bytecode%% may be the ``bytecode`` property within the
116685
116685
  * standard Solidity JSON output.
116686
116686
  */
116687
- constructor(abi23, bytecode, runner) {
116688
- const iface = index_js_1.Interface.from(abi23);
116687
+ constructor(abi24, bytecode, runner) {
116688
+ const iface = index_js_1.Interface.from(abi24);
116689
116689
  if (bytecode instanceof Uint8Array) {
116690
116690
  bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
116691
116691
  } else {
@@ -116755,14 +116755,14 @@ var require_factory = __commonJS({
116755
116755
  if (typeof output === "string") {
116756
116756
  output = JSON.parse(output);
116757
116757
  }
116758
- const abi23 = output.abi;
116758
+ const abi24 = output.abi;
116759
116759
  let bytecode = "";
116760
116760
  if (output.bytecode) {
116761
116761
  bytecode = output.bytecode;
116762
116762
  } else if (output.evm && output.evm.bytecode) {
116763
116763
  bytecode = output.evm.bytecode;
116764
116764
  }
116765
- return new this(abi23, bytecode, runner);
116765
+ return new this(abi24, bytecode, runner);
116766
116766
  }
116767
116767
  };
116768
116768
  exports2.ContractFactory = ContractFactory;
@@ -121690,8 +121690,8 @@ var require_provider_etherscan = __commonJS({
121690
121690
  action: "getabi",
121691
121691
  address
121692
121692
  });
121693
- const abi23 = JSON.parse(resp);
121694
- return new index_js_2.Contract(address, abi23, this);
121693
+ const abi24 = JSON.parse(resp);
121694
+ return new index_js_2.Contract(address, abi24, this);
121695
121695
  } catch (error) {
121696
121696
  return null;
121697
121697
  }
@@ -147255,9 +147255,9 @@ var require_node_gyp_build_optional_packages = __commonJS({
147255
147255
  var vars = process.config && process.config.variables || {};
147256
147256
  var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
147257
147257
  var versions = process.versions;
147258
- var abi23 = versions.modules;
147258
+ var abi24 = versions.modules;
147259
147259
  if (versions.deno || process.isBun) {
147260
- abi23 = "unsupported";
147260
+ abi24 = "unsupported";
147261
147261
  }
147262
147262
  var runtime = isElectron() ? "electron" : "node";
147263
147263
  var arch = process.arch;
@@ -147304,7 +147304,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
147304
147304
  "platform=" + platform,
147305
147305
  "arch=" + arch,
147306
147306
  "runtime=" + runtime,
147307
- "abi=" + abi23,
147307
+ "abi=" + abi24,
147308
147308
  "uv=" + uv,
147309
147309
  armv ? "armv=" + armv : "",
147310
147310
  "libc=" + libc,
@@ -147322,7 +147322,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
147322
147322
  }
147323
147323
  function resolveFile(prebuilds) {
147324
147324
  var parsed = readdirSync(prebuilds).map(parseTags);
147325
- var candidates = parsed.filter(matchTags(runtime, abi23));
147325
+ var candidates = parsed.filter(matchTags(runtime, abi24));
147326
147326
  var winner = candidates.sort(compareTags(runtime))[0];
147327
147327
  if (winner) return path12.join(prebuilds, winner.file);
147328
147328
  }
@@ -147387,11 +147387,11 @@ var require_node_gyp_build_optional_packages = __commonJS({
147387
147387
  }
147388
147388
  return tags;
147389
147389
  }
147390
- function matchTags(runtime2, abi24) {
147390
+ function matchTags(runtime2, abi25) {
147391
147391
  return function(tags) {
147392
147392
  if (tags == null) return false;
147393
147393
  if (tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
147394
- if (tags.abi !== abi24 && !tags.napi) return false;
147394
+ if (tags.abi !== abi25 && !tags.napi) return false;
147395
147395
  if (tags.uv && tags.uv !== uv) return false;
147396
147396
  if (tags.armv && tags.armv !== armv) return false;
147397
147397
  if (tags.libc && tags.libc !== libc) return false;
@@ -153416,11 +153416,11 @@ var require_formatAbi = __commonJS({
153416
153416
  Object.defineProperty(exports2, "__esModule", { value: true });
153417
153417
  exports2.formatAbi = formatAbi;
153418
153418
  var formatAbiItem_js_1 = require_formatAbiItem();
153419
- function formatAbi(abi23) {
153419
+ function formatAbi(abi24) {
153420
153420
  const signatures = [];
153421
- const length = abi23.length;
153421
+ const length = abi24.length;
153422
153422
  for (let i = 0; i < length; i++) {
153423
- const abiItem = abi23[i];
153423
+ const abiItem = abi24[i];
153424
153424
  const signature = (0, formatAbiItem_js_1.formatAbiItem)(abiItem);
153425
153425
  signatures.push(signature);
153426
153426
  }
@@ -154183,15 +154183,15 @@ var require_parseAbi = __commonJS({
154183
154183
  var utils_js_1 = require_utils14();
154184
154184
  function parseAbi2(signatures) {
154185
154185
  const structs = (0, structs_js_1.parseStructs)(signatures);
154186
- const abi23 = [];
154186
+ const abi24 = [];
154187
154187
  const length = signatures.length;
154188
154188
  for (let i = 0; i < length; i++) {
154189
154189
  const signature = signatures[i];
154190
154190
  if ((0, signatures_js_1.isStructSignature)(signature))
154191
154191
  continue;
154192
- abi23.push((0, utils_js_1.parseSignature)(signature, structs));
154192
+ abi24.push((0, utils_js_1.parseSignature)(signature, structs));
154193
154193
  }
154194
- return abi23;
154194
+ return abi24;
154195
154195
  }
154196
154196
  }
154197
154197
  });
@@ -163983,9 +163983,9 @@ var require_getAbiItem = __commonJS({
163983
163983
  var toEventSelector_js_1 = require_toEventSelector();
163984
163984
  var toFunctionSelector_js_1 = require_toFunctionSelector();
163985
163985
  function getAbiItem2(parameters) {
163986
- const { abi: abi23, args = [], name } = parameters;
163986
+ const { abi: abi24, args = [], name } = parameters;
163987
163987
  const isSelector = (0, isHex_js_1.isHex)(name, { strict: false });
163988
- const abiItems = abi23.filter((abiItem) => {
163988
+ const abiItems = abi24.filter((abiItem) => {
163989
163989
  if (isSelector) {
163990
163990
  if (abiItem.type === "function")
163991
163991
  return (0, toFunctionSelector_js_1.toFunctionSelector)(abiItem) === name;
@@ -164110,10 +164110,10 @@ var require_encodeEventTopics = __commonJS({
164110
164110
  var getAbiItem_js_1 = require_getAbiItem();
164111
164111
  var docsPath6 = "/docs/contract/encodeEventTopics";
164112
164112
  function encodeEventTopics2(parameters) {
164113
- const { abi: abi23, eventName, args } = parameters;
164114
- let abiItem = abi23[0];
164113
+ const { abi: abi24, eventName, args } = parameters;
164114
+ let abiItem = abi24[0];
164115
164115
  if (eventName) {
164116
- const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi23, name: eventName });
164116
+ const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi24, name: eventName });
164117
164117
  if (!item)
164118
164118
  throw new abi_js_1.AbiEventNotFoundError(eventName, { docsPath: docsPath6 });
164119
164119
  abiItem = item;
@@ -164174,12 +164174,12 @@ var require_createContractEventFilter = __commonJS({
164174
164174
  var toHex_js_1 = require_toHex();
164175
164175
  var createFilterRequestScope_js_1 = require_createFilterRequestScope();
164176
164176
  async function createContractEventFilter2(client, parameters) {
164177
- const { address, abi: abi23, args, eventName, fromBlock, strict, toBlock } = parameters;
164177
+ const { address, abi: abi24, args, eventName, fromBlock, strict, toBlock } = parameters;
164178
164178
  const getRequest = (0, createFilterRequestScope_js_1.createFilterRequestScope)(client, {
164179
164179
  method: "eth_newFilter"
164180
164180
  });
164181
164181
  const topics = eventName ? (0, encodeEventTopics_js_1.encodeEventTopics)({
164182
- abi: abi23,
164182
+ abi: abi24,
164183
164183
  args,
164184
164184
  eventName
164185
164185
  }) : void 0;
@@ -164195,7 +164195,7 @@ var require_createContractEventFilter = __commonJS({
164195
164195
  ]
164196
164196
  });
164197
164197
  return {
164198
- abi: abi23,
164198
+ abi: abi24,
164199
164199
  args,
164200
164200
  eventName,
164201
164201
  id,
@@ -164233,11 +164233,11 @@ var require_prepareEncodeFunctionData = __commonJS({
164233
164233
  var getAbiItem_js_1 = require_getAbiItem();
164234
164234
  var docsPath6 = "/docs/contract/encodeFunctionData";
164235
164235
  function prepareEncodeFunctionData2(parameters) {
164236
- const { abi: abi23, args, functionName } = parameters;
164237
- let abiItem = abi23[0];
164236
+ const { abi: abi24, args, functionName } = parameters;
164237
+ let abiItem = abi24[0];
164238
164238
  if (functionName) {
164239
164239
  const item = (0, getAbiItem_js_1.getAbiItem)({
164240
- abi: abi23,
164240
+ abi: abi24,
164241
164241
  args,
164242
164242
  name: functionName
164243
164243
  });
@@ -164266,12 +164266,12 @@ var require_encodeFunctionData = __commonJS({
164266
164266
  var prepareEncodeFunctionData_js_1 = require_prepareEncodeFunctionData();
164267
164267
  function encodeFunctionData2(parameters) {
164268
164268
  const { args } = parameters;
164269
- const { abi: abi23, functionName } = (() => {
164269
+ const { abi: abi24, functionName } = (() => {
164270
164270
  if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
164271
164271
  return parameters;
164272
164272
  return (0, prepareEncodeFunctionData_js_1.prepareEncodeFunctionData)(parameters);
164273
164273
  })();
164274
- const abiItem = abi23[0];
164274
+ const abiItem = abi24[0];
164275
164275
  const signature = functionName;
164276
164276
  const data = "inputs" in abiItem && abiItem.inputs ? (0, encodeAbiParameters_js_1.encodeAbiParameters)(abiItem.inputs, args ?? []) : void 0;
164277
164277
  return (0, concat_js_1.concatHex)([signature, data ?? "0x"]);
@@ -164803,11 +164803,11 @@ var require_decodeErrorResult = __commonJS({
164803
164803
  var decodeAbiParameters_js_1 = require_decodeAbiParameters();
164804
164804
  var formatAbiItem_js_1 = require_formatAbiItem2();
164805
164805
  function decodeErrorResult2(parameters) {
164806
- const { abi: abi23, data } = parameters;
164806
+ const { abi: abi24, data } = parameters;
164807
164807
  const signature = (0, slice_js_1.slice)(data, 0, 4);
164808
164808
  if (signature === "0x")
164809
164809
  throw new abi_js_1.AbiDecodingZeroDataError();
164810
- const abi_ = [...abi23 || [], solidity_js_1.solidityError, solidity_js_1.solidityPanic];
164810
+ const abi_ = [...abi24 || [], solidity_js_1.solidityError, solidity_js_1.solidityPanic];
164811
164811
  const abiItem = abi_.find((x) => x.type === "error" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
164812
164812
  if (!abiItem)
164813
164813
  throw new abi_js_1.AbiErrorSignatureNotFoundError(signature, {
@@ -165229,8 +165229,8 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
165229
165229
  };
165230
165230
  exports2.CallExecutionError = CallExecutionError2;
165231
165231
  var ContractFunctionExecutionError2 = class extends base_js_1.BaseError {
165232
- constructor(cause, { abi: abi23, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
165233
- const abiItem = (0, getAbiItem_js_1.getAbiItem)({ abi: abi23, args, name: functionName });
165232
+ constructor(cause, { abi: abi24, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
165233
+ const abiItem = (0, getAbiItem_js_1.getAbiItem)({ abi: abi24, args, name: functionName });
165234
165234
  const formattedArgs = abiItem ? (0, formatAbiItemWithArgs_js_1.formatAbiItemWithArgs)({
165235
165235
  abiItem,
165236
165236
  args,
@@ -165296,7 +165296,7 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
165296
165296
  writable: true,
165297
165297
  value: void 0
165298
165298
  });
165299
- this.abi = abi23;
165299
+ this.abi = abi24;
165300
165300
  this.args = args;
165301
165301
  this.cause = cause;
165302
165302
  this.contractAddress = contractAddress;
@@ -165306,14 +165306,14 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
165306
165306
  };
165307
165307
  exports2.ContractFunctionExecutionError = ContractFunctionExecutionError2;
165308
165308
  var ContractFunctionRevertedError2 = class extends base_js_1.BaseError {
165309
- constructor({ abi: abi23, data, functionName, message }) {
165309
+ constructor({ abi: abi24, data, functionName, message }) {
165310
165310
  let cause;
165311
165311
  let decodedData = void 0;
165312
165312
  let metaMessages;
165313
165313
  let reason;
165314
165314
  if (data && data !== "0x") {
165315
165315
  try {
165316
- decodedData = (0, decodeErrorResult_js_1.decodeErrorResult)({ abi: abi23, data });
165316
+ decodedData = (0, decodeErrorResult_js_1.decodeErrorResult)({ abi: abi24, data });
165317
165317
  const { abiItem, errorName, args: errorArgs } = decodedData;
165318
165318
  if (errorName === "Error") {
165319
165319
  reason = errorArgs[0];
@@ -165913,7 +165913,7 @@ var require_getContractError = __commonJS({
165913
165913
  var request_js_1 = require_request();
165914
165914
  var rpc_js_1 = require_rpc();
165915
165915
  var EXECUTION_REVERTED_ERROR_CODE2 = 3;
165916
- function getContractError2(err, { abi: abi23, address, args, docsPath: docsPath6, functionName, sender }) {
165916
+ function getContractError2(err, { abi: abi24, address, args, docsPath: docsPath6, functionName, sender }) {
165917
165917
  const error = err instanceof contract_js_1.RawContractError ? err : err instanceof base_js_1.BaseError ? err.walk((err2) => "data" in err2) || err.walk() : {};
165918
165918
  const { code, data, details, message, shortMessage } = error;
165919
165919
  const cause = (() => {
@@ -165921,7 +165921,7 @@ var require_getContractError = __commonJS({
165921
165921
  return new contract_js_1.ContractFunctionZeroDataError({ functionName });
165922
165922
  if ([EXECUTION_REVERTED_ERROR_CODE2, rpc_js_1.InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {
165923
165923
  return new contract_js_1.ContractFunctionRevertedError({
165924
- abi: abi23,
165924
+ abi: abi24,
165925
165925
  data: typeof data === "object" ? data.data : data,
165926
165926
  functionName,
165927
165927
  message: error instanceof request_js_1.RpcRequestError ? details : shortMessage ?? message
@@ -165930,7 +165930,7 @@ var require_getContractError = __commonJS({
165930
165930
  return err;
165931
165931
  })();
165932
165932
  return new contract_js_1.ContractFunctionExecutionError(cause, {
165933
- abi: abi23,
165933
+ abi: abi24,
165934
165934
  args,
165935
165935
  contractAddress: address,
165936
165936
  docsPath: docsPath6,
@@ -170397,9 +170397,9 @@ var require_estimateContractGas = __commonJS({
170397
170397
  var getAction_js_1 = require_getAction();
170398
170398
  var estimateGas_js_1 = require_estimateGas2();
170399
170399
  async function estimateContractGas2(client, parameters) {
170400
- const { abi: abi23, address, args, functionName, dataSuffix, ...request } = parameters;
170400
+ const { abi: abi24, address, args, functionName, dataSuffix, ...request } = parameters;
170401
170401
  const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
170402
- abi: abi23,
170402
+ abi: abi24,
170403
170403
  args,
170404
170404
  functionName
170405
170405
  });
@@ -170413,7 +170413,7 @@ var require_estimateContractGas = __commonJS({
170413
170413
  } catch (error) {
170414
170414
  const account = request.account ? (0, parseAccount_js_1.parseAccount)(request.account) : void 0;
170415
170415
  throw (0, getContractError_js_1.getContractError)(error, {
170416
- abi: abi23,
170416
+ abi: abi24,
170417
170417
  address,
170418
170418
  args,
170419
170419
  docsPath: "/docs/contract/estimateContractGas",
@@ -170457,15 +170457,15 @@ var require_decodeEventLog = __commonJS({
170457
170457
  var formatAbiItem_js_1 = require_formatAbiItem2();
170458
170458
  var docsPath6 = "/docs/contract/decodeEventLog";
170459
170459
  function decodeEventLog2(parameters) {
170460
- const { abi: abi23, data, strict: strict_, topics } = parameters;
170460
+ const { abi: abi24, data, strict: strict_, topics } = parameters;
170461
170461
  const strict = strict_ ?? true;
170462
170462
  const [signature, ...argTopics] = topics;
170463
170463
  if (!signature)
170464
170464
  throw new abi_js_1.AbiEventSignatureEmptyTopicsError({ docsPath: docsPath6 });
170465
170465
  const abiItem = (() => {
170466
- if (abi23.length === 1)
170467
- return abi23[0];
170468
- return abi23.find((x) => x.type === "event" && signature === (0, toEventSelector_js_1.toEventSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
170466
+ if (abi24.length === 1)
170467
+ return abi24[0];
170468
+ return abi24.find((x) => x.type === "event" && signature === (0, toEventSelector_js_1.toEventSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
170469
170469
  })();
170470
170470
  if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
170471
170471
  throw new abi_js_1.AbiEventSignatureNotFoundError(signature, { docsPath: docsPath6 });
@@ -170545,7 +170545,7 @@ var require_parseEventLogs = __commonJS({
170545
170545
  var toEventSelector_js_1 = require_toEventSelector();
170546
170546
  var decodeEventLog_js_1 = require_decodeEventLog();
170547
170547
  function parseEventLogs2(parameters) {
170548
- const { abi: abi23, args, logs, strict = true } = parameters;
170548
+ const { abi: abi24, args, logs, strict = true } = parameters;
170549
170549
  const eventName = (() => {
170550
170550
  if (!parameters.eventName)
170551
170551
  return void 0;
@@ -170555,7 +170555,7 @@ var require_parseEventLogs = __commonJS({
170555
170555
  })();
170556
170556
  return logs.map((log2) => {
170557
170557
  try {
170558
- const abiItem = abi23.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === (0, toEventSelector_js_1.toEventSelector)(abiItem2));
170558
+ const abiItem = abi24.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === (0, toEventSelector_js_1.toEventSelector)(abiItem2));
170559
170559
  if (!abiItem)
170560
170560
  return null;
170561
170561
  const event = (0, decodeEventLog_js_1.decodeEventLog)({
@@ -170716,9 +170716,9 @@ var require_getContractEvents = __commonJS({
170716
170716
  var getAction_js_1 = require_getAction();
170717
170717
  var getLogs_js_1 = require_getLogs();
170718
170718
  async function getContractEvents2(client, parameters) {
170719
- const { abi: abi23, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
170720
- const event = eventName ? (0, getAbiItem_js_1.getAbiItem)({ abi: abi23, name: eventName }) : void 0;
170721
- const events = !event ? abi23.filter((x) => x.type === "event") : void 0;
170719
+ const { abi: abi24, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
170720
+ const event = eventName ? (0, getAbiItem_js_1.getAbiItem)({ abi: abi24, name: eventName }) : void 0;
170721
+ const events = !event ? abi24.filter((x) => x.type === "event") : void 0;
170722
170722
  return (0, getAction_js_1.getAction)(client, getLogs_js_1.getLogs, "getLogs")({
170723
170723
  address,
170724
170724
  args,
@@ -170744,10 +170744,10 @@ var require_decodeFunctionResult = __commonJS({
170744
170744
  var getAbiItem_js_1 = require_getAbiItem();
170745
170745
  var docsPath6 = "/docs/contract/decodeFunctionResult";
170746
170746
  function decodeFunctionResult2(parameters) {
170747
- const { abi: abi23, args, functionName, data } = parameters;
170748
- let abiItem = abi23[0];
170747
+ const { abi: abi24, args, functionName, data } = parameters;
170748
+ let abiItem = abi24[0];
170749
170749
  if (functionName) {
170750
- const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi23, args, name: functionName });
170750
+ const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi24, args, name: functionName });
170751
170751
  if (!item)
170752
170752
  throw new abi_js_1.AbiFunctionNotFoundError(functionName, { docsPath: docsPath6 });
170753
170753
  abiItem = item;
@@ -172302,10 +172302,10 @@ var require_encodeDeployData = __commonJS({
172302
172302
  var encodeAbiParameters_js_1 = require_encodeAbiParameters();
172303
172303
  var docsPath6 = "/docs/contract/encodeDeployData";
172304
172304
  function encodeDeployData2(parameters) {
172305
- const { abi: abi23, args, bytecode } = parameters;
172305
+ const { abi: abi24, args, bytecode } = parameters;
172306
172306
  if (!args || args.length === 0)
172307
172307
  return bytecode;
172308
- const description = abi23.find((x) => "type" in x && x.type === "constructor");
172308
+ const description = abi24.find((x) => "type" in x && x.type === "constructor");
172309
172309
  if (!description)
172310
172310
  throw new abi_js_1.AbiConstructorNotFoundError({ docsPath: docsPath6 });
172311
172311
  if (!("inputs" in description))
@@ -172844,9 +172844,9 @@ var require_readContract = __commonJS({
172844
172844
  var getAction_js_1 = require_getAction();
172845
172845
  var call_js_1 = require_call();
172846
172846
  async function readContract2(client, parameters) {
172847
- const { abi: abi23, address, args, functionName, ...rest } = parameters;
172847
+ const { abi: abi24, address, args, functionName, ...rest } = parameters;
172848
172848
  const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({
172849
- abi: abi23,
172849
+ abi: abi24,
172850
172850
  args,
172851
172851
  functionName
172852
172852
  });
@@ -172857,14 +172857,14 @@ var require_readContract = __commonJS({
172857
172857
  to: address
172858
172858
  });
172859
172859
  return (0, decodeFunctionResult_js_1.decodeFunctionResult)({
172860
- abi: abi23,
172860
+ abi: abi24,
172861
172861
  args,
172862
172862
  functionName,
172863
172863
  data: data || "0x"
172864
172864
  });
172865
172865
  } catch (error) {
172866
172866
  throw (0, getContractError_js_1.getContractError)(error, {
172867
- abi: abi23,
172867
+ abi: abi24,
172868
172868
  address,
172869
172869
  args,
172870
172870
  docsPath: "/docs/contract/readContract",
@@ -172888,9 +172888,9 @@ var require_simulateContract = __commonJS({
172888
172888
  var getAction_js_1 = require_getAction();
172889
172889
  var call_js_1 = require_call();
172890
172890
  async function simulateContract2(client, parameters) {
172891
- const { abi: abi23, address, args, dataSuffix, functionName, ...callRequest } = parameters;
172891
+ const { abi: abi24, address, args, dataSuffix, functionName, ...callRequest } = parameters;
172892
172892
  const account = callRequest.account ? (0, parseAccount_js_1.parseAccount)(callRequest.account) : client.account;
172893
- const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi23, args, functionName });
172893
+ const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi24, args, functionName });
172894
172894
  try {
172895
172895
  const { data } = await (0, getAction_js_1.getAction)(client, call_js_1.call, "call")({
172896
172896
  batch: false,
@@ -172900,12 +172900,12 @@ var require_simulateContract = __commonJS({
172900
172900
  account
172901
172901
  });
172902
172902
  const result = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
172903
- abi: abi23,
172903
+ abi: abi24,
172904
172904
  args,
172905
172905
  functionName,
172906
172906
  data: data || "0x"
172907
172907
  });
172908
- const minimizedAbi = abi23.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
172908
+ const minimizedAbi = abi24.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
172909
172909
  return {
172910
172910
  result,
172911
172911
  request: {
@@ -172920,7 +172920,7 @@ var require_simulateContract = __commonJS({
172920
172920
  };
172921
172921
  } catch (error) {
172922
172922
  throw (0, getContractError_js_1.getContractError)(error, {
172923
- abi: abi23,
172923
+ abi: abi24,
172924
172924
  address,
172925
172925
  args,
172926
172926
  docsPath: "/docs/contract/simulateContract",
@@ -173162,7 +173162,7 @@ var require_watchContractEvent = __commonJS({
173162
173162
  var getFilterChanges_js_1 = require_getFilterChanges();
173163
173163
  var uninstallFilter_js_1 = require_uninstallFilter();
173164
173164
  function watchContractEvent2(client, parameters) {
173165
- const { abi: abi23, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
173165
+ const { abi: abi24, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
173166
173166
  const enablePolling = (() => {
173167
173167
  if (typeof poll_ !== "undefined")
173168
173168
  return poll_;
@@ -173197,7 +173197,7 @@ var require_watchContractEvent = __commonJS({
173197
173197
  if (!initialized) {
173198
173198
  try {
173199
173199
  filter = await (0, getAction_js_1.getAction)(client, createContractEventFilter_js_1.createContractEventFilter, "createContractEventFilter")({
173200
- abi: abi23,
173200
+ abi: abi24,
173201
173201
  address,
173202
173202
  args,
173203
173203
  eventName,
@@ -173217,7 +173217,7 @@ var require_watchContractEvent = __commonJS({
173217
173217
  const blockNumber = await (0, getAction_js_1.getAction)(client, getBlockNumber_js_1.getBlockNumber, "getBlockNumber")({});
173218
173218
  if (previousBlockNumber && previousBlockNumber < blockNumber) {
173219
173219
  logs = await (0, getAction_js_1.getAction)(client, getContractEvents_js_1.getContractEvents, "getContractEvents")({
173220
- abi: abi23,
173220
+ abi: abi24,
173221
173221
  address,
173222
173222
  args,
173223
173223
  eventName,
@@ -173281,7 +173281,7 @@ var require_watchContractEvent = __commonJS({
173281
173281
  return client.transport;
173282
173282
  })();
173283
173283
  const topics = eventName ? (0, encodeEventTopics_js_1.encodeEventTopics)({
173284
- abi: abi23,
173284
+ abi: abi24,
173285
173285
  eventName,
173286
173286
  args
173287
173287
  }) : [];
@@ -173293,7 +173293,7 @@ var require_watchContractEvent = __commonJS({
173293
173293
  const log2 = data.result;
173294
173294
  try {
173295
173295
  const { eventName: eventName2, args: args2 } = (0, decodeEventLog_js_1.decodeEventLog)({
173296
- abi: abi23,
173296
+ abi: abi24,
173297
173297
  data: log2.data,
173298
173298
  topics: log2.topics,
173299
173299
  strict: strict_
@@ -173591,14 +173591,14 @@ var require_writeContract = __commonJS({
173591
173591
  var getAction_js_1 = require_getAction();
173592
173592
  var sendTransaction_js_1 = require_sendTransaction();
173593
173593
  async function writeContract2(client, parameters) {
173594
- const { abi: abi23, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
173594
+ const { abi: abi24, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
173595
173595
  if (typeof account_ === "undefined")
173596
173596
  throw new account_js_1.AccountNotFoundError({
173597
173597
  docsPath: "/docs/contract/writeContract"
173598
173598
  });
173599
173599
  const account = account_ ? (0, parseAccount_js_1.parseAccount)(account_) : null;
173600
173600
  const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
173601
- abi: abi23,
173601
+ abi: abi24,
173602
173602
  args,
173603
173603
  functionName
173604
173604
  });
@@ -173611,7 +173611,7 @@ var require_writeContract = __commonJS({
173611
173611
  });
173612
173612
  } catch (error) {
173613
173613
  throw (0, getContractError_js_1.getContractError)(error, {
173614
- abi: abi23,
173614
+ abi: abi24,
173615
173615
  address,
173616
173616
  args,
173617
173617
  docsPath: "/docs/contract/writeContract",
@@ -173639,7 +173639,7 @@ var require_getContract = __commonJS({
173639
173639
  var simulateContract_js_1 = require_simulateContract();
173640
173640
  var watchContractEvent_js_1 = require_watchContractEvent();
173641
173641
  var writeContract_js_1 = require_writeContract();
173642
- function getContract2({ abi: abi23, address, client: client_ }) {
173642
+ function getContract2({ abi: abi24, address, client: client_ }) {
173643
173643
  const client = client_;
173644
173644
  const [publicClient, walletClient] = (() => {
173645
173645
  if (!client)
@@ -173658,7 +173658,7 @@ var require_getContract = __commonJS({
173658
173658
  let hasReadFunction = false;
173659
173659
  let hasWriteFunction = false;
173660
173660
  let hasEvent = false;
173661
- for (const item of abi23) {
173661
+ for (const item of abi24) {
173662
173662
  if (item.type === "function")
173663
173663
  if (item.stateMutability === "view" || item.stateMutability === "pure")
173664
173664
  hasReadFunction = true;
@@ -173676,7 +173676,7 @@ var require_getContract = __commonJS({
173676
173676
  return (...parameters) => {
173677
173677
  const { args, options } = getFunctionParameters2(parameters);
173678
173678
  return (0, getAction_js_1.getAction)(publicClient, readContract_js_1.readContract, "readContract")({
173679
- abi: abi23,
173679
+ abi: abi24,
173680
173680
  address,
173681
173681
  functionName,
173682
173682
  args,
@@ -173691,7 +173691,7 @@ var require_getContract = __commonJS({
173691
173691
  return (...parameters) => {
173692
173692
  const { args, options } = getFunctionParameters2(parameters);
173693
173693
  return (0, getAction_js_1.getAction)(publicClient, simulateContract_js_1.simulateContract, "simulateContract")({
173694
- abi: abi23,
173694
+ abi: abi24,
173695
173695
  address,
173696
173696
  functionName,
173697
173697
  args,
@@ -173704,10 +173704,10 @@ var require_getContract = __commonJS({
173704
173704
  contract.createEventFilter = new Proxy({}, {
173705
173705
  get(_, eventName) {
173706
173706
  return (...parameters) => {
173707
- const abiEvent = abi23.find((x) => x.type === "event" && x.name === eventName);
173707
+ const abiEvent = abi24.find((x) => x.type === "event" && x.name === eventName);
173708
173708
  const { args, options } = getEventParameters2(parameters, abiEvent);
173709
173709
  return (0, getAction_js_1.getAction)(publicClient, createContractEventFilter_js_1.createContractEventFilter, "createContractEventFilter")({
173710
- abi: abi23,
173710
+ abi: abi24,
173711
173711
  address,
173712
173712
  eventName,
173713
173713
  args,
@@ -173719,10 +173719,10 @@ var require_getContract = __commonJS({
173719
173719
  contract.getEvents = new Proxy({}, {
173720
173720
  get(_, eventName) {
173721
173721
  return (...parameters) => {
173722
- const abiEvent = abi23.find((x) => x.type === "event" && x.name === eventName);
173722
+ const abiEvent = abi24.find((x) => x.type === "event" && x.name === eventName);
173723
173723
  const { args, options } = getEventParameters2(parameters, abiEvent);
173724
173724
  return (0, getAction_js_1.getAction)(publicClient, getContractEvents_js_1.getContractEvents, "getContractEvents")({
173725
- abi: abi23,
173725
+ abi: abi24,
173726
173726
  address,
173727
173727
  eventName,
173728
173728
  args,
@@ -173734,10 +173734,10 @@ var require_getContract = __commonJS({
173734
173734
  contract.watchEvent = new Proxy({}, {
173735
173735
  get(_, eventName) {
173736
173736
  return (...parameters) => {
173737
- const abiEvent = abi23.find((x) => x.type === "event" && x.name === eventName);
173737
+ const abiEvent = abi24.find((x) => x.type === "event" && x.name === eventName);
173738
173738
  const { args, options } = getEventParameters2(parameters, abiEvent);
173739
173739
  return (0, getAction_js_1.getAction)(publicClient, watchContractEvent_js_1.watchContractEvent, "watchContractEvent")({
173740
- abi: abi23,
173740
+ abi: abi24,
173741
173741
  address,
173742
173742
  eventName,
173743
173743
  args,
@@ -173755,7 +173755,7 @@ var require_getContract = __commonJS({
173755
173755
  return (...parameters) => {
173756
173756
  const { args, options } = getFunctionParameters2(parameters);
173757
173757
  return (0, getAction_js_1.getAction)(walletClient, writeContract_js_1.writeContract, "writeContract")({
173758
- abi: abi23,
173758
+ abi: abi24,
173759
173759
  address,
173760
173760
  functionName,
173761
173761
  args,
@@ -173773,7 +173773,7 @@ var require_getContract = __commonJS({
173773
173773
  const { args, options } = getFunctionParameters2(parameters);
173774
173774
  const client2 = publicClient ?? walletClient;
173775
173775
  return (0, getAction_js_1.getAction)(client2, estimateContractGas_js_1.estimateContractGas, "estimateContractGas")({
173776
- abi: abi23,
173776
+ abi: abi24,
173777
173777
  address,
173778
173778
  functionName,
173779
173779
  args,
@@ -173785,7 +173785,7 @@ var require_getContract = __commonJS({
173785
173785
  });
173786
173786
  }
173787
173787
  contract.address = address;
173788
- contract.abi = abi23;
173788
+ contract.abi = abi24;
173789
173789
  return contract;
173790
173790
  }
173791
173791
  function getFunctionParameters2(values) {
@@ -175408,7 +175408,7 @@ var require_getEip712Domain = __commonJS({
175408
175408
  const { address, factory, factoryData } = parameters;
175409
175409
  try {
175410
175410
  const [fields, name, version4, chainId, verifyingContract, salt, extensions] = await (0, getAction_js_1.getAction)(client, readContract_js_1.readContract, "readContract")({
175411
- abi: abi23,
175411
+ abi: abi24,
175412
175412
  address,
175413
175413
  functionName: "eip712Domain",
175414
175414
  factory,
@@ -175433,7 +175433,7 @@ var require_getEip712Domain = __commonJS({
175433
175433
  throw error;
175434
175434
  }
175435
175435
  }
175436
- var abi23 = [
175436
+ var abi24 = [
175437
175437
  {
175438
175438
  inputs: [],
175439
175439
  name: "eip712Domain",
@@ -179762,9 +179762,9 @@ var require_decodeFunctionData = __commonJS({
179762
179762
  var decodeAbiParameters_js_1 = require_decodeAbiParameters();
179763
179763
  var formatAbiItem_js_1 = require_formatAbiItem2();
179764
179764
  function decodeFunctionData2(parameters) {
179765
- const { abi: abi23, data } = parameters;
179765
+ const { abi: abi24, data } = parameters;
179766
179766
  const signature = (0, slice_js_1.slice)(data, 0, 4);
179767
- const description = abi23.find((x) => x.type === "function" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
179767
+ const description = abi24.find((x) => x.type === "function" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
179768
179768
  if (!description)
179769
179769
  throw new abi_js_1.AbiFunctionSignatureNotFoundError(signature, {
179770
179770
  docsPath: "/docs/contract/decodeFunctionData"
@@ -179791,10 +179791,10 @@ var require_encodeErrorResult = __commonJS({
179791
179791
  var getAbiItem_js_1 = require_getAbiItem();
179792
179792
  var docsPath6 = "/docs/contract/encodeErrorResult";
179793
179793
  function encodeErrorResult(parameters) {
179794
- const { abi: abi23, errorName, args } = parameters;
179795
- let abiItem = abi23[0];
179794
+ const { abi: abi24, errorName, args } = parameters;
179795
+ let abiItem = abi24[0];
179796
179796
  if (errorName) {
179797
- const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi23, args, name: errorName });
179797
+ const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi24, args, name: errorName });
179798
179798
  if (!item)
179799
179799
  throw new abi_js_1.AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });
179800
179800
  abiItem = item;
@@ -179825,10 +179825,10 @@ var require_encodeFunctionResult = __commonJS({
179825
179825
  var getAbiItem_js_1 = require_getAbiItem();
179826
179826
  var docsPath6 = "/docs/contract/encodeFunctionResult";
179827
179827
  function encodeFunctionResult(parameters) {
179828
- const { abi: abi23, functionName, result } = parameters;
179829
- let abiItem = abi23[0];
179828
+ const { abi: abi24, functionName, result } = parameters;
179829
+ let abiItem = abi24[0];
179830
179830
  if (functionName) {
179831
- const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi23, name: functionName });
179831
+ const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi24, name: functionName });
179832
179832
  if (!item)
179833
179833
  throw new abi_js_1.AbiFunctionNotFoundError(functionName, { docsPath: docsPath6 });
179834
179834
  abiItem = item;
@@ -182111,9 +182111,9 @@ var require_multicall2 = __commonJS({
182111
182111
  let currentChunk = 0;
182112
182112
  let currentChunkSize = 0;
182113
182113
  for (let i = 0; i < contracts2.length; i++) {
182114
- const { abi: abi23, address, args, functionName } = contracts2[i];
182114
+ const { abi: abi24, address, args, functionName } = contracts2[i];
182115
182115
  try {
182116
- const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi23, args, functionName });
182116
+ const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi24, args, functionName });
182117
182117
  currentChunkSize += (callData.length - 2) / 2;
182118
182118
  if (batchSize > 0 && currentChunkSize > batchSize && chunkedCalls[currentChunk].length > 0) {
182119
182119
  currentChunk++;
@@ -182130,7 +182130,7 @@ var require_multicall2 = __commonJS({
182130
182130
  ];
182131
182131
  } catch (err) {
182132
182132
  const error = (0, getContractError_js_1.getContractError)(err, {
182133
- abi: abi23,
182133
+ abi: abi24,
182134
182134
  address,
182135
182135
  args,
182136
182136
  docsPath: "/docs/contract/multicall",
@@ -182176,14 +182176,14 @@ var require_multicall2 = __commonJS({
182176
182176
  for (let j = 0; j < aggregate3Result.length; j++) {
182177
182177
  const { returnData, success } = aggregate3Result[j];
182178
182178
  const { callData } = chunkedCalls[i][j];
182179
- const { abi: abi23, address, functionName, args } = contracts2[results.length];
182179
+ const { abi: abi24, address, functionName, args } = contracts2[results.length];
182180
182180
  try {
182181
182181
  if (callData === "0x")
182182
182182
  throw new abi_js_1.AbiDecodingZeroDataError();
182183
182183
  if (!success)
182184
182184
  throw new contract_js_1.RawContractError({ data: returnData });
182185
182185
  const result2 = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
182186
- abi: abi23,
182186
+ abi: abi24,
182187
182187
  args,
182188
182188
  data: returnData,
182189
182189
  functionName
@@ -182191,7 +182191,7 @@ var require_multicall2 = __commonJS({
182191
182191
  results.push(allowFailure ? { result: result2, status: "success" } : result2);
182192
182192
  } catch (err) {
182193
182193
  const error = (0, getContractError_js_1.getContractError)(err, {
182194
- abi: abi23,
182194
+ abi: abi24,
182195
182195
  address,
182196
182196
  args,
182197
182197
  docsPath: "/docs/contract/multicall",
@@ -183243,13 +183243,13 @@ var require_simulateBlocks = __commonJS({
183243
183243
  return result.map((block2, i) => ({
183244
183244
  ...(0, block_js_1.formatBlock)(block2),
183245
183245
  calls: block2.calls.map((call2, j) => {
183246
- const { abi: abi23, args, functionName, to } = blocks[i].calls[j];
183246
+ const { abi: abi24, args, functionName, to } = blocks[i].calls[j];
183247
183247
  const data = call2.error?.data ?? call2.returnData;
183248
183248
  const gasUsed = BigInt(call2.gasUsed);
183249
183249
  const logs = call2.logs?.map((log2) => (0, log_js_1.formatLog)(log2));
183250
183250
  const status = call2.status === "0x1" ? "success" : "failure";
183251
- const result2 = abi23 && status === "success" ? (0, decodeFunctionResult_js_1.decodeFunctionResult)({
183252
- abi: abi23,
183251
+ const result2 = abi24 && status === "success" ? (0, decodeFunctionResult_js_1.decodeFunctionResult)({
183252
+ abi: abi24,
183253
183253
  data,
183254
183254
  functionName
183255
183255
  }) : null;
@@ -183264,7 +183264,7 @@ var require_simulateBlocks = __commonJS({
183264
183264
  if (!error2)
183265
183265
  return void 0;
183266
183266
  return (0, getContractError_js_1.getContractError)(error2, {
183267
- abi: abi23 ?? [],
183267
+ abi: abi24 ?? [],
183268
183268
  address: to,
183269
183269
  args,
183270
183270
  functionName: functionName ?? "<unknown>"
@@ -183844,10 +183844,10 @@ var require_AbiItem = __commonJS({
183844
183844
  ...prepare ? { hash: getSignatureHash2(item) } : {}
183845
183845
  };
183846
183846
  }
183847
- function fromAbi3(abi23, name, options) {
183847
+ function fromAbi3(abi24, name, options) {
183848
183848
  const { args = [], prepare = true } = options ?? {};
183849
183849
  const isSelector = Hex.validate(name, { strict: false });
183850
- const abiItems = abi23.filter((abiItem2) => {
183850
+ const abiItems = abi24.filter((abiItem2) => {
183851
183851
  if (isSelector) {
183852
183852
  if (abiItem2.type === "function" || abiItem2.type === "error")
183853
183853
  return getSelector3(abiItem2) === Hex.slice(name, 0, 4);
@@ -184990,8 +184990,8 @@ var require_AbiConstructor = __commonJS({
184990
184990
  function from5(abiConstructor) {
184991
184991
  return AbiItem.from(abiConstructor);
184992
184992
  }
184993
- function fromAbi3(abi23) {
184994
- const item = abi23.find((item2) => item2.type === "constructor");
184993
+ function fromAbi3(abi24) {
184994
+ const item = abi24.find((item2) => item2.type === "constructor");
184995
184995
  if (!item)
184996
184996
  throw new AbiItem.NotFoundError({ name: "constructor" });
184997
184997
  return item;
@@ -185066,8 +185066,8 @@ var require_AbiFunction = __commonJS({
185066
185066
  function from5(abiFunction, options = {}) {
185067
185067
  return AbiItem.from(abiFunction, options);
185068
185068
  }
185069
- function fromAbi3(abi23, name, options) {
185070
- const item = AbiItem.fromAbi(abi23, name, options);
185069
+ function fromAbi3(abi24, name, options) {
185070
+ const item = AbiItem.fromAbi(abi24, name, options);
185071
185071
  if (item.type !== "function")
185072
185072
  throw new AbiItem.NotFoundError({ name, type: "function" });
185073
185073
  return item;
@@ -186967,8 +186967,8 @@ var require_deployContract = __commonJS({
186967
186967
  var encodeDeployData_js_1 = require_encodeDeployData();
186968
186968
  var sendTransaction_js_1 = require_sendTransaction();
186969
186969
  function deployContract2(walletClient, parameters) {
186970
- const { abi: abi23, args, bytecode, ...request } = parameters;
186971
- const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi: abi23, args, bytecode });
186970
+ const { abi: abi24, args, bytecode, ...request } = parameters;
186971
+ const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi: abi24, args, bytecode });
186972
186972
  return (0, sendTransaction_js_1.sendTransaction)(walletClient, {
186973
186973
  ...request,
186974
186974
  data: calldata
@@ -187391,10 +187391,10 @@ var require_decodeDeployData = __commonJS({
187391
187391
  var decodeAbiParameters_js_1 = require_decodeAbiParameters();
187392
187392
  var docsPath6 = "/docs/contract/decodeDeployData";
187393
187393
  function decodeDeployData(parameters) {
187394
- const { abi: abi23, bytecode, data } = parameters;
187394
+ const { abi: abi24, bytecode, data } = parameters;
187395
187395
  if (data === bytecode)
187396
187396
  return { bytecode };
187397
- const description = abi23.find((x) => "type" in x && x.type === "constructor");
187397
+ const description = abi24.find((x) => "type" in x && x.type === "constructor");
187398
187398
  if (!description)
187399
187399
  throw new abi_js_1.AbiConstructorNotFoundError({ docsPath: docsPath6 });
187400
187400
  if (!("inputs" in description))
@@ -231836,21 +231836,21 @@ var require_BaseContract2 = __commonJS({
231836
231836
  return this.contractAddress;
231837
231837
  };
231838
231838
  this.encode = (functionToEncode, args) => {
231839
- const abi23 = this.contractAbi;
231839
+ const abi24 = this.contractAbi;
231840
231840
  const functionName = functionToEncode;
231841
231841
  const params = args;
231842
231842
  return (0, viem_1.encodeFunctionData)({
231843
- abi: abi23,
231843
+ abi: abi24,
231844
231844
  functionName,
231845
231845
  args: params
231846
231846
  });
231847
231847
  };
231848
231848
  this.estimateGas = async (functionToEstimate, args, options = {}) => {
231849
231849
  const contractOptions = this.convertOptions(options);
231850
- const abi23 = this.contractAbi;
231850
+ const abi24 = this.contractAbi;
231851
231851
  const params = args;
231852
231852
  return (0, actions_1.estimateContractGas)(this.runner, {
231853
- abi: abi23,
231853
+ abi: abi24,
231854
231854
  functionName: functionToEstimate,
231855
231855
  address: this.getAddress(),
231856
231856
  args: params,
@@ -279458,17 +279458,17 @@ var require_interface3 = __commonJS({
279458
279458
  * Create a new Interface for the %%fragments%%.
279459
279459
  */
279460
279460
  constructor(fragments) {
279461
- let abi23 = [];
279461
+ let abi24 = [];
279462
279462
  if (typeof fragments === "string") {
279463
- abi23 = JSON.parse(fragments);
279463
+ abi24 = JSON.parse(fragments);
279464
279464
  } else {
279465
- abi23 = fragments;
279465
+ abi24 = fragments;
279466
279466
  }
279467
279467
  this.#functions = /* @__PURE__ */ new Map();
279468
279468
  this.#errors = /* @__PURE__ */ new Map();
279469
279469
  this.#events = /* @__PURE__ */ new Map();
279470
279470
  const frags = [];
279471
- for (const a of abi23) {
279471
+ for (const a of abi24) {
279472
279472
  try {
279473
279473
  frags.push(fragments_js_1.Fragment.from(a));
279474
279474
  } catch (error) {
@@ -279532,16 +279532,16 @@ var require_interface3 = __commonJS({
279532
279532
  */
279533
279533
  format(minimal) {
279534
279534
  const format = minimal ? "minimal" : "full";
279535
- const abi23 = this.fragments.map((f) => f.format(format));
279536
- return abi23;
279535
+ const abi24 = this.fragments.map((f) => f.format(format));
279536
+ return abi24;
279537
279537
  }
279538
279538
  /**
279539
279539
  * Return the JSON-encoded ABI. This is the format Solidiy
279540
279540
  * returns.
279541
279541
  */
279542
279542
  formatJson() {
279543
- const abi23 = this.fragments.map((f) => f.format("json"));
279544
- return JSON.stringify(abi23.map((j) => JSON.parse(j)));
279543
+ const abi24 = this.fragments.map((f) => f.format("json"));
279544
+ return JSON.stringify(abi24.map((j) => JSON.parse(j)));
279545
279545
  }
279546
279546
  /**
279547
279547
  * The ABI coder that will be used to encode and decode binary
@@ -282309,12 +282309,12 @@ var require_contract5 = __commonJS({
282309
282309
  * optionally connected to a %%runner%% to perform operations on behalf
282310
282310
  * of.
282311
282311
  */
282312
- constructor(target, abi23, runner, _deployTx) {
282312
+ constructor(target, abi24, runner, _deployTx) {
282313
282313
  (0, index_js_3.assertArgument)(typeof target === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
282314
282314
  if (runner == null) {
282315
282315
  runner = null;
282316
282316
  }
282317
- const iface = index_js_1.Interface.from(abi23);
282317
+ const iface = index_js_1.Interface.from(abi24);
282318
282318
  (0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
282319
282319
  Object.defineProperty(this, internal, { value: {} });
282320
282320
  let addrPromise;
@@ -282677,10 +282677,10 @@ var require_contract5 = __commonJS({
282677
282677
  /**
282678
282678
  * Create a new Class for the %%abi%%.
282679
282679
  */
282680
- static buildClass(abi23) {
282680
+ static buildClass(abi24) {
282681
282681
  class CustomContract extends _BaseContract {
282682
282682
  constructor(address, runner = null) {
282683
- super(address, abi23, runner);
282683
+ super(address, abi24, runner);
282684
282684
  }
282685
282685
  }
282686
282686
  return CustomContract;
@@ -282688,11 +282688,11 @@ var require_contract5 = __commonJS({
282688
282688
  /**
282689
282689
  * Create a new BaseContract with a specified Interface.
282690
282690
  */
282691
- static from(target, abi23, runner) {
282691
+ static from(target, abi24, runner) {
282692
282692
  if (runner == null) {
282693
282693
  runner = null;
282694
282694
  }
282695
- const contract = new this(target, abi23, runner);
282695
+ const contract = new this(target, abi24, runner);
282696
282696
  return contract;
282697
282697
  }
282698
282698
  };
@@ -282736,8 +282736,8 @@ var require_factory2 = __commonJS({
282736
282736
  * The %%bytecode%% may be the ``bytecode`` property within the
282737
282737
  * standard Solidity JSON output.
282738
282738
  */
282739
- constructor(abi23, bytecode, runner) {
282740
- const iface = index_js_1.Interface.from(abi23);
282739
+ constructor(abi24, bytecode, runner) {
282740
+ const iface = index_js_1.Interface.from(abi24);
282741
282741
  if (bytecode instanceof Uint8Array) {
282742
282742
  bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
282743
282743
  } else {
@@ -282807,14 +282807,14 @@ var require_factory2 = __commonJS({
282807
282807
  if (typeof output === "string") {
282808
282808
  output = JSON.parse(output);
282809
282809
  }
282810
- const abi23 = output.abi;
282810
+ const abi24 = output.abi;
282811
282811
  let bytecode = "";
282812
282812
  if (output.bytecode) {
282813
282813
  bytecode = output.bytecode;
282814
282814
  } else if (output.evm && output.evm.bytecode) {
282815
282815
  bytecode = output.evm.bytecode;
282816
282816
  }
282817
- return new this(abi23, bytecode, runner);
282817
+ return new this(abi24, bytecode, runner);
282818
282818
  }
282819
282819
  };
282820
282820
  exports2.ContractFactory = ContractFactory;
@@ -287764,8 +287764,8 @@ var require_provider_etherscan2 = __commonJS({
287764
287764
  action: "getabi",
287765
287765
  address
287766
287766
  });
287767
- const abi23 = JSON.parse(resp);
287768
- return new index_js_2.Contract(address, abi23, this);
287767
+ const abi24 = JSON.parse(resp);
287768
+ return new index_js_2.Contract(address, abi24, this);
287769
287769
  } catch (error) {
287770
287770
  return null;
287771
287771
  }
@@ -338232,10 +338232,10 @@ init_formatAbiItem2();
338232
338232
  init_getAbiItem();
338233
338233
  var docsPath = "/docs/contract/encodeEventTopics";
338234
338234
  function encodeEventTopics(parameters) {
338235
- const { abi: abi23, eventName, args } = parameters;
338236
- let abiItem = abi23[0];
338235
+ const { abi: abi24, eventName, args } = parameters;
338236
+ let abiItem = abi24[0];
338237
338237
  if (eventName) {
338238
- const item = getAbiItem({ abi: abi23, name: eventName });
338238
+ const item = getAbiItem({ abi: abi24, name: eventName });
338239
338239
  if (!item)
338240
338240
  throw new AbiEventNotFoundError(eventName, { docsPath });
338241
338241
  abiItem = item;
@@ -338282,12 +338282,12 @@ function createFilterRequestScope(client, { method }) {
338282
338282
 
338283
338283
  // ../../node_modules/viem/_esm/actions/public/createContractEventFilter.js
338284
338284
  async function createContractEventFilter(client, parameters) {
338285
- const { address, abi: abi23, args, eventName, fromBlock, strict, toBlock } = parameters;
338285
+ const { address, abi: abi24, args, eventName, fromBlock, strict, toBlock } = parameters;
338286
338286
  const getRequest = createFilterRequestScope(client, {
338287
338287
  method: "eth_newFilter"
338288
338288
  });
338289
338289
  const topics = eventName ? encodeEventTopics({
338290
- abi: abi23,
338290
+ abi: abi24,
338291
338291
  args,
338292
338292
  eventName
338293
338293
  }) : void 0;
@@ -338303,7 +338303,7 @@ async function createContractEventFilter(client, parameters) {
338303
338303
  ]
338304
338304
  });
338305
338305
  return {
338306
- abi: abi23,
338306
+ abi: abi24,
338307
338307
  args,
338308
338308
  eventName,
338309
338309
  id,
@@ -338324,7 +338324,7 @@ init_contract();
338324
338324
  init_request();
338325
338325
  init_rpc();
338326
338326
  var EXECUTION_REVERTED_ERROR_CODE = 3;
338327
- function getContractError(err, { abi: abi23, address, args, docsPath: docsPath6, functionName, sender }) {
338327
+ function getContractError(err, { abi: abi24, address, args, docsPath: docsPath6, functionName, sender }) {
338328
338328
  const error = err instanceof RawContractError ? err : err instanceof BaseError2 ? err.walk((err2) => "data" in err2) || err.walk() : {};
338329
338329
  const { code, data, details, message, shortMessage } = error;
338330
338330
  const cause = (() => {
@@ -338332,7 +338332,7 @@ function getContractError(err, { abi: abi23, address, args, docsPath: docsPath6,
338332
338332
  return new ContractFunctionZeroDataError({ functionName });
338333
338333
  if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {
338334
338334
  return new ContractFunctionRevertedError({
338335
- abi: abi23,
338335
+ abi: abi24,
338336
338336
  data: typeof data === "object" ? data.data : data,
338337
338337
  functionName,
338338
338338
  message: error instanceof RpcRequestError ? details : shortMessage ?? message
@@ -338341,7 +338341,7 @@ function getContractError(err, { abi: abi23, address, args, docsPath: docsPath6,
338341
338341
  return err;
338342
338342
  })();
338343
338343
  return new ContractFunctionExecutionError(cause, {
338344
- abi: abi23,
338344
+ abi: abi24,
338345
338345
  args,
338346
338346
  contractAddress: address,
338347
338347
  docsPath: docsPath6,
@@ -339294,9 +339294,9 @@ async function estimateGas(client, args) {
339294
339294
 
339295
339295
  // ../../node_modules/viem/_esm/actions/public/estimateContractGas.js
339296
339296
  async function estimateContractGas(client, parameters) {
339297
- const { abi: abi23, address, args, functionName, dataSuffix, ...request } = parameters;
339297
+ const { abi: abi24, address, args, functionName, dataSuffix, ...request } = parameters;
339298
339298
  const data = encodeFunctionData({
339299
- abi: abi23,
339299
+ abi: abi24,
339300
339300
  args,
339301
339301
  functionName
339302
339302
  });
@@ -339310,7 +339310,7 @@ async function estimateContractGas(client, parameters) {
339310
339310
  } catch (error) {
339311
339311
  const account = request.account ? parseAccount(request.account) : void 0;
339312
339312
  throw getContractError(error, {
339313
- abi: abi23,
339313
+ abi: abi24,
339314
339314
  address,
339315
339315
  args,
339316
339316
  docsPath: "/docs/contract/estimateContractGas",
@@ -339339,15 +339339,15 @@ init_decodeAbiParameters();
339339
339339
  init_formatAbiItem2();
339340
339340
  var docsPath3 = "/docs/contract/decodeEventLog";
339341
339341
  function decodeEventLog(parameters) {
339342
- const { abi: abi23, data, strict: strict_, topics } = parameters;
339342
+ const { abi: abi24, data, strict: strict_, topics } = parameters;
339343
339343
  const strict = strict_ ?? true;
339344
339344
  const [signature, ...argTopics] = topics;
339345
339345
  if (!signature)
339346
339346
  throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });
339347
339347
  const abiItem = (() => {
339348
- if (abi23.length === 1)
339349
- return abi23[0];
339350
- return abi23.find((x) => x.type === "event" && signature === toEventSelector(formatAbiItem2(x)));
339348
+ if (abi24.length === 1)
339349
+ return abi24[0];
339350
+ return abi24.find((x) => x.type === "event" && signature === toEventSelector(formatAbiItem2(x)));
339351
339351
  })();
339352
339352
  if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
339353
339353
  throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });
@@ -339414,7 +339414,7 @@ function decodeTopic({ param, value }) {
339414
339414
 
339415
339415
  // ../../node_modules/viem/_esm/utils/abi/parseEventLogs.js
339416
339416
  function parseEventLogs(parameters) {
339417
- const { abi: abi23, args, logs, strict = true } = parameters;
339417
+ const { abi: abi24, args, logs, strict = true } = parameters;
339418
339418
  const eventName = (() => {
339419
339419
  if (!parameters.eventName)
339420
339420
  return void 0;
@@ -339424,7 +339424,7 @@ function parseEventLogs(parameters) {
339424
339424
  })();
339425
339425
  return logs.map((log2) => {
339426
339426
  try {
339427
- const abiItem = abi23.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === toEventSelector(abiItem2));
339427
+ const abiItem = abi24.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === toEventSelector(abiItem2));
339428
339428
  if (!abiItem)
339429
339429
  return null;
339430
339430
  const event = decodeEventLog({
@@ -339560,9 +339560,9 @@ async function getLogs(client, { address, blockHash, fromBlock, toBlock, event,
339560
339560
 
339561
339561
  // ../../node_modules/viem/_esm/actions/public/getContractEvents.js
339562
339562
  async function getContractEvents(client, parameters) {
339563
- const { abi: abi23, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
339564
- const event = eventName ? getAbiItem({ abi: abi23, name: eventName }) : void 0;
339565
- const events = !event ? abi23.filter((x) => x.type === "event") : void 0;
339563
+ const { abi: abi24, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
339564
+ const event = eventName ? getAbiItem({ abi: abi24, name: eventName }) : void 0;
339565
+ const events = !event ? abi24.filter((x) => x.type === "event") : void 0;
339566
339566
  return getAction(client, getLogs, "getLogs")({
339567
339567
  address,
339568
339568
  args,
@@ -339580,9 +339580,9 @@ init_decodeFunctionResult();
339580
339580
  init_encodeFunctionData();
339581
339581
  init_call();
339582
339582
  async function readContract(client, parameters) {
339583
- const { abi: abi23, address, args, functionName, ...rest } = parameters;
339583
+ const { abi: abi24, address, args, functionName, ...rest } = parameters;
339584
339584
  const calldata = encodeFunctionData({
339585
- abi: abi23,
339585
+ abi: abi24,
339586
339586
  args,
339587
339587
  functionName
339588
339588
  });
@@ -339593,14 +339593,14 @@ async function readContract(client, parameters) {
339593
339593
  to: address
339594
339594
  });
339595
339595
  return decodeFunctionResult({
339596
- abi: abi23,
339596
+ abi: abi24,
339597
339597
  args,
339598
339598
  functionName,
339599
339599
  data: data || "0x"
339600
339600
  });
339601
339601
  } catch (error) {
339602
339602
  throw getContractError(error, {
339603
- abi: abi23,
339603
+ abi: abi24,
339604
339604
  address,
339605
339605
  args,
339606
339606
  docsPath: "/docs/contract/readContract",
@@ -339615,9 +339615,9 @@ init_decodeFunctionResult();
339615
339615
  init_encodeFunctionData();
339616
339616
  init_call();
339617
339617
  async function simulateContract(client, parameters) {
339618
- const { abi: abi23, address, args, dataSuffix, functionName, ...callRequest } = parameters;
339618
+ const { abi: abi24, address, args, dataSuffix, functionName, ...callRequest } = parameters;
339619
339619
  const account = callRequest.account ? parseAccount(callRequest.account) : client.account;
339620
- const calldata = encodeFunctionData({ abi: abi23, args, functionName });
339620
+ const calldata = encodeFunctionData({ abi: abi24, args, functionName });
339621
339621
  try {
339622
339622
  const { data } = await getAction(client, call, "call")({
339623
339623
  batch: false,
@@ -339627,12 +339627,12 @@ async function simulateContract(client, parameters) {
339627
339627
  account
339628
339628
  });
339629
339629
  const result = decodeFunctionResult({
339630
- abi: abi23,
339630
+ abi: abi24,
339631
339631
  args,
339632
339632
  functionName,
339633
339633
  data: data || "0x"
339634
339634
  });
339635
- const minimizedAbi = abi23.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
339635
+ const minimizedAbi = abi24.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
339636
339636
  return {
339637
339637
  result,
339638
339638
  request: {
@@ -339647,7 +339647,7 @@ async function simulateContract(client, parameters) {
339647
339647
  };
339648
339648
  } catch (error) {
339649
339649
  throw getContractError(error, {
339650
- abi: abi23,
339650
+ abi: abi24,
339651
339651
  address,
339652
339652
  args,
339653
339653
  docsPath: "/docs/contract/simulateContract",
@@ -339815,7 +339815,7 @@ async function uninstallFilter(_client, { filter }) {
339815
339815
 
339816
339816
  // ../../node_modules/viem/_esm/actions/public/watchContractEvent.js
339817
339817
  function watchContractEvent(client, parameters) {
339818
- const { abi: abi23, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
339818
+ const { abi: abi24, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
339819
339819
  const enablePolling = (() => {
339820
339820
  if (typeof poll_ !== "undefined")
339821
339821
  return poll_;
@@ -339850,7 +339850,7 @@ function watchContractEvent(client, parameters) {
339850
339850
  if (!initialized) {
339851
339851
  try {
339852
339852
  filter = await getAction(client, createContractEventFilter, "createContractEventFilter")({
339853
- abi: abi23,
339853
+ abi: abi24,
339854
339854
  address,
339855
339855
  args,
339856
339856
  eventName,
@@ -339870,7 +339870,7 @@ function watchContractEvent(client, parameters) {
339870
339870
  const blockNumber = await getAction(client, getBlockNumber, "getBlockNumber")({});
339871
339871
  if (previousBlockNumber && previousBlockNumber < blockNumber) {
339872
339872
  logs = await getAction(client, getContractEvents, "getContractEvents")({
339873
- abi: abi23,
339873
+ abi: abi24,
339874
339874
  address,
339875
339875
  args,
339876
339876
  eventName,
@@ -339934,7 +339934,7 @@ function watchContractEvent(client, parameters) {
339934
339934
  return client.transport;
339935
339935
  })();
339936
339936
  const topics = eventName ? encodeEventTopics({
339937
- abi: abi23,
339937
+ abi: abi24,
339938
339938
  eventName,
339939
339939
  args
339940
339940
  }) : [];
@@ -339946,7 +339946,7 @@ function watchContractEvent(client, parameters) {
339946
339946
  const log2 = data.result;
339947
339947
  try {
339948
339948
  const { eventName: eventName2, args: args2 } = decodeEventLog({
339949
- abi: abi23,
339949
+ abi: abi24,
339950
339950
  data: log2.data,
339951
339951
  topics: log2.topics,
339952
339952
  strict: strict_
@@ -340197,14 +340197,14 @@ async function sendTransaction(client, parameters) {
340197
340197
 
340198
340198
  // ../../node_modules/viem/_esm/actions/wallet/writeContract.js
340199
340199
  async function writeContract(client, parameters) {
340200
- const { abi: abi23, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
340200
+ const { abi: abi24, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
340201
340201
  if (typeof account_ === "undefined")
340202
340202
  throw new AccountNotFoundError({
340203
340203
  docsPath: "/docs/contract/writeContract"
340204
340204
  });
340205
340205
  const account = account_ ? parseAccount(account_) : null;
340206
340206
  const data = encodeFunctionData({
340207
- abi: abi23,
340207
+ abi: abi24,
340208
340208
  args,
340209
340209
  functionName
340210
340210
  });
@@ -340217,7 +340217,7 @@ async function writeContract(client, parameters) {
340217
340217
  });
340218
340218
  } catch (error) {
340219
340219
  throw getContractError(error, {
340220
- abi: abi23,
340220
+ abi: abi24,
340221
340221
  address,
340222
340222
  args,
340223
340223
  docsPath: "/docs/contract/writeContract",
@@ -340228,7 +340228,7 @@ async function writeContract(client, parameters) {
340228
340228
  }
340229
340229
 
340230
340230
  // ../../node_modules/viem/_esm/actions/getContract.js
340231
- function getContract({ abi: abi23, address, client: client_ }) {
340231
+ function getContract({ abi: abi24, address, client: client_ }) {
340232
340232
  const client = client_;
340233
340233
  const [publicClient, walletClient] = (() => {
340234
340234
  if (!client)
@@ -340247,7 +340247,7 @@ function getContract({ abi: abi23, address, client: client_ }) {
340247
340247
  let hasReadFunction = false;
340248
340248
  let hasWriteFunction = false;
340249
340249
  let hasEvent = false;
340250
- for (const item of abi23) {
340250
+ for (const item of abi24) {
340251
340251
  if (item.type === "function")
340252
340252
  if (item.stateMutability === "view" || item.stateMutability === "pure")
340253
340253
  hasReadFunction = true;
@@ -340265,7 +340265,7 @@ function getContract({ abi: abi23, address, client: client_ }) {
340265
340265
  return (...parameters) => {
340266
340266
  const { args, options } = getFunctionParameters(parameters);
340267
340267
  return getAction(publicClient, readContract, "readContract")({
340268
- abi: abi23,
340268
+ abi: abi24,
340269
340269
  address,
340270
340270
  functionName,
340271
340271
  args,
@@ -340280,7 +340280,7 @@ function getContract({ abi: abi23, address, client: client_ }) {
340280
340280
  return (...parameters) => {
340281
340281
  const { args, options } = getFunctionParameters(parameters);
340282
340282
  return getAction(publicClient, simulateContract, "simulateContract")({
340283
- abi: abi23,
340283
+ abi: abi24,
340284
340284
  address,
340285
340285
  functionName,
340286
340286
  args,
@@ -340293,10 +340293,10 @@ function getContract({ abi: abi23, address, client: client_ }) {
340293
340293
  contract.createEventFilter = new Proxy({}, {
340294
340294
  get(_, eventName) {
340295
340295
  return (...parameters) => {
340296
- const abiEvent = abi23.find((x) => x.type === "event" && x.name === eventName);
340296
+ const abiEvent = abi24.find((x) => x.type === "event" && x.name === eventName);
340297
340297
  const { args, options } = getEventParameters(parameters, abiEvent);
340298
340298
  return getAction(publicClient, createContractEventFilter, "createContractEventFilter")({
340299
- abi: abi23,
340299
+ abi: abi24,
340300
340300
  address,
340301
340301
  eventName,
340302
340302
  args,
@@ -340308,10 +340308,10 @@ function getContract({ abi: abi23, address, client: client_ }) {
340308
340308
  contract.getEvents = new Proxy({}, {
340309
340309
  get(_, eventName) {
340310
340310
  return (...parameters) => {
340311
- const abiEvent = abi23.find((x) => x.type === "event" && x.name === eventName);
340311
+ const abiEvent = abi24.find((x) => x.type === "event" && x.name === eventName);
340312
340312
  const { args, options } = getEventParameters(parameters, abiEvent);
340313
340313
  return getAction(publicClient, getContractEvents, "getContractEvents")({
340314
- abi: abi23,
340314
+ abi: abi24,
340315
340315
  address,
340316
340316
  eventName,
340317
340317
  args,
@@ -340323,10 +340323,10 @@ function getContract({ abi: abi23, address, client: client_ }) {
340323
340323
  contract.watchEvent = new Proxy({}, {
340324
340324
  get(_, eventName) {
340325
340325
  return (...parameters) => {
340326
- const abiEvent = abi23.find((x) => x.type === "event" && x.name === eventName);
340326
+ const abiEvent = abi24.find((x) => x.type === "event" && x.name === eventName);
340327
340327
  const { args, options } = getEventParameters(parameters, abiEvent);
340328
340328
  return getAction(publicClient, watchContractEvent, "watchContractEvent")({
340329
- abi: abi23,
340329
+ abi: abi24,
340330
340330
  address,
340331
340331
  eventName,
340332
340332
  args,
@@ -340344,7 +340344,7 @@ function getContract({ abi: abi23, address, client: client_ }) {
340344
340344
  return (...parameters) => {
340345
340345
  const { args, options } = getFunctionParameters(parameters);
340346
340346
  return getAction(walletClient, writeContract, "writeContract")({
340347
- abi: abi23,
340347
+ abi: abi24,
340348
340348
  address,
340349
340349
  functionName,
340350
340350
  args,
@@ -340362,7 +340362,7 @@ function getContract({ abi: abi23, address, client: client_ }) {
340362
340362
  const { args, options } = getFunctionParameters(parameters);
340363
340363
  const client2 = publicClient ?? walletClient;
340364
340364
  return getAction(client2, estimateContractGas, "estimateContractGas")({
340365
- abi: abi23,
340365
+ abi: abi24,
340366
340366
  address,
340367
340367
  functionName,
340368
340368
  args,
@@ -340374,7 +340374,7 @@ function getContract({ abi: abi23, address, client: client_ }) {
340374
340374
  });
340375
340375
  }
340376
340376
  contract.address = address;
340377
- contract.abi = abi23;
340377
+ contract.abi = abi24;
340378
340378
  return contract;
340379
340379
  }
340380
340380
  function getFunctionParameters(values) {
@@ -342081,9 +342081,9 @@ init_toFunctionSelector();
342081
342081
  init_decodeAbiParameters();
342082
342082
  init_formatAbiItem2();
342083
342083
  function decodeFunctionData(parameters) {
342084
- const { abi: abi23, data } = parameters;
342084
+ const { abi: abi24, data } = parameters;
342085
342085
  const signature = slice(data, 0, 4);
342086
- const description = abi23.find((x) => x.type === "function" && signature === toFunctionSelector(formatAbiItem2(x)));
342086
+ const description = abi24.find((x) => x.type === "function" && signature === toFunctionSelector(formatAbiItem2(x)));
342087
342087
  if (!description)
342088
342088
  throw new AbiFunctionSignatureNotFoundError(signature, {
342089
342089
  docsPath: "/docs/contract/decodeFunctionData"
@@ -342727,9 +342727,9 @@ async function multicall(client, parameters) {
342727
342727
  let currentChunk = 0;
342728
342728
  let currentChunkSize = 0;
342729
342729
  for (let i = 0; i < contracts2.length; i++) {
342730
- const { abi: abi23, address, args, functionName } = contracts2[i];
342730
+ const { abi: abi24, address, args, functionName } = contracts2[i];
342731
342731
  try {
342732
- const callData = encodeFunctionData({ abi: abi23, args, functionName });
342732
+ const callData = encodeFunctionData({ abi: abi24, args, functionName });
342733
342733
  currentChunkSize += (callData.length - 2) / 2;
342734
342734
  if (
342735
342735
  // Check if batching is enabled.
@@ -342751,7 +342751,7 @@ async function multicall(client, parameters) {
342751
342751
  ];
342752
342752
  } catch (err) {
342753
342753
  const error = getContractError(err, {
342754
- abi: abi23,
342754
+ abi: abi24,
342755
342755
  address,
342756
342756
  args,
342757
342757
  docsPath: "/docs/contract/multicall",
@@ -342797,14 +342797,14 @@ async function multicall(client, parameters) {
342797
342797
  for (let j = 0; j < aggregate3Result.length; j++) {
342798
342798
  const { returnData, success } = aggregate3Result[j];
342799
342799
  const { callData } = chunkedCalls[i][j];
342800
- const { abi: abi23, address, functionName, args } = contracts2[results.length];
342800
+ const { abi: abi24, address, functionName, args } = contracts2[results.length];
342801
342801
  try {
342802
342802
  if (callData === "0x")
342803
342803
  throw new AbiDecodingZeroDataError();
342804
342804
  if (!success)
342805
342805
  throw new RawContractError({ data: returnData });
342806
342806
  const result2 = decodeFunctionResult({
342807
- abi: abi23,
342807
+ abi: abi24,
342808
342808
  args,
342809
342809
  data: returnData,
342810
342810
  functionName
@@ -342812,7 +342812,7 @@ async function multicall(client, parameters) {
342812
342812
  results.push(allowFailure ? { result: result2, status: "success" } : result2);
342813
342813
  } catch (err) {
342814
342814
  const error = getContractError(err, {
342815
- abi: abi23,
342815
+ abi: abi24,
342816
342816
  address,
342817
342817
  args,
342818
342818
  docsPath: "/docs/contract/multicall",
@@ -343351,13 +343351,13 @@ async function simulateBlocks(client, parameters) {
343351
343351
  return result.map((block2, i) => ({
343352
343352
  ...formatBlock(block2),
343353
343353
  calls: block2.calls.map((call2, j) => {
343354
- const { abi: abi23, args, functionName, to } = blocks[i].calls[j];
343354
+ const { abi: abi24, args, functionName, to } = blocks[i].calls[j];
343355
343355
  const data = call2.error?.data ?? call2.returnData;
343356
343356
  const gasUsed = BigInt(call2.gasUsed);
343357
343357
  const logs = call2.logs?.map((log2) => formatLog(log2));
343358
343358
  const status = call2.status === "0x1" ? "success" : "failure";
343359
- const result2 = abi23 && status === "success" ? decodeFunctionResult({
343360
- abi: abi23,
343359
+ const result2 = abi24 && status === "success" ? decodeFunctionResult({
343360
+ abi: abi24,
343361
343361
  data,
343362
343362
  functionName
343363
343363
  }) : null;
@@ -343372,7 +343372,7 @@ async function simulateBlocks(client, parameters) {
343372
343372
  if (!error2)
343373
343373
  return void 0;
343374
343374
  return getContractError(error2, {
343375
- abi: abi23 ?? [],
343375
+ abi: abi24 ?? [],
343376
343376
  address: to,
343377
343377
  args,
343378
343378
  functionName: functionName ?? "<unknown>"
@@ -343649,10 +343649,10 @@ function from2(abiItem, options = {}) {
343649
343649
  ...prepare ? { hash: getSignatureHash(item) } : {}
343650
343650
  };
343651
343651
  }
343652
- function fromAbi(abi23, name, options) {
343652
+ function fromAbi(abi24, name, options) {
343653
343653
  const { args = [], prepare = true } = options ?? {};
343654
343654
  const isSelector = validate(name, { strict: false });
343655
- const abiItems = abi23.filter((abiItem2) => {
343655
+ const abiItems = abi24.filter((abiItem2) => {
343656
343656
  if (isSelector) {
343657
343657
  if (abiItem2.type === "function" || abiItem2.type === "error")
343658
343658
  return getSelector(abiItem2) === slice2(name, 0, 4);
@@ -344252,8 +344252,8 @@ function encodeData2(abiFunction, ...args) {
344252
344252
  function from4(abiFunction, options = {}) {
344253
344253
  return from2(abiFunction, options);
344254
344254
  }
344255
- function fromAbi2(abi23, name, options) {
344256
- const item = fromAbi(abi23, name, options);
344255
+ function fromAbi2(abi24, name, options) {
344256
+ const item = fromAbi(abi24, name, options);
344257
344257
  if (item.type !== "function")
344258
344258
  throw new NotFoundError({ name, type: "function" });
344259
344259
  return item;
@@ -345672,8 +345672,8 @@ function createTestClient(parameters) {
345672
345672
  // ../../node_modules/viem/_esm/actions/wallet/deployContract.js
345673
345673
  init_encodeDeployData();
345674
345674
  function deployContract(walletClient, parameters) {
345675
- const { abi: abi23, args, bytecode, ...request } = parameters;
345676
- const calldata = encodeDeployData({ abi: abi23, args, bytecode });
345675
+ const { abi: abi24, args, bytecode, ...request } = parameters;
345676
+ const calldata = encodeDeployData({ abi: abi24, args, bytecode });
345677
345677
  return sendTransaction(walletClient, {
345678
345678
  ...request,
345679
345679
  data: calldata
@@ -345871,6 +345871,7 @@ init_toHex();
345871
345871
  init_fromBytes();
345872
345872
  init_concat();
345873
345873
  init_getChainContractAddress();
345874
+ init_formatEther();
345874
345875
  init_fromHex();
345875
345876
  init_getAddress();
345876
345877
  init_toFunctionSelector();
@@ -348826,6 +348827,253 @@ var iRewardsCompressorAbi = [
348826
348827
  }
348827
348828
  ];
348828
348829
 
348830
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/abi/iBaseRewardPool.js
348831
+ var iBaseRewardPoolAbi = [
348832
+ {
348833
+ type: "function",
348834
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
348835
+ name: "balanceOf",
348836
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348837
+ stateMutability: "view"
348838
+ },
348839
+ {
348840
+ type: "function",
348841
+ inputs: [],
348842
+ name: "currentRewards",
348843
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348844
+ stateMutability: "view"
348845
+ },
348846
+ {
348847
+ type: "function",
348848
+ inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }],
348849
+ name: "donate",
348850
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
348851
+ stateMutability: "nonpayable"
348852
+ },
348853
+ {
348854
+ type: "function",
348855
+ inputs: [],
348856
+ name: "duration",
348857
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348858
+ stateMutability: "view"
348859
+ },
348860
+ {
348861
+ type: "function",
348862
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
348863
+ name: "earned",
348864
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348865
+ stateMutability: "view"
348866
+ },
348867
+ {
348868
+ type: "function",
348869
+ inputs: [{ name: "i", internalType: "uint256", type: "uint256" }],
348870
+ name: "extraRewards",
348871
+ outputs: [{ name: "", internalType: "address", type: "address" }],
348872
+ stateMutability: "view"
348873
+ },
348874
+ {
348875
+ type: "function",
348876
+ inputs: [],
348877
+ name: "extraRewardsLength",
348878
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348879
+ stateMutability: "view"
348880
+ },
348881
+ {
348882
+ type: "function",
348883
+ inputs: [],
348884
+ name: "getReward",
348885
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
348886
+ stateMutability: "nonpayable"
348887
+ },
348888
+ {
348889
+ type: "function",
348890
+ inputs: [
348891
+ { name: "_account", internalType: "address", type: "address" },
348892
+ { name: "_claimExtras", internalType: "bool", type: "bool" }
348893
+ ],
348894
+ name: "getReward",
348895
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
348896
+ stateMutability: "nonpayable"
348897
+ },
348898
+ {
348899
+ type: "function",
348900
+ inputs: [],
348901
+ name: "historicalRewards",
348902
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348903
+ stateMutability: "view"
348904
+ },
348905
+ {
348906
+ type: "function",
348907
+ inputs: [],
348908
+ name: "lastTimeRewardApplicable",
348909
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348910
+ stateMutability: "view"
348911
+ },
348912
+ {
348913
+ type: "function",
348914
+ inputs: [],
348915
+ name: "lastUpdateTime",
348916
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348917
+ stateMutability: "view"
348918
+ },
348919
+ {
348920
+ type: "function",
348921
+ inputs: [],
348922
+ name: "newRewardRatio",
348923
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348924
+ stateMutability: "view"
348925
+ },
348926
+ {
348927
+ type: "function",
348928
+ inputs: [],
348929
+ name: "operator",
348930
+ outputs: [{ name: "", internalType: "address", type: "address" }],
348931
+ stateMutability: "view"
348932
+ },
348933
+ {
348934
+ type: "function",
348935
+ inputs: [],
348936
+ name: "periodFinish",
348937
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348938
+ stateMutability: "view"
348939
+ },
348940
+ {
348941
+ type: "function",
348942
+ inputs: [],
348943
+ name: "pid",
348944
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348945
+ stateMutability: "view"
348946
+ },
348947
+ {
348948
+ type: "function",
348949
+ inputs: [],
348950
+ name: "queuedRewards",
348951
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348952
+ stateMutability: "view"
348953
+ },
348954
+ {
348955
+ type: "function",
348956
+ inputs: [],
348957
+ name: "rewardManager",
348958
+ outputs: [{ name: "", internalType: "address", type: "address" }],
348959
+ stateMutability: "view"
348960
+ },
348961
+ {
348962
+ type: "function",
348963
+ inputs: [],
348964
+ name: "rewardPerToken",
348965
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348966
+ stateMutability: "view"
348967
+ },
348968
+ {
348969
+ type: "function",
348970
+ inputs: [],
348971
+ name: "rewardPerTokenStored",
348972
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348973
+ stateMutability: "view"
348974
+ },
348975
+ {
348976
+ type: "function",
348977
+ inputs: [],
348978
+ name: "rewardRate",
348979
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348980
+ stateMutability: "view"
348981
+ },
348982
+ {
348983
+ type: "function",
348984
+ inputs: [],
348985
+ name: "rewardToken",
348986
+ outputs: [{ name: "", internalType: "contract IERC20", type: "address" }],
348987
+ stateMutability: "view"
348988
+ },
348989
+ {
348990
+ type: "function",
348991
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
348992
+ name: "rewards",
348993
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
348994
+ stateMutability: "view"
348995
+ },
348996
+ {
348997
+ type: "function",
348998
+ inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }],
348999
+ name: "stake",
349000
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
349001
+ stateMutability: "nonpayable"
349002
+ },
349003
+ {
349004
+ type: "function",
349005
+ inputs: [],
349006
+ name: "stakeAll",
349007
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
349008
+ stateMutability: "nonpayable"
349009
+ },
349010
+ {
349011
+ type: "function",
349012
+ inputs: [
349013
+ { name: "_for", internalType: "address", type: "address" },
349014
+ { name: "_amount", internalType: "uint256", type: "uint256" }
349015
+ ],
349016
+ name: "stakeFor",
349017
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
349018
+ stateMutability: "nonpayable"
349019
+ },
349020
+ {
349021
+ type: "function",
349022
+ inputs: [],
349023
+ name: "stakingToken",
349024
+ outputs: [{ name: "", internalType: "contract IERC20", type: "address" }],
349025
+ stateMutability: "view"
349026
+ },
349027
+ {
349028
+ type: "function",
349029
+ inputs: [],
349030
+ name: "totalSupply",
349031
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
349032
+ stateMutability: "view"
349033
+ },
349034
+ {
349035
+ type: "function",
349036
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
349037
+ name: "userRewardPerTokenPaid",
349038
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
349039
+ stateMutability: "view"
349040
+ },
349041
+ {
349042
+ type: "function",
349043
+ inputs: [
349044
+ { name: "amount", internalType: "uint256", type: "uint256" },
349045
+ { name: "claim", internalType: "bool", type: "bool" }
349046
+ ],
349047
+ name: "withdraw",
349048
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
349049
+ stateMutability: "nonpayable"
349050
+ },
349051
+ {
349052
+ type: "function",
349053
+ inputs: [{ name: "claim", internalType: "bool", type: "bool" }],
349054
+ name: "withdrawAll",
349055
+ outputs: [],
349056
+ stateMutability: "nonpayable"
349057
+ },
349058
+ {
349059
+ type: "function",
349060
+ inputs: [{ name: "claim", internalType: "bool", type: "bool" }],
349061
+ name: "withdrawAllAndUnwrap",
349062
+ outputs: [],
349063
+ stateMutability: "nonpayable"
349064
+ },
349065
+ {
349066
+ type: "function",
349067
+ inputs: [
349068
+ { name: "amount", internalType: "uint256", type: "uint256" },
349069
+ { name: "claim", internalType: "bool", type: "bool" }
349070
+ ],
349071
+ name: "withdrawAndUnwrap",
349072
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
349073
+ stateMutability: "nonpayable"
349074
+ }
349075
+ ];
349076
+
348829
349077
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/abi/v300.js
348830
349078
  var iAddressProviderV300Abi = [
348831
349079
  {
@@ -353234,12 +353482,12 @@ var json_parse = (s) => {
353234
353482
  function createRawTx(to, parameters, description) {
353235
353483
  const { args } = parameters;
353236
353484
  const fname = parameters.functionName;
353237
- const { abi: abi23, functionName } = (() => {
353485
+ const { abi: abi24, functionName } = (() => {
353238
353486
  if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
353239
353487
  return parameters;
353240
353488
  return prepareEncodeFunctionData(parameters);
353241
353489
  })();
353242
- const abiItem = abi23[0];
353490
+ const abiItem = abi24[0];
353243
353491
  const signature = functionName;
353244
353492
  const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
353245
353493
  const functionEncodedData = concatHex([signature, data ?? "0x"]);
@@ -354576,10 +354824,22 @@ var BaseContract = class extends SDKConstruct {
354576
354824
  }
354577
354825
  /**
354578
354826
  * Converts contract calldata to some human-friendly string
354827
+ * This is safe function which should not throw
354579
354828
  * @param calldata
354580
354829
  * @returns
354581
354830
  */
354582
354831
  parseFunctionData(calldata) {
354832
+ try {
354833
+ return this.mustParseFunctionData(calldata);
354834
+ } catch (e) {
354835
+ const selector = calldata.slice(0, 10);
354836
+ this.logger?.warn(
354837
+ `error parsing function with selector ${selector} in ${this.name} v${this.version} at ${this.address}: ${e}`
354838
+ );
354839
+ return `unknown: ${this.labelAddress(this.address)}.${selector}`;
354840
+ }
354841
+ }
354842
+ mustParseFunctionData(calldata) {
354583
354843
  const decoded = decodeFunctionData({
354584
354844
  abi: this.abi,
354585
354845
  data: calldata
@@ -360671,9 +360931,9 @@ async function simulateMulticall(client, parameters) {
360671
360931
  let currentChunk = 0;
360672
360932
  let currentChunkSize = 0;
360673
360933
  for (const contract of contracts2) {
360674
- const { abi: abi23, address, args, functionName } = contract;
360934
+ const { abi: abi24, address, args, functionName } = contract;
360675
360935
  try {
360676
- const callData = encodeFunctionData({ abi: abi23, args, functionName });
360936
+ const callData = encodeFunctionData({ abi: abi24, args, functionName });
360677
360937
  currentChunkSize += (callData.length - 2) / 2;
360678
360938
  if (
360679
360939
  // Check if batching is enabled.
@@ -360695,7 +360955,7 @@ async function simulateMulticall(client, parameters) {
360695
360955
  ];
360696
360956
  } catch (err) {
360697
360957
  const error = getContractError(err, {
360698
- abi: abi23,
360958
+ abi: abi24,
360699
360959
  address,
360700
360960
  args,
360701
360961
  docsPath: "/docs/contract/multicall",
@@ -360752,12 +361012,12 @@ async function simulateMulticall(client, parameters) {
360752
361012
  for (let j = 0; j < aggregate3Result.length; j++) {
360753
361013
  const { returnData, success } = aggregate3Result[j];
360754
361014
  const { callData } = chunkedCalls[i][j];
360755
- const { abi: abi23, address, functionName, args } = contracts2[results.length];
361015
+ const { abi: abi24, address, functionName, args } = contracts2[results.length];
360756
361016
  try {
360757
361017
  if (callData === "0x") throw new AbiDecodingZeroDataError();
360758
361018
  if (!success) throw new RawContractError({ data: returnData });
360759
361019
  const result2 = decodeFunctionResult({
360760
- abi: abi23,
361020
+ abi: abi24,
360761
361021
  args,
360762
361022
  data: returnData,
360763
361023
  functionName
@@ -360765,7 +361025,7 @@ async function simulateMulticall(client, parameters) {
360765
361025
  results.push(allowFailure ? { result: result2, status: "success" } : result2);
360766
361026
  } catch (err) {
360767
361027
  const error = getContractError(err, {
360768
- abi: abi23,
361028
+ abi: abi24,
360769
361029
  address,
360770
361030
  args,
360771
361031
  docsPath: "/docs/contract/multicall",
@@ -370503,17 +370763,6 @@ var BoundedPriceFeedContract = class extends AbstractPriceFeedContract {
370503
370763
  }
370504
370764
  };
370505
370765
 
370506
- // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/ChainlinkPriceFeed.js
370507
- var ChainlinkPriceFeedContract = class extends AbstractPriceFeedContract {
370508
- constructor(sdk, args) {
370509
- super(sdk, {
370510
- ...args,
370511
- name: "ChainlinkPriceFeed",
370512
- abi: chainlinkReadableAggregatorAbi
370513
- });
370514
- }
370515
- };
370516
-
370517
370766
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/CompositePriceFeed.js
370518
370767
  var CompositePriceFeedContract = class extends AbstractPriceFeedContract {
370519
370768
  constructor(sdk, args) {
@@ -370610,6 +370859,17 @@ var Erc4626PriceFeedContract = class extends AbstractLPPriceFeedContract {
370610
370859
  }
370611
370860
  };
370612
370861
 
370862
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/ExternalPriceFeed.js
370863
+ var ExternalPriceFeedContract = class extends AbstractPriceFeedContract {
370864
+ constructor(sdk, args) {
370865
+ super(sdk, {
370866
+ ...args,
370867
+ name: "ExternalPriceFeed",
370868
+ abi: chainlinkReadableAggregatorAbi
370869
+ });
370870
+ }
370871
+ };
370872
+
370613
370873
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/MellowLRTPriceFeed.js
370614
370874
  var MellowLRTPriceFeedContract = class extends AbstractLPPriceFeedContract {
370615
370875
  constructor(sdk, args) {
@@ -370689,6 +370949,49 @@ var Hooks = class {
370689
370949
  }
370690
370950
  };
370691
370951
 
370952
+ // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/PythPriceFeed.js
370953
+ var abi11 = [];
370954
+ var PythPriceFeed = class extends AbstractPriceFeedContract {
370955
+ token;
370956
+ priceFeedId;
370957
+ pyth;
370958
+ maxConfToPriceRatio;
370959
+ constructor(sdk, args) {
370960
+ super(sdk, {
370961
+ ...args,
370962
+ name: "PythPriceFeed",
370963
+ abi: abi11
370964
+ });
370965
+ if (args.baseParams.version === 310n) {
370966
+ const decoded = decodeAbiParameters(
370967
+ [
370968
+ { type: "address", name: "token" },
370969
+ { type: "bytes32", name: "priceFeedId" },
370970
+ { type: "address", name: "pyth" },
370971
+ { type: "uint256", name: "maxConfToPriceRatio" }
370972
+ ],
370973
+ args.baseParams.serializedParams
370974
+ );
370975
+ this.token = decoded[0];
370976
+ this.priceFeedId = decoded[1];
370977
+ this.pyth = decoded[2];
370978
+ this.maxConfToPriceRatio = decoded[3];
370979
+ } else {
370980
+ const decoded = decodeAbiParameters(
370981
+ [
370982
+ { type: "address", name: "token" },
370983
+ { type: "bytes32", name: "priceFeedId" },
370984
+ { type: "address", name: "pyth" }
370985
+ ],
370986
+ args.baseParams.serializedParams
370987
+ );
370988
+ this.token = decoded[0];
370989
+ this.priceFeedId = decoded[1];
370990
+ this.pyth = decoded[2];
370991
+ }
370992
+ }
370993
+ };
370994
+
370692
370995
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pricefeeds/RedstonePriceFeed.js
370693
370996
  var RedstonePriceFeedContract = class extends AbstractPriceFeedContract {
370694
370997
  dataServiceId;
@@ -371162,38 +371465,48 @@ var PriceFeedRegister = class extends SDKConstruct {
371162
371465
  data.baseParams.contractType
371163
371466
  );
371164
371467
  switch (contractType) {
371165
- case "PRICE_FEED::EXTERNAL":
371166
- return new ChainlinkPriceFeedContract(this.sdk, data);
371167
- case "PRICE_FEED::YEARN":
371168
- return new YearnPriceFeedContract(this.sdk, data);
371169
- case "PRICE_FEED::CURVE_STABLE":
371170
- return new CurveStablePriceFeedContract(this.sdk, data);
371171
- case "PRICE_FEED::WSTETH":
371172
- return new WstETHPriceFeedContract(this.sdk, data);
371173
- case "PRICE_FEED::BOUNDED":
371174
- return new BoundedPriceFeedContract(this.sdk, data);
371175
- case "PRICE_FEED::COMPOSITE":
371176
- return new CompositePriceFeedContract(this.sdk, data);
371177
371468
  case "PRICE_FEED::BALANCER_STABLE":
371178
371469
  return new BalancerStablePriceFeedContract(this.sdk, data);
371179
371470
  case "PRICE_FEED::BALANCER_WEIGHTED":
371180
371471
  return new BalancerWeightedPriceFeedContract(this.sdk, data);
371472
+ case "PRICE_FEED::BOUNDED":
371473
+ return new BoundedPriceFeedContract(this.sdk, data);
371474
+ case "PRICE_FEED::COMPOSITE":
371475
+ return new CompositePriceFeedContract(this.sdk, data);
371181
371476
  case "PRICE_FEED::CURVE_CRYPTO":
371182
371477
  return new CurveCryptoPriceFeedContract(this.sdk, data);
371183
- case "PRICE_FEED::REDSTONE":
371184
- return new RedstonePriceFeedContract(this.sdk, data);
371185
- case "PRICE_FEED::ERC4626":
371186
- return new Erc4626PriceFeedContract(this.sdk, data);
371478
+ case "PRICE_FEED::CURVE_STABLE":
371479
+ return new CurveStablePriceFeedContract(this.sdk, data);
371187
371480
  case "PRICE_FEED::CURVE_USD":
371188
371481
  return new CurveUSDPriceFeedContract(this.sdk, data);
371189
- case "PRICE_FEED::ZERO":
371190
- return new ZeroPriceFeedContract(this.sdk, data);
371482
+ case "PRICE_FEED::ERC4626":
371483
+ return new Erc4626PriceFeedContract(this.sdk, data);
371484
+ case "PRICE_FEED::EXTERNAL":
371485
+ return new ExternalPriceFeedContract(this.sdk, data);
371191
371486
  case "PRICE_FEED::MELLOW_LRT":
371192
371487
  return new MellowLRTPriceFeedContract(this.sdk, data);
371193
371488
  case "PRICE_FEED::PENDLE_PT_TWAP":
371194
371489
  return new PendleTWAPPTPriceFeed(this.sdk, data);
371195
- default:
371196
- throw new Error(`Price feed type ${contractType} not supported, `);
371490
+ case "PRICE_FEED::PYTH":
371491
+ return new PythPriceFeed(this.sdk, data);
371492
+ case "PRICE_FEED::REDSTONE":
371493
+ return new RedstonePriceFeedContract(this.sdk, data);
371494
+ case "PRICE_FEED::WSTETH":
371495
+ return new WstETHPriceFeedContract(this.sdk, data);
371496
+ case "PRICE_FEED::YEARN":
371497
+ return new YearnPriceFeedContract(this.sdk, data);
371498
+ case "PRICE_FEED::ZERO":
371499
+ return new ZeroPriceFeedContract(this.sdk, data);
371500
+ default: {
371501
+ const err = new Error(
371502
+ `Price feed type ${contractType} not supported for price feed at ${data.baseParams.addr}`
371503
+ );
371504
+ if (this.sdk.strictContractTypes) {
371505
+ throw err;
371506
+ }
371507
+ this.logger?.error(err);
371508
+ return new ExternalPriceFeedContract(this.sdk, data);
371509
+ }
371197
371510
  }
371198
371511
  }
371199
371512
  };
@@ -371490,7 +371803,7 @@ var PriceOracleBaseContract = class extends BaseContract {
371490
371803
  };
371491
371804
 
371492
371805
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/oracle/PriceOracleV300Contract.js
371493
- var abi11 = [...iPriceOracleV300Abi, ...iPausableAbi];
371806
+ var abi12 = [...iPriceOracleV300Abi, ...iPausableAbi];
371494
371807
  var PriceOracleV300Contract = class extends PriceOracleBaseContract {
371495
371808
  constructor(sdk, data, underlying) {
371496
371809
  super(
@@ -371498,7 +371811,7 @@ var PriceOracleV300Contract = class extends PriceOracleBaseContract {
371498
371811
  {
371499
371812
  ...data.baseParams,
371500
371813
  name: "PriceOracleV3",
371501
- abi: abi11
371814
+ abi: abi12
371502
371815
  },
371503
371816
  data,
371504
371817
  underlying
@@ -371538,7 +371851,7 @@ var PriceOracleV300Contract = class extends PriceOracleBaseContract {
371538
371851
  };
371539
371852
 
371540
371853
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/oracle/PriceOracleV310Contract.js
371541
- var abi12 = iPriceOracleV310Abi;
371854
+ var abi13 = iPriceOracleV310Abi;
371542
371855
  var PriceOracleV310Contract = class extends PriceOracleBaseContract {
371543
371856
  constructor(sdk, data, underlying) {
371544
371857
  super(
@@ -371546,7 +371859,7 @@ var PriceOracleV310Contract = class extends PriceOracleBaseContract {
371546
371859
  {
371547
371860
  ...data.baseParams,
371548
371861
  name: "PriceOracleV3",
371549
- abi: abi12
371862
+ abi: abi13
371550
371863
  },
371551
371864
  data,
371552
371865
  underlying
@@ -371656,7 +371969,7 @@ var GaugeContract = class extends BaseContract {
371656
371969
  };
371657
371970
 
371658
371971
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pool/LinearInterestRateModelContract.js
371659
- var abi13 = iLinearInterestRateModelV300Abi;
371972
+ var abi14 = iLinearInterestRateModelV300Abi;
371660
371973
  var LinearInterestRateModelContract = class extends BaseContract {
371661
371974
  U1;
371662
371975
  U2;
@@ -371669,7 +371982,7 @@ var LinearInterestRateModelContract = class extends BaseContract {
371669
371982
  super(sdk, {
371670
371983
  ...params.baseParams,
371671
371984
  name: "LinearInterestRateModel",
371672
- abi: abi13
371985
+ abi: abi14
371673
371986
  });
371674
371987
  const [
371675
371988
  U1,
@@ -371714,7 +372027,7 @@ var LinearInterestRateModelContract = class extends BaseContract {
371714
372027
  };
371715
372028
 
371716
372029
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pool/PoolQuotaKeeperV300Contract.js
371717
- var abi14 = iPoolQuotaKeeperV300Abi;
372030
+ var abi15 = iPoolQuotaKeeperV300Abi;
371718
372031
  var PoolQuotaKeeperV300Contract = class extends BaseContract {
371719
372032
  decimals;
371720
372033
  quotas;
@@ -371722,7 +372035,7 @@ var PoolQuotaKeeperV300Contract = class extends BaseContract {
371722
372035
  super(sdk, {
371723
372036
  ...pqk.baseParams,
371724
372037
  name: `PoolQuotaKeeper(${pool.name})`,
371725
- abi: abi14
372038
+ abi: abi15
371726
372039
  });
371727
372040
  this.decimals = pool.decimals;
371728
372041
  this.quotas = new AddressMap(
@@ -371793,7 +372106,7 @@ function createInterestRateModel(sdk, data) {
371793
372106
  }
371794
372107
 
371795
372108
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pool/PoolV300Contract.js
371796
- var abi15 = [...iPoolV300Abi, ...iPausableAbi];
372109
+ var abi16 = [...iPoolV300Abi, ...iPausableAbi];
371797
372110
  var PoolV300Contract = class extends BaseContract {
371798
372111
  creditManagerDebtParams;
371799
372112
  constructor(sdk, data) {
@@ -371801,7 +372114,7 @@ var PoolV300Contract = class extends BaseContract {
371801
372114
  super(sdk, {
371802
372115
  ...data.baseParams,
371803
372116
  name: `PoolV3(${data.name})`,
371804
- abi: abi15
372117
+ abi: abi16
371805
372118
  });
371806
372119
  Object.assign(this, rest);
371807
372120
  this.creditManagerDebtParams = new AddressMap(
@@ -371899,7 +372212,7 @@ var PoolV300Contract = class extends BaseContract {
371899
372212
  };
371900
372213
 
371901
372214
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pool/PoolV310Contract.js
371902
- var abi16 = [...iPoolV310Abi, ...iPausableAbi];
372215
+ var abi17 = [...iPoolV310Abi, ...iPausableAbi];
371903
372216
  var PoolV310Contract = class extends BaseContract {
371904
372217
  creditManagerDebtParams;
371905
372218
  constructor(sdk, data) {
@@ -371907,7 +372220,7 @@ var PoolV310Contract = class extends BaseContract {
371907
372220
  super(sdk, {
371908
372221
  ...data.baseParams,
371909
372222
  name: `PoolV3(${data.name})`,
371910
- abi: abi16
372223
+ abi: abi17
371911
372224
  });
371912
372225
  Object.assign(this, rest);
371913
372226
  this.creditManagerDebtParams = new AddressMap(
@@ -372017,7 +372330,7 @@ function createPool(sdk, data) {
372017
372330
  }
372018
372331
 
372019
372332
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pool/PoolQuotaKeeperV310Contract.js
372020
- var abi17 = iPoolQuotaKeeperV310Abi;
372333
+ var abi18 = iPoolQuotaKeeperV310Abi;
372021
372334
  var PoolQuotaKeeperV310Contract = class extends BaseContract {
372022
372335
  decimals;
372023
372336
  quotas;
@@ -372025,7 +372338,7 @@ var PoolQuotaKeeperV310Contract = class extends BaseContract {
372025
372338
  super(sdk, {
372026
372339
  ...pqk.baseParams,
372027
372340
  name: `PoolQuotaKeeper(${pool.name})`,
372028
- abi: abi17
372341
+ abi: abi18
372029
372342
  });
372030
372343
  this.decimals = pool.decimals;
372031
372344
  this.quotas = new AddressMap(
@@ -372086,7 +372399,7 @@ function createPoolQuotaKeeper(sdk, pool, pqk) {
372086
372399
  }
372087
372400
 
372088
372401
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/market/pool/TumblerContract.js
372089
- var abi18 = iTumblerV310Abi;
372402
+ var abi19 = iTumblerV310Abi;
372090
372403
  var TumblerContract = class extends BaseContract {
372091
372404
  epochLength;
372092
372405
  rates;
@@ -372094,7 +372407,7 @@ var TumblerContract = class extends BaseContract {
372094
372407
  super(sdk, {
372095
372408
  ...tumbler.baseParams,
372096
372409
  name: `Tumbler(${pool.name})`,
372097
- abi: abi18
372410
+ abi: abi19
372098
372411
  });
372099
372412
  const [epochLength, tokens_, rates_] = decodeAbiParameters(
372100
372413
  [
@@ -373337,253 +373650,6 @@ function assetsMap(assets) {
373337
373650
  return new AddressMap(assets.map((a) => [a.token, a]));
373338
373651
  }
373339
373652
 
373340
- // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/sdk-legacy/types/IBaseRewardPool.js
373341
- var iBaseRewardPoolAbi = [
373342
- {
373343
- type: "function",
373344
- inputs: [{ name: "account", internalType: "address", type: "address" }],
373345
- name: "balanceOf",
373346
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373347
- stateMutability: "view"
373348
- },
373349
- {
373350
- type: "function",
373351
- inputs: [],
373352
- name: "currentRewards",
373353
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373354
- stateMutability: "view"
373355
- },
373356
- {
373357
- type: "function",
373358
- inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }],
373359
- name: "donate",
373360
- outputs: [{ name: "", internalType: "bool", type: "bool" }],
373361
- stateMutability: "nonpayable"
373362
- },
373363
- {
373364
- type: "function",
373365
- inputs: [],
373366
- name: "duration",
373367
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373368
- stateMutability: "view"
373369
- },
373370
- {
373371
- type: "function",
373372
- inputs: [{ name: "account", internalType: "address", type: "address" }],
373373
- name: "earned",
373374
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373375
- stateMutability: "view"
373376
- },
373377
- {
373378
- type: "function",
373379
- inputs: [{ name: "i", internalType: "uint256", type: "uint256" }],
373380
- name: "extraRewards",
373381
- outputs: [{ name: "", internalType: "address", type: "address" }],
373382
- stateMutability: "view"
373383
- },
373384
- {
373385
- type: "function",
373386
- inputs: [],
373387
- name: "extraRewardsLength",
373388
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373389
- stateMutability: "view"
373390
- },
373391
- {
373392
- type: "function",
373393
- inputs: [],
373394
- name: "getReward",
373395
- outputs: [{ name: "", internalType: "bool", type: "bool" }],
373396
- stateMutability: "nonpayable"
373397
- },
373398
- {
373399
- type: "function",
373400
- inputs: [
373401
- { name: "_account", internalType: "address", type: "address" },
373402
- { name: "_claimExtras", internalType: "bool", type: "bool" }
373403
- ],
373404
- name: "getReward",
373405
- outputs: [{ name: "", internalType: "bool", type: "bool" }],
373406
- stateMutability: "nonpayable"
373407
- },
373408
- {
373409
- type: "function",
373410
- inputs: [],
373411
- name: "historicalRewards",
373412
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373413
- stateMutability: "view"
373414
- },
373415
- {
373416
- type: "function",
373417
- inputs: [],
373418
- name: "lastTimeRewardApplicable",
373419
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373420
- stateMutability: "view"
373421
- },
373422
- {
373423
- type: "function",
373424
- inputs: [],
373425
- name: "lastUpdateTime",
373426
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373427
- stateMutability: "view"
373428
- },
373429
- {
373430
- type: "function",
373431
- inputs: [],
373432
- name: "newRewardRatio",
373433
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373434
- stateMutability: "view"
373435
- },
373436
- {
373437
- type: "function",
373438
- inputs: [],
373439
- name: "operator",
373440
- outputs: [{ name: "", internalType: "address", type: "address" }],
373441
- stateMutability: "view"
373442
- },
373443
- {
373444
- type: "function",
373445
- inputs: [],
373446
- name: "periodFinish",
373447
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373448
- stateMutability: "view"
373449
- },
373450
- {
373451
- type: "function",
373452
- inputs: [],
373453
- name: "pid",
373454
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373455
- stateMutability: "view"
373456
- },
373457
- {
373458
- type: "function",
373459
- inputs: [],
373460
- name: "queuedRewards",
373461
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373462
- stateMutability: "view"
373463
- },
373464
- {
373465
- type: "function",
373466
- inputs: [],
373467
- name: "rewardManager",
373468
- outputs: [{ name: "", internalType: "address", type: "address" }],
373469
- stateMutability: "view"
373470
- },
373471
- {
373472
- type: "function",
373473
- inputs: [],
373474
- name: "rewardPerToken",
373475
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373476
- stateMutability: "view"
373477
- },
373478
- {
373479
- type: "function",
373480
- inputs: [],
373481
- name: "rewardPerTokenStored",
373482
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373483
- stateMutability: "view"
373484
- },
373485
- {
373486
- type: "function",
373487
- inputs: [],
373488
- name: "rewardRate",
373489
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373490
- stateMutability: "view"
373491
- },
373492
- {
373493
- type: "function",
373494
- inputs: [],
373495
- name: "rewardToken",
373496
- outputs: [{ name: "", internalType: "contract IERC20", type: "address" }],
373497
- stateMutability: "view"
373498
- },
373499
- {
373500
- type: "function",
373501
- inputs: [{ name: "account", internalType: "address", type: "address" }],
373502
- name: "rewards",
373503
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373504
- stateMutability: "view"
373505
- },
373506
- {
373507
- type: "function",
373508
- inputs: [{ name: "_amount", internalType: "uint256", type: "uint256" }],
373509
- name: "stake",
373510
- outputs: [{ name: "", internalType: "bool", type: "bool" }],
373511
- stateMutability: "nonpayable"
373512
- },
373513
- {
373514
- type: "function",
373515
- inputs: [],
373516
- name: "stakeAll",
373517
- outputs: [{ name: "", internalType: "bool", type: "bool" }],
373518
- stateMutability: "nonpayable"
373519
- },
373520
- {
373521
- type: "function",
373522
- inputs: [
373523
- { name: "_for", internalType: "address", type: "address" },
373524
- { name: "_amount", internalType: "uint256", type: "uint256" }
373525
- ],
373526
- name: "stakeFor",
373527
- outputs: [{ name: "", internalType: "bool", type: "bool" }],
373528
- stateMutability: "nonpayable"
373529
- },
373530
- {
373531
- type: "function",
373532
- inputs: [],
373533
- name: "stakingToken",
373534
- outputs: [{ name: "", internalType: "contract IERC20", type: "address" }],
373535
- stateMutability: "view"
373536
- },
373537
- {
373538
- type: "function",
373539
- inputs: [],
373540
- name: "totalSupply",
373541
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373542
- stateMutability: "view"
373543
- },
373544
- {
373545
- type: "function",
373546
- inputs: [{ name: "account", internalType: "address", type: "address" }],
373547
- name: "userRewardPerTokenPaid",
373548
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
373549
- stateMutability: "view"
373550
- },
373551
- {
373552
- type: "function",
373553
- inputs: [
373554
- { name: "amount", internalType: "uint256", type: "uint256" },
373555
- { name: "claim", internalType: "bool", type: "bool" }
373556
- ],
373557
- name: "withdraw",
373558
- outputs: [{ name: "", internalType: "bool", type: "bool" }],
373559
- stateMutability: "nonpayable"
373560
- },
373561
- {
373562
- type: "function",
373563
- inputs: [{ name: "claim", internalType: "bool", type: "bool" }],
373564
- name: "withdrawAll",
373565
- outputs: [],
373566
- stateMutability: "nonpayable"
373567
- },
373568
- {
373569
- type: "function",
373570
- inputs: [{ name: "claim", internalType: "bool", type: "bool" }],
373571
- name: "withdrawAllAndUnwrap",
373572
- outputs: [],
373573
- stateMutability: "nonpayable"
373574
- },
373575
- {
373576
- type: "function",
373577
- inputs: [
373578
- { name: "amount", internalType: "uint256", type: "uint256" },
373579
- { name: "claim", internalType: "bool", type: "bool" }
373580
- ],
373581
- name: "withdrawAndUnwrap",
373582
- outputs: [{ name: "", internalType: "bool", type: "bool" }],
373583
- stateMutability: "nonpayable"
373584
- }
373585
- ];
373586
-
373587
373653
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/accounts/CreditAccountsService.js
373588
373654
  var CreditAccountsService = class extends SDKConstruct {
373589
373655
  #compressor;
@@ -373802,7 +373868,13 @@ var CreditAccountsService = class extends SDKConstruct {
373802
373868
  creditManager: cm.creditManager,
373803
373869
  slippage
373804
373870
  });
373871
+ const priceUpdates = await this.getPriceUpdatesForFacade(
373872
+ ca.creditManager,
373873
+ ca,
373874
+ void 0
373875
+ );
373805
373876
  const calls = [
373877
+ ...priceUpdates,
373806
373878
  ...routerCloseResult.calls,
373807
373879
  ...this.#prepareDisableQuotas(ca),
373808
373880
  ...this.#prepareDecreaseDebt(ca),
@@ -373835,7 +373907,13 @@ var CreditAccountsService = class extends SDKConstruct {
373835
373907
  }) {
373836
373908
  const cm = this.sdk.marketRegister.findCreditManager(ca.creditManager);
373837
373909
  const addCollateral = collateralAssets.filter((a) => a.balance > 0);
373910
+ const priceUpdates = await this.getPriceUpdatesForFacade(
373911
+ ca.creditManager,
373912
+ ca,
373913
+ void 0
373914
+ );
373838
373915
  const calls = [
373916
+ ...priceUpdates,
373839
373917
  ...this.#prepareAddCollateral(ca.creditFacade, addCollateral, permits),
373840
373918
  ...this.#prepareDisableQuotas(ca),
373841
373919
  ...this.#prepareDecreaseDebt(ca),
@@ -374188,7 +374266,10 @@ var CreditAccountsService = class extends SDKConstruct {
374188
374266
  return market.priceOracle.onDemandPriceUpdates(update);
374189
374267
  }
374190
374268
  /**
374191
- * Returns price updates in format that is accepted by various credit facade methods (multicall, close/liquidate, etc...)
374269
+ * Returns price updates in format that is accepted by various credit facade methods (multicall, close/liquidate, etc...).
374270
+ * If there are desiredQuotas and creditAccount update quotaBalance > 0 || (balance > 10n && isEnabled).
374271
+ * If there is creditAccount update balance > 10n && isEnabled.
374272
+ * If there is desiredQuotas update quotaBalance > 0.
374192
374273
  * @param acc
374193
374274
  * @returns
374194
374275
  */
@@ -374422,7 +374503,7 @@ var AbstractAddressProviderContract = class extends BaseContract {
374422
374503
  };
374423
374504
 
374424
374505
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/core/address-provider/AddressProviderV3_1Contract.js
374425
- var abi19 = iAddressProviderV310Abi;
374506
+ var abi20 = iAddressProviderV310Abi;
374426
374507
  var AddressProviderContractV3_1 = class extends AbstractAddressProviderContract {
374427
374508
  constructor(sdk, address, addresses = {}) {
374428
374509
  super(
@@ -374430,7 +374511,7 @@ var AddressProviderContractV3_1 = class extends AbstractAddressProviderContract
374430
374511
  {
374431
374512
  addr: address,
374432
374513
  name: "AddressProviderV3_1",
374433
- abi: abi19,
374514
+ abi: abi20,
374434
374515
  version: 310
374435
374516
  },
374436
374517
  addresses
@@ -374478,7 +374559,7 @@ var AddressProviderContractV3_1 = class extends AbstractAddressProviderContract
374478
374559
  };
374479
374560
 
374480
374561
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/core/address-provider/AddressProviderV3Contract.js
374481
- var abi20 = iAddressProviderV300Abi;
374562
+ var abi21 = iAddressProviderV300Abi;
374482
374563
  var AddressProviderContractV3 = class extends AbstractAddressProviderContract {
374483
374564
  constructor(sdk, address, addresses = {}) {
374484
374565
  super(
@@ -374486,7 +374567,7 @@ var AddressProviderContractV3 = class extends AbstractAddressProviderContract {
374486
374567
  {
374487
374568
  addr: address,
374488
374569
  name: "AddressProviderV3",
374489
- abi: abi20,
374570
+ abi: abi21,
374490
374571
  version: 300
374491
374572
  },
374492
374573
  addresses
@@ -374576,12 +374657,12 @@ async function getAddressProvider(sdk, address, options) {
374576
374657
  }
374577
374658
 
374578
374659
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/core/BotListV3Contract.js
374579
- var abi21 = iBotListV300Abi;
374660
+ var abi22 = iBotListV300Abi;
374580
374661
  var BotListContract = class extends BaseContract {
374581
374662
  #approvedCreditManagers;
374582
374663
  #currentBlock;
374583
374664
  constructor(sdk, address) {
374584
- super(sdk, { addr: address, name: "BotListV3", abi: abi21 });
374665
+ super(sdk, { addr: address, name: "BotListV3", abi: abi22 });
374585
374666
  this.#currentBlock = ADDRESS_PROVIDER_BLOCK[sdk.provider.networkType];
374586
374667
  }
374587
374668
  parseFunctionParams(params) {
@@ -374647,10 +374728,10 @@ var BotListContract = class extends BaseContract {
374647
374728
  };
374648
374729
 
374649
374730
  // ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/core/GearStakingV3Contract.js
374650
- var abi22 = iGearStakingV300Abi;
374731
+ var abi23 = iGearStakingV300Abi;
374651
374732
  var GearStakingContract = class extends BaseContract {
374652
374733
  constructor(sdk, address) {
374653
- super(sdk, { addr: address, name: "GearStakingV3", abi: abi22 });
374734
+ super(sdk, { addr: address, name: "GearStakingV3", abi: abi23 });
374654
374735
  }
374655
374736
  parseFunctionParams(params) {
374656
374737
  switch (params.functionName) {
@@ -374730,6 +374811,10 @@ var GearboxSDK = class _GearboxSDK {
374730
374811
  * All price feeds known to sdk, without oracle-related data (stalenessPeriod, main/reserve, etc.)
374731
374812
  */
374732
374813
  priceFeeds;
374814
+ /**
374815
+ * Will throw an error if contract type is not supported, otherwise will try to use generic contract first, if possible
374816
+ */
374817
+ strictContractTypes;
374733
374818
  /**
374734
374819
  * All contracts known to sdk
374735
374820
  */
@@ -374791,6 +374876,7 @@ var GearboxSDK = class _GearboxSDK {
374791
374876
  this.logger = options.logger;
374792
374877
  this.priceFeeds = new PriceFeedRegister(this);
374793
374878
  this.plugins = options.plugins ?? [];
374879
+ this.strictContractTypes = options.strictContractTypes ?? false;
374794
374880
  }
374795
374881
  async #attach(opts) {
374796
374882
  const {
@@ -392501,7 +392587,7 @@ function normalizeTransactions(batch) {
392501
392587
  });
392502
392588
  }
392503
392589
  function normalizeDirectTx(t) {
392504
- const abi23 = [
392590
+ const abi24 = [
392505
392591
  {
392506
392592
  type: "function",
392507
392593
  outputs: [],
@@ -392523,10 +392609,10 @@ function normalizeDirectTx(t) {
392523
392609
  return {
392524
392610
  target: t.to,
392525
392611
  value: t.value,
392526
- signature: formatAbiItem2(abi23[0], { includeName: false }),
392612
+ signature: formatAbiItem2(abi24[0], { includeName: false }),
392527
392613
  parameters,
392528
392614
  data: encodeFunctionData({
392529
- abi: abi23,
392615
+ abi: abi24,
392530
392616
  functionName: t.contractMethod.name,
392531
392617
  args: values
392532
392618
  })
@@ -400310,7 +400396,7 @@ var AccountOpener = class extends SDKConstruct {
400310
400396
  );
400311
400397
  const depositor = await this.#createAccount();
400312
400398
  this.#logger?.debug(`created depositor ${depositor.address}`);
400313
- await this.#claimFromFaucet(depositor, totalUSD);
400399
+ await this.#claimFromFaucet(depositor, "depositor", totalUSD);
400314
400400
  for (const [pool, amount] of deposits) {
400315
400401
  try {
400316
400402
  await this.#depositToPool(pool, depositor, amount);
@@ -400389,16 +400475,20 @@ var AccountOpener = class extends SDKConstruct {
400389
400475
  }
400390
400476
  }
400391
400477
  claimUSD = claimUSD * 11n / 10n;
400392
- await this.#claimFromFaucet(borrower, claimUSD);
400478
+ await this.#claimFromFaucet(borrower, "borrower", claimUSD);
400393
400479
  for (const [degenNFT, amount] of Object.entries(degenNFTS)) {
400394
400480
  await this.#mintDegenNft(degenNFT, borrower.address, amount);
400395
400481
  }
400396
400482
  this.#logger?.debug("prepared borrower");
400397
400483
  return borrower;
400398
400484
  }
400399
- async #claimFromFaucet(claimer, amountUSD) {
400485
+ async #claimFromFaucet(claimer, role, amountUSD) {
400400
400486
  const [usr, amnt] = [claimer.address, formatBN(amountUSD, 8)];
400401
- this.#logger?.debug(`account ${usr} claiming ${amnt} USD from faucet`);
400487
+ this.#logger?.debug(`${role} ${usr} claiming ${amnt} USD from faucet`);
400488
+ if (amountUSD === 0n) {
400489
+ this.#logger?.debug("amount is 0, skipping claim");
400490
+ return;
400491
+ }
400402
400492
  const hash2 = await this.#anvil.writeContract({
400403
400493
  account: claimer,
400404
400494
  address: this.#faucet,
@@ -400422,11 +400512,11 @@ var AccountOpener = class extends SDKConstruct {
400422
400512
  });
400423
400513
  if (receipt.status === "reverted") {
400424
400514
  throw new Error(
400425
- `account ${usr} failed to claimed equivalent of ${amnt} USD from faucet, tx: ${hash2}`
400515
+ `${role} ${usr} failed to claimed equivalent of ${amnt} USD from faucet, tx: ${hash2}`
400426
400516
  );
400427
400517
  }
400428
400518
  this.#logger?.debug(
400429
- `account ${usr} claimed equivalent of ${amnt} USD from faucet, tx: ${hash2}`
400519
+ `${role} ${usr} claimed equivalent of ${amnt} USD from faucet, tx: ${hash2}`
400430
400520
  );
400431
400521
  }
400432
400522
  async #approve(token, cm) {
@@ -400598,7 +400688,8 @@ var SDKExample = class {
400598
400688
  addressProvider,
400599
400689
  logger: this.#logger,
400600
400690
  ignoreUpdateablePrices: false,
400601
- marketConfigurators
400691
+ marketConfigurators,
400692
+ strictContractTypes: true
400602
400693
  });
400603
400694
  this.#logger?.info("attached sdk");
400604
400695
  try {
@@ -400681,15 +400772,27 @@ var SDKExample = class {
400681
400772
  await anvil.impersonateAccount({ address: owner });
400682
400773
  await anvil.setBalance({
400683
400774
  address: owner,
400684
- value: parseEther("100")
400775
+ value: parseEther("1000")
400776
+ });
400777
+ const balance = await anvil.getBalance({ address: owner });
400778
+ this.#logger?.debug(`owner balance: ${formatEther(balance)} ETH`);
400779
+ const { request } = await anvil.simulateContract({
400780
+ chain: anvil.chain,
400781
+ account: owner,
400782
+ address: addressProvider,
400783
+ abi: iAddressProviderV310Abi,
400784
+ functionName: "setAddress",
400785
+ args: [stringToHex("FAUCET", { size: 32 }), faucetAddr, false]
400685
400786
  });
400787
+ this.#logger?.debug("estimated setAddress call");
400686
400788
  const hash2 = await anvil.writeContract({
400687
400789
  chain: anvil.chain,
400688
400790
  account: owner,
400689
400791
  address: addressProvider,
400690
400792
  abi: iAddressProviderV310Abi,
400691
400793
  functionName: "setAddress",
400692
- args: [stringToHex("FAUCET", { size: 32 }), faucetAddr, true]
400794
+ args: [stringToHex("FAUCET", { size: 32 }), faucetAddr, false],
400795
+ gas: request.gas ? request.gas * 11n / 10n : void 0
400693
400796
  });
400694
400797
  const receipt = await anvil.waitForTransactionReceipt({ hash: hash2 });
400695
400798
  await anvil.stopImpersonatingAccount({ address: owner });
@@ -403332,9 +403435,9 @@ var AbstractParser = class {
403332
403435
  };
403333
403436
  }
403334
403437
  parseConstructor(address, encodedArgs) {
403335
- for (const { abi: abi23, comment } of this.constructorAbis) {
403438
+ for (const { abi: abi24, comment } of this.constructorAbis) {
403336
403439
  try {
403337
- return this.#parseConstructor(address, encodedArgs, abi23, comment);
403440
+ return this.#parseConstructor(address, encodedArgs, abi24, comment);
403338
403441
  } catch (e) {
403339
403442
  this.logger.warn(`constructor ${comment} of ${address} failed to parse args: ${e}`);
403340
403443
  }
@@ -407492,7 +407595,7 @@ function getRenderer(opts) {
407492
407595
  var package_default = {
407493
407596
  name: "@gearbox-protocol/deploy-tools",
407494
407597
  description: "Gearbox deploy tools",
407495
- version: "5.16.10",
407598
+ version: "5.16.12",
407496
407599
  homepage: "https://gearbox.fi",
407497
407600
  keywords: [
407498
407601
  "gearbox"
@@ -407535,7 +407638,7 @@ var package_default = {
407535
407638
  "@gearbox-protocol/deploy-tools-node": "0.0.0",
407536
407639
  "@gearbox-protocol/deploy-tools-shared": "0.0.0",
407537
407640
  "@gearbox-protocol/deploy-tools-types": "0.0.0",
407538
- "@gearbox-protocol/sdk": "3.0.0-vfour.269",
407641
+ "@gearbox-protocol/sdk": "3.0.0-vfour.277",
407539
407642
  "@gearbox-protocol/sdk-gov": "^2.36.5",
407540
407643
  "@types/lodash-es": "^4.17.12",
407541
407644
  "@types/node": "^22.13.5",