-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from web3wagers/dev
merge dev into main
- Loading branch information
Showing
74 changed files
with
4,573 additions
and
2,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"projectName": "gostarkme", | ||
"projectOwner": "web3wagers" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: ODHack Issue | ||
about: Issue that will be solved during an ODHack | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### This issue will be part of ODHack8.0, please apply via Onlydust app | ||
- Please read [contributors guide](https://github.com/web3wagers/gostarkme/blob/dev/CONTRIBUTORS_GUIDE.md) before asking for an issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.snfoundry_cache | ||
target | ||
.DS_Store | ||
.DS_Store | ||
|
||
contracts/.snfoundry_cache/https___starknet_mainnet_public_blastapi_io_rpc_v0_7_519354_v3.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,80 @@ | ||
# Go Stark Me - Backend Setup 💻 | ||
|
||
### Steps to Run the Backend 🥳 | ||
## Steps to Run the Backend 🥳 | ||
|
||
1. **Navigate to the Contracts Directory 🔍** | ||
|
||
Ensure you are in the correct directory where the Cairo contracts are stored. | ||
|
||
```bash | ||
cd gostarkme/contracts | ||
2. **Compile gostarkme backend 🛠️** | ||
```bash | ||
scarb build | ||
3. **Run gostarkme unit test ✅** | ||
```bash | ||
snforge test | ||
4. **Run code formatter 📝** | ||
```bash | ||
scarb fmt | ||
``` | ||
|
||
2. **Setup your environment** | ||
|
||
- 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 global starknet-foundry 0.27.0 | ||
``` | ||
**Setup your environment(Different option for macOS)** | ||
|
||
- Scarb v2.6.5 : [here](https://docs.swmansion.com/scarb/download.html#install-via-asdf). | ||
```bash | ||
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.6.5 | ||
``` | ||
Place it in the path: | ||
```bash | ||
export PATH="$HOME/.local/bin:$PATH" | ||
``` | ||
It is recommended to restart the terminal. | ||
- Starknet Foundry v0.27.0: [here](https://foundry-rs.github.io/starknet-foundry/getting-started/installation.html). | ||
```bash | ||
curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh -s -- -v 0.27.0 | ||
``` | ||
Place it in the path: | ||
```bash | ||
echo 'export PATH="$HOME/.asdf/shims:$HOME/.asdf/bin:$PATH"' >> ~/.zshrc | ||
``` | ||
```bash | ||
echo 'export PATH="$HOME/.foundry/bin:$PATH"' >> ~/.zshrc | ||
3. **Compile Go Stark Me Backend 🛠️** | ||
To build the contracts, run the command: | ||
```bash | ||
scarb build | ||
``` | ||
|
||
4. **Run Go Stark Me Unit Tests ✅** | ||
|
||
To run the unit tests for the contracts, run the following command: | ||
|
||
```bash | ||
scarb run test | ||
``` | ||
or | ||
```bash | ||
snforge test | ||
``` | ||
|
||
5. **Run Code Formatter 📝** | ||
|
||
To format your contracts, simply run the command: | ||
|
||
```bash | ||
scarb fmt | ||
``` | ||
|
||
## UML Diagram | ||
|
||
![UML Class Diagram](https://github.com/user-attachments/assets/479c9296-e3ac-4ad3-bf79-5f458c456a45) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
pub mod state_constants; | ||
pub mod fund_constants; | ||
pub mod fund_manager_constants; | ||
pub mod starknet_constants; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
contracts/src/constants/funds/fund_manager_constants.cairo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// ************************************************************************* | ||
// FUND MANAGER CONSTANTS | ||
// ************************************************************************* | ||
pub mod FundManagerConstants { | ||
pub const FUND_MANAGER_ADDRESS: felt252 = | ||
0x02bbab4d3c77dd83dfe47af99c9a3188a660e9c652a2f7af3d21df213f4882cd; | ||
pub const VALID_ADDRESS_1: felt252 = | ||
0x0388012BD4385aDf3b7afDE89774249D5179841cBaB06e9E5b4045F27B327CE8; | ||
pub const VALID_ADDRESS_2: felt252 = | ||
0x0528A7ba821024a8eC44dff0bFFe15443d811F233e4de7AB1a8C26f251597c4c; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use starknet::ContractAddress; | ||
|
||
// ************************************************************************* | ||
// STARKNET CONSTANTS | ||
// ************************************************************************* | ||
pub mod StarknetConstants { | ||
pub const STRK_TOKEN_ADDRESS: felt252 = | ||
0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d; | ||
pub const STRK_TOKEN_MINTER_ADDRESS: felt252 = | ||
0x0594c1582459ea03f77deaf9eb7e3917d6994a03c13405ba42867f83d85f085d; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.