certora-cli-alpha-master 20250913.0.7.15157__py3-none-any.whl → 20250914.16.54.139374__py3-none-any.whl

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.
@@ -15,6 +15,7 @@
15
15
 
16
16
  from __future__ import annotations
17
17
 
18
+ import subprocess
18
19
  import sys
19
20
  from pathlib import Path
20
21
 
@@ -37,13 +38,13 @@ log = logging.getLogger(__name__)
37
38
 
38
39
  def build_sui_project(context: CertoraContext, timings: Dict) -> None:
39
40
  """
40
- Compile the Rust artefact and record elapsed time in *timings*.
41
+ Compile the Sui artefact and record elapsed time in *timings*.
41
42
 
42
43
  Args:
43
44
  context: The CertoraContext object containing the configuration.
44
45
  timings: A dictionary to store timing information.
45
46
  """
46
- log.debug("Build Rust target")
47
+ log.debug("Build Sui target")
47
48
  start = time.perf_counter()
48
49
  set_sui_build_directory(context)
49
50
  timings["buildTime"] = round(time.perf_counter() - start, 4)
@@ -52,17 +53,60 @@ def build_sui_project(context: CertoraContext, timings: Dict) -> None:
52
53
 
53
54
 
54
55
  def set_sui_build_directory(context: CertoraContext) -> None:
55
- assert context.move_path, "build_sui_project: expecting move_path to link to a build directory"
56
+ sources: Set[Path] = set()
56
57
 
57
- shutil.copytree(context.move_path, Util.get_build_dir() / Path(context.move_path).name)
58
+ # If no move_path was specified, try to build the package
59
+ if not context.move_path:
60
+ move_toml_file = Util.find_file_in_parents("Move.toml")
61
+ if not move_toml_file:
62
+ raise Util.CertoraUserInputError("Could not find Move.toml, and no move_path was specified.")
63
+ sources.add(move_toml_file.absolute())
64
+ run_sui_build(context, move_toml_file.parent)
58
65
 
59
- sources: Set[Path] = set()
66
+ assert context.move_path, "expecting move_path to be set after build"
67
+ move_dir = Path(context.move_path)
68
+ assert move_dir.exists(), f"Output path '{move_dir}' does not exist"
69
+ assert move_dir.is_dir(), f"Output path '{move_dir}' is not a directory"
70
+
71
+ # Add all source files. We get these from the Sui build output, because it includes dependencies as well, and is
72
+ # available even if we didn't run the build ourselves.
73
+ sources.update(move_dir.rglob("*.move"))
74
+
75
+ # Add conf file if it exists
60
76
  if getattr(context, 'conf_file', None) and Path(context.conf_file).exists():
61
77
  sources.add(Path(context.conf_file).absolute())
62
78
 
79
+ # Copy the binary modules and source maps
80
+ shutil.copytree(move_dir,
81
+ Util.get_build_dir() / move_dir.name,
82
+ ignore=shutil.ignore_patterns('*.move'))
83
+
63
84
  try:
64
85
  # Create generators
65
86
  build_source_tree(sources, context)
66
87
 
67
88
  except Exception as e:
68
89
  raise Util.CertoraUserInputError(f"Collecting build files failed with the exception: {e}")
90
+
91
+ def run_sui_build(context: CertoraContext, package_dir: Path) -> None:
92
+ assert not context.move_path, "run_sui_build: expecting move_path to be empty"
93
+
94
+ build_cmd = ["sui", "move", "build", "--test", "--path", str(package_dir)]
95
+
96
+ try:
97
+ build_cmd_text = ' '.join(build_cmd)
98
+ log.info(f"Building by calling `{build_cmd_text}`")
99
+ result = subprocess.run(build_cmd, capture_output=False)
100
+
101
+ # Check if the script executed successfully
102
+ if result.returncode != 0:
103
+ raise Util.CertoraUserInputError(f"Error running `{build_cmd_text}`")
104
+
105
+ context.move_path = str(package_dir / "build")
106
+
107
+ except Util.TestResultsReady as e:
108
+ raise e
109
+ except Util.CertoraUserInputError as e:
110
+ raise e
111
+ except Exception as e:
112
+ raise Util.CertoraUserInputError(f"An unexpected error occurred: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: certora-cli-alpha-master
3
- Version: 20250913.0.7.15157
3
+ Version: 20250914.16.54.139374
4
4
  Summary: Runner for the Certora Prover
5
5
  Home-page: https://pypi.org/project/certora-cli-alpha-master
6
6
  Author: Certora
@@ -39,4 +39,4 @@ Dynamic: requires-dist
39
39
  Dynamic: requires-python
40
40
  Dynamic: summary
41
41
 
42
- Commit e448c2c. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
42
+ Commit b6ca649. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -16,7 +16,7 @@ certora_cli/CertoraProver/certoraBuild.py,sha256=Yn-J7QKxQvtp1uvs03mOfj2w7N_9Xix
16
16
  certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=YnZmBZ_gCIbLwExgK5oxFlVDQGe4_YuGIpDLMy589E0,13318
17
17
  certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=hO0w3YK9V9gZsTbh4gxxlnEAaOiubUwfzNEw6uL1HaE,14841
18
18
  certora_cli/CertoraProver/certoraBuildRust.py,sha256=ZPbNp4ttRmzcKhFsgHSiHDRExNPaLOzgxTRqu23o1D0,6061
19
- certora_cli/CertoraProver/certoraBuildSui.py,sha256=oOY6l3JnxYtFl3i3ibEcOp69x0mKsFg4Z86UnVC6CwY,2383
19
+ certora_cli/CertoraProver/certoraBuildSui.py,sha256=zMXD2XnC4oqRDzPcBvSZmVquL3UG5paBZkfUT3JPbYY,4180
20
20
  certora_cli/CertoraProver/certoraCloudIO.py,sha256=99IRWSA4wAF1q_yu7m1IpDlybMVqtupW_C5qa3Xrhs0,54351
21
21
  certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=Rln6LsqMp-u0H2fAFulTLAn7GW-j3ox2XZSz0ghdjk0,14116
22
22
  certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=i31dkYt8kwlX44SHZtV_b8QI1Egi6cbB5-uuh5beYN0,12630
@@ -67,13 +67,13 @@ certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HC
67
67
  certora_cli/Shared/certoraUtils.py,sha256=buUE95PnbpDEbYEZss_jcP7pWCRJhXnfV-eOA6-zvYM,58407
68
68
  certora_cli/Shared/certoraValidateFuncs.py,sha256=BPLuVsS3yAcYIuCvkXtDuFQKf2qaT74TIddB0lM84yM,42508
69
69
  certora_cli/Shared/proverCommon.py,sha256=uZkl9PDLPj81kKRnBnlPUmvhMZovNP25_74No_7jaQ4,11215
70
- certora_jars/ASTExtraction.jar,sha256=YX7Rv-nVvdg8oMZ9flNjsgJ8YVMgUcVNp2O6W33JoZA,17623191
71
- certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=BSBSGmQmbU_1cfa3tj7lqUymeQWZOQVwFOct4lSrLDo,166
72
- certora_jars/Typechecker.jar,sha256=Wbg32wRM94ui0c1pTXRqK7Mb1xPyOflCxHOmltwKRuU,17585348
70
+ certora_jars/ASTExtraction.jar,sha256=2uAu_Ro_5nR-lV8aTpAuI4OJxMYwzmr1iE6vlvTmM3o,17623191
71
+ certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=pBH1aVsSx61BhhCRxVk642ByMacGWg0wGZxbddp_m_Y,170
72
+ certora_jars/Typechecker.jar,sha256=ql7Irf3frh0Tl2zGYtPD8vcvCYpuXbipCljUG13nrbE,17585348
73
73
  certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- certora_cli_alpha_master-20250913.0.7.15157.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
75
- certora_cli_alpha_master-20250913.0.7.15157.dist-info/METADATA,sha256=r3N0N3QdUSKlhvJbuOghN2aZjUyhVOcwY3pwTPCAcyU,1301
76
- certora_cli_alpha_master-20250913.0.7.15157.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
77
- certora_cli_alpha_master-20250913.0.7.15157.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
78
- certora_cli_alpha_master-20250913.0.7.15157.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
79
- certora_cli_alpha_master-20250913.0.7.15157.dist-info/RECORD,,
74
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
75
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/METADATA,sha256=jT5lPyqBaYqzLoRkS2mOmRJMJVMxJJmTOaPfFwYGhe8,1304
76
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
77
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
78
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
79
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/RECORD,,
Binary file
@@ -1 +1 @@
1
- {"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "e448c2c", "timestamp": "20250913.0.7.015157", "version": "20250913.0.7.015157+e448c2c"}
1
+ {"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "b6ca649", "timestamp": "20250914.16.54.139374", "version": "20250914.16.54.139374+b6ca649"}
Binary file