Skip to content

Commit

Permalink
feat: add kakarot support to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
EjembiEmmanuel committed Oct 11, 2024
1 parent ff6125b commit 44361bd
Showing 1 changed file with 44 additions and 7 deletions.
51 changes: 44 additions & 7 deletions docs/src/chapter_5.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,21 @@ npm run delete-account --profile=<MY_PROFILE> --account-file=<PATH_TO_ACCOUNT_FI
### Declare Contract
To declare a Starknet contract:
```
npm run declare-contract --profile=<MY_PROFILE> --keystore=<PATH_TO_KEYSTORE_FILE> --account=<PATH_TO_ACCOUNT_FILE> --contract-name=<CONTRACT_NAME> --url=<RPC_URL> --fee-token=<FEE_TOKEN>
npm run declare-contract --profile=<MY_PROFILE> --contract-name=<CONTRACT_NAME> --url=<RPC_URL> --fee-token=<FEE_TOKEN>
```

when `profile` is specified, `keystore`, `account` and `url` are not needed. But when `profile` is not specified, all three of them need to be provided.

### Deploy Contract
To deploy a contract:
```
npm run deploy-contract --profile=<MY_PROFILE> --keystore=<PATH_TO_KEYSTORE_FILE> --account=<PATH_TO_ACCOUNT_FILE> --feetoken=<FEE_TOKEN> --class=<CONTRACT_CLASSHASH> --url=<RPC_URL>
npm run deploy-contract --profile=<MY_PROFILE> --feetoken=<FEE_TOKEN> --class=<CONTRACT_CLASSHASH> --url=<RPC_URL>
```

when `profile` is specified, `keystore`, `account` and `url` are not needed. But when `profile` is not specified, all three of them need to be provided.

### Starknet-Devnet
Confirm that Docker is installed and running to use starknet-devnet. To run devnet:
```
npm run devnet
```


## Dojo Scripts
The `contracts` folder contains all the tools needed to write, build, test and deploy dojo projects. It is built with sozo and katana. Here are common operations you can perform on your dojo contracts.

Expand Down Expand Up @@ -113,6 +108,48 @@ To migrate your dojo project, from the base repository run:
npm run migrate-dojo --name=<PROJECT_NAME>
```

## Kakarot Scripts
Below are npm scripts provided by `Starknet-Scaffold` for your Kakarot development.

### Setup Kakarot
To setup Kakarot, from the base repository run:
```
npm run setup-kakarot
```

### Start Kakarot
To start Kakarot, from the base repository run:
```
npm run start-kakarot
```

### Deploy Kakarot L1 Messaging Contracts to Local RPC
To deploy Kakarot l1 messaging contracts locally, from the base repository run:
```
npm run deploy-kakarot-l1-messaging-contracts-local
```

### Deploy Kakarot EVM Contract
To deploy a Kakarot EVM contract, from the base repository run:
```
npm run deploy-kakarot-evm-contract --contract-path=<PATH_TO_CONTRACT> --rpc-url=<RPC_URL> --private-key=<PRIVATE_KEY>
```
If you need to specify constructor args, run:
```
npm run deploy-kakarot-evm-contract --contract-path=<PATH_TO_CONTRACT> --constructor-args=<CONSTRUCTOR_ARGS> --rpc-url=<RPC_URL> --private-key=<PRIVATE_KEY>
```

### Declare Cairo Contract Using Keystore
To declare a Cairo contract using keystore, from the base repository run:
```
npm run keystore-declare-contract --keystore=<PATH_TO_KEYSTORE_FILE> --account=<PATH_TO_ACCOUNTS_FILE> --contract-name=<CONTRACT_NAME> --url=<RPC_URL> --fee-token=<FEE_TOKEN>
```

### Deploy Cairo Contract Using Keystore
To deploy a Cairo contract using keystore, from the base repository run:
```
npm run keystore-deploy-contract --keystore=<PATH_TO_KEYSTORE_FILE> --account=<PATH_TO_ACCOUNTS_FILE> --url=<RPC_URL> --fee-token=<FEE_TOKEN> --class-hash=<CLASS_HASH>
```

## User Interface Scripts

Expand Down

0 comments on commit 44361bd

Please sign in to comment.