From e7b10afb86cde253762b59992457f487c944ee8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C5=9Bkowicz?= Date: Fri, 26 Jan 2024 12:15:07 +0100 Subject: [PATCH] Update `Starknet Artifacts` docs, fix invalid links (#1087) --- website/docs/extensions/starknet/contract-target.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/docs/extensions/starknet/contract-target.md b/website/docs/extensions/starknet/contract-target.md index cd4a3b1f2..acfac9d33 100644 --- a/website/docs/extensions/starknet/contract-target.md +++ b/website/docs/extensions/starknet/contract-target.md @@ -4,7 +4,7 @@ import { data as rel } from "../../../github.data"; # Starknet Contract Target -The `starknet-contract` target allows to build the package as a [Starknet Contract](https://docs.starknet.io/documentation/getting_started/intro/). +The `starknet-contract` target allows to build the package as a [Starknet Contract](https://book.cairo-lang.org/ch99-00-starknet-smart-contracts.html). It searches for all contract classes in the package, and builds a separate compiled JSON file each found class. Generated file will be named with following pattern: `[target name]_[contract name].contract_class.json`. @@ -52,7 +52,7 @@ starknet = "{{ rel.stable.starknetPackageVersionReq }}" ## Sierra contract class generation The enabled by default property `sierra` determines whether this target builds a Sierra -[Contract Class](https://docs.starknet.io/documentation/architecture_and_concepts/Contracts/contract-classes/) file. +[Contract Class](https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/contract-classes/) file. ## CASM contract class generation @@ -136,6 +136,7 @@ Version 1 of this file has a structure like this: "id": "", "package_name": "mypackage", "contract_name": "Contract2", + "module_path": "mypackage::path::to::module::Contract2", "artifacts": { "sierra": "mypackage_Contract2.contract_class.json", "casm": null @@ -145,6 +146,7 @@ Version 1 of this file has a structure like this: "id": "", "package_name": "mypackage", "contract_name": "Contract1", + "module_path": "mypackage::Contract1", "artifacts": { "sierra": "mypackage_Contract1.contract_class.json", "casm": null @@ -157,6 +159,7 @@ Version 1 of this file has a structure like this: - `id` is an identifier of the item in `"contracts"` list. Use it to reference items, as it has the highest chance of being a unique value. - `package_name` is the name of the package in which the contract has been implemented. - `contract_name` is the name of the contract module. +- `module_path` is the module path of compiled contract. - `artifacts` paths are relative to this file path. Depending on the targets defined in `[[target.starknet-contract]]` section of the `Scarb.toml`, some of the values might be `null`.