Skip to content

Commit 5b5d5ba

Browse files
authored
more docs for sncast declare-from with --sierra-file (#4351)
<!-- Reference any GitHub issues resolved by this PR --> Follow-up #4155 ## Introduced changes <!-- A brief description of the changes --> - ## Checklist <!-- Make sure all of these are complete --> - [ ] Linked relevant issue - [x] Updated relevant documentation - [ ] Added relevant tests - [ ] Performed self-review of the code - [ ] Added changes to `CHANGELOG.md`
1 parent 116efe5 commit 5b5d5ba

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/src/starknet/declare.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ sncast --account my_account deploy --class-hash 0x[..] --network sepolia
6060
> `--max-fee` and the individual resource flags are mutually exclusive.
6161
> Any individual resource flag that is not provided will be estimated automatically
6262
63+
# Declaring an Already Compiled Contract
64+
65+
When you already have a compiled contract (Sierra file) and want to declare it directly, use [`declare-from`](../appendix/sncast/declare_from.md) with [`--sierra-file`](../appendix/sncast/declare_from.md#--sierra-file-sierra_file) option.
66+
67+
## Example
68+
69+
<!-- TODO(#2736) -->
70+
<!-- { "ignored": true } -->
71+
```shell
72+
$ sncast --account my_account \
73+
declare-from \
74+
--sierra-file target/dev/hello_Hello.contract_class.json \
75+
--network sepolia
76+
```
77+
6378
# Declaring a Contract by Fetching It From a Different Starknet Instance
6479

6580
In some cases, you may need to declare a contract that was already compiled elsewhere and reuse the exact same class hash across multiple networks.

0 commit comments

Comments
 (0)