Skip to content

Commit 3a03df2

Browse files
Devnet integration docs (#3762)
<!-- Reference any GitHub issues resolved by this PR --> Closes #3603 **Stack**: - #3762 ⬅ - #3761 - #3760 ## Checklist <!-- Make sure all of these are complete --> - [x] Linked relevant issue - [x] Updated relevant documentation - [ ] Added relevant tests - [x] Performed self-review of the code - [x] Added changes to `CHANGELOG.md` --------- Co-authored-by: Artur Michalek <[email protected]> Co-authored-by: Artur Michałek <[email protected]>
1 parent d53b6b3 commit 3a03df2

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919

2020
- Debug logging for `sncast` commands that can be enabled by setting `CAST_LOG` env variable.
2121
- `sncast declare` command now outputs a ready-to-use deployment command after successful declaration.
22+
- Possibility to use [`starknet-devnet`](https://github.com/0xSpaceShard/starknet-devnet) predeployed accounts directly in `sncast` without needing to import them. They are available under specific names - `devnet-1`, `devnet-2`, ..., `devnet-<N>`. Read more [here](https://foundry-rs.github.io/starknet-foundry/starknet/integration_with_devnet.html#predeployed-accounts)
2223

2324
## [0.50.0] - 2025-09-29
2425

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
* [Verifying Contracts](starknet/verify.md)
6060
* [Calldata Transformation](starknet/calldata-transformation.md)
6161
* [Block Explorers](starknet/block_explorer.md)
62+
* [Integration With Devnet](starknet/integration_with_devnet.md)
6263
* [Developer Functionalites](starknet/developer.md)
6364

6465
---
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Integration With Devnet
2+
3+
[`starknet-devnet`](https://0xspaceshard.github.io/starknet-devnet/) is a local Starknet node used for development and testing. `sncast` provides inbuilt support for some of its features, making it easier to work with it.
4+
5+
## Predeployed Accounts
6+
7+
When you start `starknet-devnet`, it automatically predeploys some contracts, including set of accounts with known details (read more about them [here](https://0xspaceshard.github.io/starknet-devnet/docs/predeployed)).
8+
9+
You can use these accounts directly in `sncast` without needing to import them.
10+
They are available under specific names - `devnet-1`, `devnet-2`, ..., `devnet-<N>` (where N is the number of predeployed accounts, by default it's 10).
11+
12+
> 📝 **Note**
13+
>
14+
> Devnet accounts can't be used together with `sepolia` and `mainnet` values for `--network` flag.
15+
16+
17+
### Example
18+
19+
Let's invoke a contract using `devnet-1` account.
20+
21+
```shell
22+
$ sncast --account devnet-1 invoke \
23+
--contract-address 0x0589a8b8bf819b7820cb699ea1f6c409bc012c9b9160106ddc3dacd6a89653cf \
24+
--function "get_balance"
25+
```
26+
27+
<details>
28+
<summary>Output:</summary>
29+
30+
```shell
31+
Success: Invoke completed
32+
33+
Transaction Hash: [..]
34+
35+
To see invocation details, visit:
36+
transaction: https://sepolia.starkscan.co/tx/[..]
37+
```
38+
</details>
39+
40+
> 📝 **Note**
41+
>
42+
> If you have an account named `devnet-1` (or any other predeployed account name) in your accounts file, `sncast` will prioritize using that one instead of the inbuilt devnet account.

0 commit comments

Comments
 (0)