Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add declare as optional #84

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions docs/quick-start/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,33 @@ yarn chain

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`.

### 2. Deploy your smart contract:
### 2. Declare your smart contract (optional):

Following an example at `deploy.ts`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Following an example at `deploy.ts`:
If you don't wish to deploy your contract but rather just declare for your own purpose, follow this example in `deploy.ts`


```typescript
const declareScript = async (): Promise<void> => {
const response = await declareContract({
contract: "YourContractName",
options: {}, // You can add options like maxFee, nonce if needed
});
};
```

After setup function at `deploy.ts` run the command :

```
yarn deploy --network {NETWORK_NAME}
```

Pay attention to the output in the terminal. The ClassHash will be displayed during the deploy contract process.

```
Declaring Contract YourContractName
Contract Declared at 0x00...
```

### 3. Deploy your smart contract:

In the second terminal, deploy the test contract:

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

:::

### 3. Launch your NextJS Application
### 4. Launch your NextJS Application

On a third terminal, start your NextJS app:

Expand Down
Loading