Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.
Open
Changes from all commits
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
26 changes: 26 additions & 0 deletions docs/quick-start/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,32 @@ yarn start

Visit your app on: `http://localhost:3000`. You can interact with your smart contract using the `Debug Contracts` page. You can tweak the app config in `packages/nextjs/scaffold.config.ts`.

### [OPTIONAL] Declare your smart contract:

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

**What's next**:

- Edit your smart contract `YourContract.cairo` in `packages/snfoundry/contracts/src`.
Expand Down
Loading