diff --git a/package/version b/package/version index 001d752..5a48b6b 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.1.23 +0.1.24 diff --git a/pyproject.toml b/pyproject.toml index 524a7a7..da1c09d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "skribe" -version = "0.1.23" +version = "0.1.24" description = "Property testing for Stylus smart contracts" readme = "README.md" requires-python = "~=3.10" diff --git a/src/skribe/contract.py b/src/skribe/contract.py index 721855f..8a0699d 100644 --- a/src/skribe/contract.py +++ b/src/skribe/contract.py @@ -83,7 +83,7 @@ def methods(self) -> tuple[Method, ...]: id=0, abi=method_abi, ast=None, - contract_name_with_path='', + contract_name_with_path=self.name_with_path, contract_digest='', contract_storage_digest='', sort=KSort(f'{EVMContract.escaped(self.name_with_path, "S2K")}Method'), diff --git a/src/skribe/skribe.py b/src/skribe/skribe.py index f09079e..5f021eb 100644 --- a/src/skribe/skribe.py +++ b/src/skribe/skribe.py @@ -91,14 +91,7 @@ def build_contract(self) -> None: foundry.build(True) else: run_process( - [ - str(self._cargo_bin), - 'build', - '--lib', - '--release', - '--target', - 'wasm32-unknown-unknown', - ], + [str(self._cargo_bin), 'stylus', 'build'], cwd=self.contract_dir, check=True, ) @@ -196,6 +189,7 @@ def calldata_to_kore(data: bytes) -> Pattern: template_config_kore = kast_to_kore(self.definition.kdefinition, template_config, GENERATED_TOP_CELL) template_subst = {CALLDATA_EVAR: argument_strategy(binding).map(calldata_to_kore)} + task.start() fuzz( self.definition.path, template_config_kore, @@ -205,6 +199,7 @@ def calldata_to_kore(data: bytes) -> Pattern: handler=KometFuzzHandler(self.definition, task), subst_func=subst_on_k_cell, ) + task.end() def select_tests(self, contract: ArbitrumContract, id: str | None) -> list[Method]: test_methods = [] @@ -260,9 +255,7 @@ def deploy_and_run_contract( with FuzzProgress(tests, max_examples) as progress: for task in progress.fuzz_tasks: try: - task.start() self.run_test(template_conf, init_subst, task.binding, max_examples, task) - task.end() except FuzzError as e: task.fail() errors.append(e) diff --git a/src/tests/integration/data/contracts/call-hello/Stylus.toml b/src/tests/integration/data/contracts/call-hello/Stylus.toml new file mode 100644 index 0000000..c37540d --- /dev/null +++ b/src/tests/integration/data/contracts/call-hello/Stylus.toml @@ -0,0 +1,5 @@ +[workspace] + +[workspace.networks] + +[contract] diff --git a/src/tests/integration/data/contracts/call_hello_foundry/Stylus.toml b/src/tests/integration/data/contracts/call_hello_foundry/Stylus.toml new file mode 100644 index 0000000..c37540d --- /dev/null +++ b/src/tests/integration/data/contracts/call_hello_foundry/Stylus.toml @@ -0,0 +1,5 @@ +[workspace] + +[workspace.networks] + +[contract] diff --git a/uv.lock b/uv.lock index bd21405..cadd791 100644 --- a/uv.lock +++ b/uv.lock @@ -1815,7 +1815,7 @@ wheels = [ [[package]] name = "skribe" -version = "0.1.23" +version = "0.1.24" source = { editable = "." } dependencies = [ { name = "kontrol" },