Skip to content

Commit

Permalink
chore: modify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Darlington02 committed Jun 1, 2024
1 parent 9a82cf7 commit ba5f07d
Show file tree
Hide file tree
Showing 21 changed files with 72 additions and 58 deletions.
1 change: 1 addition & 0 deletions bin/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ try {
`${FRONTEND_BASE_PATH}/burner`,
`${FRONTEND_BASE_PATH}/wikipedia`,
`${FRONTEND_BASE_PATH}/scaffold-deployer`,
`${FRONTEND_BASE_PATH}/address-book`,
`${FRONTEND_BASE_PATH}/components/Burner`,
`${FRONTEND_BASE_PATH}/components/BurnerWallet`,
`${FRONTEND_BASE_PATH}/components/ScaffoldDeployer`,
Expand Down
6 changes: 4 additions & 2 deletions docs/src/chapter_1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Starknet-Scaffold is a comprehensive, open-source toolkit designed for developing decentralized applications (dApps) on Starknet. This toolkit includes the most popular and functional tools, ensuring an up-to-date development environment. Starknet-Scaffold simplifies the process of forking the Starknet development stack through an adaptable frontend that seamlessly integrates with smart contracts. Additionally, it provides optimized scripts to streamline the processes of contract building, declaring, and deploying, thereby enhancing developer efficiency.
# Introduction

Starknet-Scaffold was built using a robust technology stack, including:
Starknet-Scaffold is a comprehensive, open-source toolkit designed for developing decentralized applications (dApps) on Starknet. This toolkit includes the most popular and functional tools, ensuring an up-to-date development environment.

Starknet-Scaffold was built using a robust technology stack, which includes:

1. **NextJS**: A powerful React framework that enables server-side rendering and static site generation, improving performance and SEO for web applications. It provides a seamless development experience with features like file-based routing and API routes.

Expand Down
5 changes: 3 additions & 2 deletions docs/src/chapter_2/subchapter_1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

This documentation provides detailed instructions on how to install and set up Starknet-Scaffold, an open-source, up-to-date toolkit for building decentralized applications (dapps) on Starknet.
This documentation provides detailed instructions on how to install and set up Starknet-Scaffold.

## Requirements

Expand All @@ -11,6 +11,7 @@ Before you begin, ensure you have the following tools installed on your system:
* [Git](https://git-scm.com/downloads)
* [Scarb](https://docs.swmansion.com/scarb/download.html)
* [Starknet Foundry](https://foundry-rs.github.io/starknet-foundry/getting-started/installation.html)
* [Docker](https://docs.docker.com/get-docker/)

## Installation Methods

Expand All @@ -19,7 +20,7 @@ Before you begin, ensure you have the following tools installed on your system:

### Method One: Using `create-starknet-app` executable.

The recommended way to start with Starknet-Scaffold is by using the `create-starknet-app` command. This method allows you to choose between different boilerplate types based on your project needs.
The recommended way to get started with Starknet-Scaffold is by using the `create-starknet-app` executable. This method allows you to choose between different boilerplate types based on your project needs.

1. Run the executable

Expand Down
8 changes: 4 additions & 4 deletions docs/src/chapter_2/subchapter_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ After setting up your project using either method, follow these steps to get you
This will download and install all the important packages specified in the `package.json` file.

2. To build your Cairo contracts:

Build the contract to ensure all files are correctly compiled and prepared for development:

```
npm run build-contracts
Expand All @@ -32,8 +30,10 @@ After setting up your project using either method, follow these steps to get you
npm run start
```

This command will start a local server and open your default web browser to display your new Starknet-Scaffold project.
This command kickstarts a local development server for your new project.

Starknet-Scaffold provides other scripts to facilitate development. We will cover more of these available scripts in the coming chapters.

You now have a fully set up and running installation of Starknet-Scaffold at https://localhost:3000. For further customization and detailed instructions, please refer to the documentation.
<img src="../public/home.png" width="100%" alt="starknet scaffold" />

You now have a fully set up and running installation of Starknet-Scaffold at `https://localhost:3000`. For further customization and detailed instructions, please refer to the documentation.
4 changes: 4 additions & 0 deletions docs/src/chapter_4/subchapter_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ This tools interface consists of two sections; the declare and deploy section.
This section takes in the Contract Class JSON file (Sierra) and the Compiled Contract Class JSON file (CASM), then declares the contract.
Once declared, a class hash is returned which can be used to deploy the contract.

<img src="../public/declare.png" width="100%" alt="starknet deployer" />

## Deploy section

This section takes in the declared class hash and its constructor arguments, then deploys the contract.

<img src="../public/deploy.png" width="100%" alt="starknet deployer" />
8 changes: 5 additions & 3 deletions docs/src/chapter_4/subchapter_2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Burner Wallet

The burner wallet tool enables users to generate burner wallets which are temporary wallets that can be generated and used during the course of development. Burner wallets are only supported on the Sepolia network and a user can only only generate a maximum of five wallets at a time.
The Burner wallet tool enables users to generate temporary wallets for use during the course of development. Burner wallets are only supported on the Sepolia network and a user can only generate a maximum of five wallets at a time.

A generated wallet UI gives us information such as ETH and STRK balance and address. The burner wallet can be funded using the [Faucet](subchapter_3.md) tool.

Expand All @@ -10,6 +10,8 @@ In order for the generated burner wallet to be used, it has to be connected. Aft
Transfer tokens by inputting the recipient address and amount.

2. Execute smart contract calls:
The generated wallet can execute functions from other smart contracts by inputting the contract address, function name and arguments.
Execute functions from other smart contracts by inputting the contract address, function name and arguments.

The user can also clear all generated wallets.
Users have the ability to also clear the generated wallets.

<img src="../public/burner.png" width="100%" alt="starknet burner" />
5 changes: 4 additions & 1 deletion docs/src/chapter_4/subchapter_3.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Faucet

This is sepETH/sepSTRK faucet tool for claiming ETH/STRK sepolia testnet tokens. In order to use it, the user types in the wallet address and specifies the test token they wish to receive then they send a request. This takes some seconds to reflect. This tool can be used to fund generated burner wallets.
This is a sepETH/sepSTRK faucet tool built by the Starknet Foundation.
You can claim ETH/STRK sepolia testnet tokens for development. This tool can be used to fund generated burner wallets.

<img src="../public/faucet.png" width="100%" alt="starknet burner" />
16 changes: 9 additions & 7 deletions docs/src/chapter_4/subchapter_4.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Wikipedia

The wikipedia tool is a collection of Starknet/Cairo learning resources in the ecosystem. These resources are in a tabular form which is paginated and sortable.
The Wikipedia is a collection of Starknet/Cairo learning resources within the ecosystem.

The columns of the table are;
The columns of the table are:

1. Name: name of the resource.
2. Description: A short description of the tool mentioned.
3. Status: States whether the tool/resource is up to date or not.
4. URL: A link to the tool/resource.
- Name: The name of the resource.
- Description: A short description of the mentioned tool.
- Status: Indicates whether the tool/resource is up-to-date or not.
- URL: A link to the tool/resource.

This tool has a search functionality to easily find resources.
This tool also includes a search functionality to easily find resources.

<img src="../public/wikipedia.png" width="100%" alt="starknet burner" />
4 changes: 3 additions & 1 deletion docs/src/chapter_4/subchapter_5.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Converter

A collection of utility functions for Starknet related conversions. This tool works by inputting a value you wish to convert after you are given the felt, hex, string, felt array, selector, u256, big3 equivalent that can be used anywhere else.
A collection of utility functions for Starknet related conversions. Convert between hex, felts, strings, selectors and uint256s.

<img src="../public/converter.png" width="100%" alt="starknet burner" />
2 changes: 1 addition & 1 deletion docs/src/chapter_4/subchapter_6.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Address Book

This is a tool that lists all relevant contract addresses within the starknet ecosystem.
The address book contains a list of all relevant contract addresses within the starknet ecosystem.
57 changes: 27 additions & 30 deletions docs/src/chapter_5.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,84 @@
# Starknet-Scaffold Scripts Overview
# Scripts Overview

## Contract Scripts
## Contract Scripts

Below are scripts provided by `Starknet-Scaffold` for contract management.
Below are npx scripts provided by `Starknet-Scaffold` for your smart contract development.

### Build Contract

Initiate the contract building process with the following command.
To build your contracts:
```
npm run build-contracts
```

### Format contracts
Leverage `Scarb’s` native formatting capabilities to tidy up your contracts.
Leverage `Scarb’s` native formatting capabilities by running:
```
npm run format-contracts
```


### Test contracts
The following comand will kick off the testing sequence for your contracts and receive the corresponding results.
### Test contracts
To run your Starknet Foundry tests:
```
npm run test-contracts
```


### Run custom `starknet-foundry` scripts
To run custom starknet foundry deploy/declare/invoke script, use the specified command, ensure to replace placeholders with actual parameters.
### Run custom `starknet-foundry` scripts
To run a custom starknet foundry deploy/declare/invoke script:
```
npm run contract-scripts --url=<RPC_URL> --account=<ACCOUNT_NAME> <SCRIPT_NAME>
```


### Generate an SRC-5 interface ID for your contracts
Create an `SRC-5 interface ID` for your contracts using the command provided.
### Generate an SRC-5 interface ID for your contracts
To generate an `SRC-5 interface ID`, run:
```
npm run generate-interface <PATH_TO_INTERFACE>
```


### Declare Contract
Declaring a contract is an important step to ensure its availability on the network. Once declared, the contract can then be implemented and interacted with.
### Prepare Account for deployment
To prepare your account for deployment, run:
```
npm run delete-account --url=<RPC_URL> --name=<ACCOUNT_NAME> --network=<alpha-mainnet | alpha-goerli>
npm run prepare-account --url=<RPC_URL> --name=<ACCOUNT_NAME>
```
generates a profile which is added to scarb.toml and can be passed to other commands.

### Deploy Account
After `declaring` your contract, you can use the command below to deploy. Make sure to specify the profile from `Scarb.toml` where the name corresponds to your account name. Additionally, you should provide the maximum fee
### Deploy Account
To deploy an account:
```
npm run deploy-account --profile=<MY_PROFILE> --name=<ACCOUNT_NAME> --maxfee=<MAX_FEE>
```

where the profile is gotten from scarb.toml, name is the prepared account and maxfee is the specified max fee.

### Delete Account
To delete an account run the following command. Please ensure to replace all placeholders with the actual parameters:
To delete an account:
```
npm run delete-account --url=<RPC_URL> --name=<ACCOUNT_NAME> --network=<alpha-mainnet | alpha-goerli>
```


### Declare Contract
To declare a Starknet contract:
```
npm run delete-account --url=<RPC_URL> --name=<ACCOUNT_NAME> --network=<alpha-mainnet | alpha-goerli>
```

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


## User Interface Scripts

The following are scripts from `Starknet-Scaffold` for handling the user interface.


### Run Frontend
To run UI, from the `base` repository:
To run UI, from the base repository:
```
npm run start
```



### Run Frontend
For compiling your frontend, in the `root` directory execute:
To build your frontend, from the base repository run:
```
npm run build-ui
```
Expand Down
9 changes: 4 additions & 5 deletions docs/src/chapter_6.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

## Introduction

Starknet Devnet is a development network (devnet) implemented in Rust, similar to the Python-based starknet-devnet.With Devnet, you can simulate Starknet in the comfort of your local network. Fork mainnet/testnet to interact with real-world smart contracts, while maintaining isolation.
Starknet Devnet is a development network (devnet) implemented in Rust. With Devnet, you can simulate Starknet in the comfort of your local network. Fork mainnet/testnet to interact with real-world smart contracts, while maintaining isolation.

## Prerequisites:

1. Docker Installation: Docker has to be installed for the script to work.
Docker has to be installed for the script to work.

## Run Starknet-Devnet

Ensure to have Docker installed. To run starknet-devnet:
To run starknet-devnet:

```
npm run devnet
```

Check out the official starknet devnet documentation [here](https://book.starknet.io/ch02-06-starknet-devnet.html).
Check out the official starknet devnet documentation [here](https://0xspaceshard.github.io/starknet-devnet-rs/).
3 changes: 2 additions & 1 deletion docs/src/chapter_7.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Starknet Address Book
# Address Book

<!-- List all relevant contract addresses on Starknet.
- https://starkscan.co/address-book -->
Expand All @@ -10,6 +10,7 @@ This provides a detailed list of relevant contract addresses on Starknet, includ
| -------------------- | ------------------------------------------ |
| Core Contract | 0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4 |
| GpsStatementVerifier | 0x47312450B3Ac8b5b8e247a6bB6d523e7605bDb60 |
| STRK | 0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d |

### Tokens

Expand Down
2 changes: 1 addition & 1 deletion docs/src/chapter_8.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Starknet-Scaffold Contributing Guide
# Contributing Guide

Welcome to the Starknet Scaffold contributing guide! Thank you for investing your time in contributing to our project. This guide aims to provide a comprehensive overview of the contribution workflow, ensuring an effective and efficient process for everyone involved.

Expand Down
Binary file added docs/src/public/burner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/public/converter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/public/declare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/public/deploy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/public/faucet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/public/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/public/wikipedia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ba5f07d

Please sign in to comment.