Skip to content

Commit 226ba7c

Browse files
committed
add declare as optional
1 parent c708bab commit 226ba7c

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

docs/quick-start/environment.mdx

+28-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,33 @@ yarn chain
1919

2020
This command starts a local Starknet network using Devnet. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `scaffold.config.ts`.
2121

22-
### 2. Deploy your smart contract:
22+
### 2. Declare your smart contract (optional):
23+
24+
Following an example at `deploy.ts`:
25+
26+
```typescript
27+
const declareScript = async (): Promise<void> => {
28+
const response = await declareContract({
29+
contract: "YourContractName",
30+
options: {}, // You can add options like maxFee, nonce if needed
31+
});
32+
};
33+
```
34+
35+
After setup function at `deploy.ts` run the command :
36+
37+
```
38+
yarn deploy --network {NETWORK_NAME}
39+
```
40+
41+
Pay attention to the output in the terminal. The ClassHash will be displayed during the deploy contract process.
42+
43+
```
44+
Declaring Contract YourContractName
45+
Contract Declared at 0x00...
46+
```
47+
48+
### 3. Deploy your smart contract:
2349

2450
In the second terminal, deploy the test contract:
2551

@@ -43,7 +69,7 @@ yarn deploy:no-reset
4369

4470
:::
4571

46-
### 3. Launch your NextJS Application
72+
### 4. Launch your NextJS Application
4773

4874
On a third terminal, start your NextJS app:
4975

0 commit comments

Comments
 (0)