@layerzerolabs/verify-contract 1.1.10 → 1.1.11

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.
package/dist/index.mjs CHANGED
@@ -44501,8 +44501,9 @@ var getDefaultScanApiUrl = (networkName) => DEFAULT_SCAN_API_URLS.get(networkNam
44501
44501
  var tryGetScanBrowserUrlFromScanUrl = (scanApiUrl) => {
44502
44502
  try {
44503
44503
  const urlObject = new URL(scanApiUrl);
44504
- if (!urlObject.hostname.startsWith("api.") && !urlObject.hostname.startsWith("api-"))
44504
+ if (!urlObject.hostname.startsWith("api.") && !urlObject.hostname.startsWith("api-")) {
44505
44505
  return void 0;
44506
+ }
44506
44507
  urlObject.hostname = urlObject.hostname.replace(/^api[.-]/, "");
44507
44508
  urlObject.pathname = "/";
44508
44509
  return urlObject.toString();
@@ -44591,8 +44592,9 @@ var createRecordLogger = (logger11, separator = " ") => (record) => {
44591
44592
  });
44592
44593
  };
44593
44594
  var formatLoggableValue = (value) => {
44594
- if (value == null)
44595
+ if (value == null) {
44595
44596
  return "-";
44597
+ }
44596
44598
  switch (typeof value) {
44597
44599
  case "boolean":
44598
44600
  return value ? TRUE_SYMBOL : FALSE_SYMBOL;
@@ -44607,8 +44609,9 @@ var FALSE_SYMBOL = COLORS.error`⚠`;
44607
44609
  var import_chalk2 = __toESM(require_source());
44608
44610
  var parseNetworksConfig = (logger11, partialNetworksConfig) => {
44609
44611
  return Object.entries(partialNetworksConfig != null ? partialNetworksConfig : {}).reduce((networksConfig, [networkName, networkConfig]) => {
44610
- if (networkConfig == null)
44612
+ if (networkConfig == null) {
44611
44613
  return networksConfig;
44614
+ }
44612
44615
  const apiUrl = networkConfig.apiUrl || getScanApiUrlFromEnv(networkName) || getDefaultScanApiUrl(networkName);
44613
44616
  assert4(
44614
44617
  apiUrl,
@@ -44685,8 +44688,9 @@ var LicenseType = /* @__PURE__ */ ((LicenseType2) => {
44685
44688
  var findLicenseType = (sourceCode) => {
44686
44689
  const matches = sourceCode.match(/\/\/\s*SPDX-License-Identifier:\s*(.*)\s*/i);
44687
44690
  const licenseName = matches == null ? void 0 : matches[1];
44688
- if (licenseName == null)
44691
+ if (licenseName == null) {
44689
44692
  return 1 /* None */;
44693
+ }
44690
44694
  if (!(licenseName in LicenseType)) {
44691
44695
  console.warn("Found unknown SPDX license identifier: %s", licenseName);
44692
44696
  }
@@ -53681,14 +53685,16 @@ ${JSON.stringify(response)}`);
53681
53685
  this.logger.verbose(`Received raw polling response from ${this.props.apiUrl}:
53682
53686
 
53683
53687
  ${JSON.stringify(result)}`);
53684
- if (result.status === 1)
53688
+ if (result.status === 1) {
53685
53689
  return {
53686
53690
  alreadyVerified: false
53687
53691
  };
53688
- if (isAlreadyVerifiedResult(result.result))
53692
+ }
53693
+ if (isAlreadyVerifiedResult(result.result)) {
53689
53694
  return {
53690
53695
  alreadyVerified: true
53691
53696
  };
53697
+ }
53692
53698
  if (isPendingResult(result.result)) {
53693
53699
  await sleep(1e4);
53694
53700
  continue;
@@ -53754,16 +53760,21 @@ var createVerificationRequest = ({
53754
53760
  optimizationUsed: optimizerRuns > 0 ? "1" : "0",
53755
53761
  sourceCode
53756
53762
  };
53757
- if (apiKey != null)
53763
+ if (apiKey != null) {
53758
53764
  request.apikey = apiKey;
53759
- if (optimizerRuns != null)
53765
+ }
53766
+ if (optimizerRuns != null) {
53760
53767
  request.runs = String(optimizerRuns);
53761
- if (constructorArguments != null)
53768
+ }
53769
+ if (constructorArguments != null) {
53762
53770
  request.constructorArguements = constructorArguments;
53763
- if (evmVersion != null)
53771
+ }
53772
+ if (evmVersion != null) {
53764
53773
  request.evmversion = evmVersion;
53765
- if (licenseType != null)
53774
+ }
53775
+ if (licenseType != null) {
53766
53776
  request.licenseType = String(licenseType);
53777
+ }
53767
53778
  return request;
53768
53779
  };
53769
53780
  var ScanResponseSchema = z.object({
@@ -56936,8 +56947,9 @@ var Interface = class {
56936
56947
  // src/common/abi.ts
56937
56948
  var parser = __toESM(require_index_cjs());
56938
56949
  var encodeContructorArguments = (abi, args) => {
56939
- if (args == null || args.length === 0)
56950
+ if (args == null || args.length === 0) {
56940
56951
  return void 0;
56952
+ }
56941
56953
  const iface = new Interface(abi);
56942
56954
  const encodedConstructorArguments = iface.encodeDeploy(args);
56943
56955
  return encodedConstructorArguments.slice(2);
@@ -56948,8 +56960,9 @@ var getContructorABIFromSource = (source) => {
56948
56960
  let constructorDefinition;
56949
56961
  parser.visit(ast, {
56950
56962
  FunctionDefinition: (node) => {
56951
- if (node.isConstructor)
56963
+ if (node.isConstructor) {
56952
56964
  constructorDefinition = node;
56965
+ }
56953
56966
  }
56954
56967
  });
56955
56968
  assert4(constructorDefinition != null, `Could not find constructor definition`);
@@ -56986,8 +56999,9 @@ var parsePathsConfig = (partialPathsConfig) => {
56986
56999
  };
56987
57000
  };
56988
57001
  var parseFilterConfig = (filterConfig) => {
56989
- if (filterConfig == null)
57002
+ if (filterConfig == null) {
56990
57003
  return () => true;
57004
+ }
56991
57005
  switch (typeof filterConfig) {
56992
57006
  case "boolean":
56993
57007
  return () => filterConfig;