From a3d5aacad047a1767250fd57af4c1e43913ea974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Ag=C3=BCero?= <54730752+EmmanuelAR@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:38:42 -0600 Subject: [PATCH 1/3] Fix: Backend readme, remove chatgpt generic documentation. Only setup env info Add daniel in main readme remove uml from main readme --- README.md | 8 +-- contracts/README.md | 118 ++++++++++---------------------------------- 2 files changed, 29 insertions(+), 97 deletions(-) diff --git a/README.md b/README.md index 6fdd6ba..12dd115 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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? @@ -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) diff --git a/contracts/README.md b/contracts/README.md index 04e107f..16c955e 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -8,112 +8,48 @@ ```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 + snforge test + ``` 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) \ No newline at end of file From 8eefec361c1bfe5acc4a604a27a1fdc6d4d7a746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Ag=C3=BCero?= <54730752+EmmanuelAR@users.noreply.github.com> Date: Fri, 4 Oct 2024 10:40:34 -0600 Subject: [PATCH 2/3] add test command --- contracts/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/README.md b/contracts/README.md index 16c955e..23de3c6 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -38,6 +38,10 @@ To run the unit tests for the contracts, run the following command: + ```bash + scarb test + ``` + or ```bash snforge test ``` From a19f34dae32ec9bc4f399f21c5c9723687c71234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Ag=C3=BCero?= <54730752+EmmanuelAR@users.noreply.github.com> Date: Fri, 4 Oct 2024 13:06:13 -0600 Subject: [PATCH 3/3] fix test command --- contracts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/README.md b/contracts/README.md index 23de3c6..3467a71 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -39,7 +39,7 @@ To run the unit tests for the contracts, run the following command: ```bash - scarb test + scarb run test ``` or ```bash