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 readme #126

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ Go Stark Me is a modern platform designed to make fundraising for important caus

Join us on Go Stark Me and make a difference by supporting meaningful projects in a secure and efficient manner.

## UML Diagram

![UML Class Diagram](https://github.com/user-attachments/assets/479c9296-e3ac-4ad3-bf79-5f458c456a45)


## Our Vision for UI

You can check the prototype we have in mind and suggest any improvement, if you feel capable of reproducing some of the pages please contact one of the product owners.
Expand All @@ -25,6 +20,7 @@ You can check the prototype we have in mind and suggest any improvement, if you

- [EmmanuelAR](https://github.com/EmmanuelAR)
- [adrianvrj](https://github.com/adrianvrj)
- [bitfalt](https://github.com/bitfalt)

## Want to Contribute?

Expand All @@ -41,4 +37,4 @@ You can also contact us on Telegram:

- [@adrian_vrj](https://t.me/adrian_vrj)
- [@EmmanuelDevCr](https://t.me/EmmanuelDevCr)

- [@bitfalt](https://t.me/bitfalt)
122 changes: 31 additions & 91 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,112 +8,52 @@

```bash
cd gostarkme/contracts

```

2. **Setup your environment**

To install scarb, follow the installation script provided in the scarb documentation to install the required version [here](https://docs.swmansion.com/scarb/download.html#install-via-asdf).

For this project, you're required to `install scarb v2.6.4`

By operating system:

- Linux/MacOS

1. Install [asdf](https://docs.swmansion.com/scarb/download.html#install-via-asdf)
2. Install [scarb](https://docs.swmansion.com/scarb/download#install-via-asdf)
3. Verify installation by running `scarb --version`

- For Windows
1. Install [scarb](https://docs.swmansion.com/scarb/download.html#windows)
2. Verify installation by running `scarb --version`

- Scarb v2.6.5 : [here](https://docs.swmansion.com/scarb/download.html#install-via-asdf).
```bash
asdf install scarb 2.6.5
```
```bash
asdf global scarb 2.6.5
```
- Starknet Foundry v0.27.0: [here](https://foundry-rs.github.io/starknet-foundry/getting-started/installation.html).
```bash
asdf install starknet-foundry 0.27.0
```
```bash
asdf install starknet-foundry 0.27.0
```
3. **Compile Go Stark Me Backend 🛠️**

To build the contracts, run the command:

```bash
scarb build
To build the contracts, run the command:

```

This ensures all contracts and modules are built.
```bash
scarb build
```

4. **Run Go Stark Me Unit Tests ✅**

To run the unit tests for the contracts, run the following command:

```bash
snforge test
To run the unit tests for the contracts, run the following command:

```
```bash
scarb run test
```
or
```bash
snforge test
EmmanuelAR marked this conversation as resolved.
Show resolved Hide resolved
```

5. **Run Code Formatter 📝**

To maintain consistency across the codebase, we use the in-built formatter that comes with Scarb.
To format your contracts, simply run the command:

```bash
scarb fmt
```

6. **Integrating a New Contract**

To add a new contract to the Go Stark Me project:

- Create the Contract:
Add a new .cairo file under the gostarkme/contracts directory.
- Update the Manifest:
Modify the Scarb.toml file to include the new contract:

```bash
[contracts]
new_contract = { path = "./contracts/new_contract.cairo" }
```

- Compile:
To format your contracts, simply run the command:

Run the compile command to ensure the new contract is included:

```bash
scarb build
```

7. **Integrating Tests for a Contract**

To add unit tests for a new contract:

- Create Test Files:

Add the test file under gostarkme/tests/. For example:

```bash
touch tests/test_new_contract.cairo
```

- Write Tests:

Include test cases relevant to the new contract.

- Run the Tests:

Run tests to ensure functionality:

```bash
snforge test

```
```bash
scarb fmt
```

## UML Diagram

![UML Class Diagram](https://github.com/user-attachments/assets/479c9296-e3ac-4ad3-bf79-5f458c456a45)

9. **Code Formatting Standards**

To maintain clean and readable code:

- `Comments`: Use /// for function and logic explanations.
- `Function and Variable Names`: Use descriptive names, such as initialize_user or get_balance.
- `Indentation`: Use 4 spaces per indentation level.
- `Modular Code`: Break down complex functions into smaller parts when possible.
![UML Class Diagram](https://github.com/user-attachments/assets/479c9296-e3ac-4ad3-bf79-5f458c456a45)
Loading