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

fix: chapter 5 documentation #95

Closed
wants to merge 1 commit into from
Closed
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
70 changes: 68 additions & 2 deletions docs/src/chapter_5.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,71 @@

A detailed breakdown of available scripts

Resources:
- https://github.com/argentlabs/Starknet-Scaffold/tree/main?tab=readme-ov-file#contract-section-1
## Contract Scripts

Here are the available script commands in Starknet-Sca

## Build Contract

The following command will `cd contracts` and execute `scarb build`

```
npm run build-contracts
```

## Format contracts

Formatting contracts utilizes Scarb in-built formatter.

```
npm run build-contracts
```


## Test contracts

This initiates the testing process for your contracts and retruns the approraite result

```
npm run test-contracts
```


## Run custom starknet foundry scripts

This command will run the foundry scripts
```
npm run contract-scripts --url=<RPC_URL> --account=<ACCOUNT_NAME> <SCRIPT_NAME>
```



## Generate an SRC-5 interface ID for your contracts
```
npm run generate-interface <PATH_TO_INTERFACE>
```



## Deploy Account

A contract can be depolyed on Starknet using the flowing command:
Ensure to provide profile which is found in `Scarb.toml` name is your account name and then supply the maxFee
Max fee will be automatically computed if --max-fee <MAX_FEE> is not passed.
```
npm run deploy-account --profile=<MY_PROFILE> --name=<ACCOUNT_NAME> --maxfee=<MAX_FEE>
```



## Starknet-Devnet

Please ensure docker is successfully installed to run starknet-devnet

```
npm run devnet
```




Loading