Skip to content

Commit

Permalink
Merge branch 'gitcoinco:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Ameralameri authored Aug 10, 2024
2 parents 69eaa82 + e42c0d7 commit 3919d12
Show file tree
Hide file tree
Showing 440 changed files with 86,603 additions and 34,549 deletions.
74 changes: 74 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# -----------------------------------------------
# Environment variables shared across packages
# -----------------------------------------------

##Debugging & development - DEFAULTS SUFFICIENT
# development for local, production for prod builds
REACT_APP_ENV=development
REACT_APP_ALLO_VERSION=allo-v2
# Allow overriding permissions checks by appending ?debug=true to the URL
REACT_APP_ALLOW_URL_DEBUG_MODE=true
# Disable permission checks by default
REACT_APP_DEBUG_MODE=true

##API keys - DEFAULTS SUFFICIENT
# Get a projectId at https://cloud.walletconnect.com
REACT_APP_WALLETCONNECT_PROJECT_ID=42a4d689485d5a324116e53ed077d907
# Set the Infura and Alchemy vars only if you need
# them as providers, otherwise the public ones will be used.
#REACT_APP_ALCHEMY_ID=
#REACT_APP_INFURA_ID=

##Passport - nonessential in local
REACT_APP_PASSPORT_API_ENDPOINT=https://api.scorer.gitcoin.co
# Get your own key at https://scorer.gitcoin.co
REACT_APP_PASSPORT_API_KEY=
REACT_APP_PASSPORT_API_COMMUNITY_ID=335
REACT_APP_PASSPORT_AVALANCHE_API_KEY=
REACT_APP_PASSPORT_API_COMMUNITY_ID_AVALANCHE=0000

##Indexer & Data Layer - DEFAULTS SUFFICIENT
# URL of the indexer. http://localhost:8080 for local indexer
REACT_APP_INDEXER_V2_API_URL=https://grants-stack-indexer-v2.gitcoin.co
# Search API URL where the Data Layer should point to
REACT_APP_GRANTS_STACK_SEARCH_API_BASE_URL=https://d2n9vtjeq685yt.cloudfront.net

##Debugging & development - ALL OPTIONAL
# Overrride the default chains
#REACT_APP_CHAINS_OVERRIDE=optimism,fantomTestnet,fantom,mainnet,sepolia,pgnTestnet,pgn,arbitrum,arbitrumGoerli,base,scroll,polygon,avalanche,avalancheFuji,zkSyncEraMainnet,zkSyncEraTestnet,celo,celoAlfajores,seiDevnet,lukso,luksoTestnet
REACT_APP_DATADOG_APPLICATION_ID=
REACT_APP_DATADOG_CLIENT_TOKEN=
REACT_APP_DATADOG_SERVICE=
REACT_APP_DATADOG_SITE=
REACT_APP_SENTRY_AUTH_TOKEN=
REACT_APP_SENTRY_DSN=
REACT_APP_TAG_MANAGER=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_POSTHOG_TOKEN=
REACT_APP_POSTHOG_KEY=
REACT_APP_POSTHOG_HOST=
REACT_APP_EXPLORER_DISABLE_MATCHING_ESTIMATES=false

# ---------------------------
# Builder - REQUIRED
# The Pinata JWT var is required in Builder and Manager to
# upload and pin metadata files to Pinata. Default ('TEST')
# will enable packages to run, but they won't allow you
# to upload and pin files. Create your account on
# https://pinata.cloud and set your own JWT value here.
REACT_APP_PINATA_JWT=TEST
REACT_APP_IPFS_BASE_URL=https://d16c97c2np8a2o.cloudfront.net
REACT_APP_PINATA_BASE_URL=https://api.pinata.cloud
# ---------------------------

# ---------------------------
# Explorer - nonessential
# create key following https://www.opensource.observer/docs/get-started/
REACT_APP_OSO_API_KEY=
# ---------------------------

# ---------------------------
# Manager - DEFAULTS SUFFICIENT
REACT_APP_BUILDER_URL=https://builder.gitcoin.co
REACT_APP_GRANT_EXPLORER=https://explorer.gitcoin.co
# ---------------------------
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Bug Report
description: File a bug report
labels: ["bug", "triage"]
projects: ["gitcoinco/grants-stack"]
assignees:
- jesuloluwao
body:
- type: markdown
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8

- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'pnpm'

- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/data-layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/grant-explorer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/round-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 1

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8

Expand Down
51 changes: 24 additions & 27 deletions docs/DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,49 @@ While there is no central backend application, all three dApps rely on various e

2. **[allo-indexer](https://github.com/gitcoinco/allo-indexer)**: This indexer is employed to index on-chain data and generate Quadratic Funding (QF) matches.

3. **Subgraph Instances**: There is one subgraph instance for each blockchain to efficiently query blockchain data.
3. **IPFS**: IPFS is utilized for reading metadata files, providing decentralized file storage.

4. **IPFS**: IPFS is utilized for reading metadata files, providing decentralized file storage.
4. **[Pinata](https://www.pinata.cloud/)**: Pinata is used to upload and pin files to IPFS, ensuring the availability of data.

5. **[Pinata](https://www.pinata.cloud/)**: Pinata is used to upload and pin files to IPFS, ensuring the availability of data.


### Setup root project dependencies
### Setup root project dependencies & env

```sh
cd grants-stack
cp .env.example .env
pnpm install
```
There are several important environment variables you need to be aware of. Many of them have been given default values that will allow
the packages to build and run out of the box, but not with all functionality.

### Setup Builder
`REACT_APP_PINATA_JWT` is **required** in Builder and Manager to upload and pin metadata files to Pinata. Until a custom JWT is set, you will not be able to upload and pin files. Create your account on https://pinata.cloud and set your own JWT value in the `.env`

```sh
cd packages/builder
cp .env.example .env
```
The following can be customized, but should work out of the box:

Create a WalletConnect application needed for RainbowKit: https://www.rainbowkit.com/docs/installation#configure
Set the WalletConnect applicationId in the .env file:
Create a WalletConnect application needed for [RainbowKit.](https://www.rainbowkit.com/docs/installation#configure)
Set the WalletConnect applicationId in the `.env` file: `REACT_APP_WALLETCONNECT_PROJECT_ID=[YOUR APPLICATION ID]`

```
REACT_APP_WALLETCONNECT_PROJECT_ID=[YOUR APPLICATION ID]
```
Set your Alchemy API Key: `REACT_APP_ALCHEMY_ID=[YOUR ALCHEMY API KEY]`

Set your Alchemy API Key:
The default configuration loads data from the production indexer.
You can point your dapps to a local indexer changing the following variable: `REACT_APP_INDEXER_V2_API_URL=http://localhost:PORT_NUMBER`

```
REACT_APP_ALCHEMY_ID=[YOUR ALCHEMY API KEY]
```
### Run All Packages

The default configuration loads data from the production indexer.
You can point your dapps to a local indexer changing the following variable:
From the main `grants-stack` directory:

```
REACT_APP_INDEXER_V2_API_URL=http://localhost:PORT_NUMBER
```sh
./scripts/dev start
```

### Run Builder
Open [http://localhost:3000](http://localhost:3000) to view Builder in a browser, [http://localhost:3001](http://localhost:3001) to view Explorer, [http://localhost:3002](http://localhost:3002) to view Manager.

Inside `packages/builder` run:
### Run a Single Package

```
Navigate to a single package (i.e. `packages/builder`) and start pnpm:

```sh
cd packages/builder
pnpm start
```

Expand Down Expand Up @@ -118,7 +115,7 @@ Synpress is an E2E testing framework for testing dApps. It works by setting up m

### Running Synpress

1. Put `TEST_PRIVATE_KEY` in `.env.local` in the respective directory (e.g. `packages/round-manager`)
1. Put `TEST_PRIVATE_KEY` in `.env.local` in the main `.env`
2. Start the dev server `pnpm start`
3. Download playwright with `pnpm exec playwright install`
4. Run tests with `pnpm synpress:test`
Expand Down
5 changes: 5 additions & 0 deletions funding.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"opRetro": {
"projectId": "0x6aa80764b6082947c3b2de86fe12804eb475b0afb719de50b9eed60b86f20535"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
"test:data-layer": "turbo run test --filter=data-layer"
},
"devDependencies": {
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"turbo": "^1.12.3"
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"turbo": "^1.13.3"
},
"dependencies": {
"concurrently": "^8.2.2",
"prettier": "^3.0.3"
"prettier": "^3.2.5"
},
"pnpm": {
"overrides": {
Expand Down
104 changes: 0 additions & 104 deletions packages/builder/.env.example

This file was deleted.

27 changes: 7 additions & 20 deletions packages/builder/.env.test
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
REACT_APP_SUBGRAPH_ARBITRUM_API="https://api.thegraph.com/subgraphs/name/gitcoinco/gitcoin-grants-arbitrum-one"
REACT_APP_SUBGRAPH_ARBITRUM_GOERLI_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-arbitrum-goerli"
REACT_APP_SUBGRAPH_AVALANCHE_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-avalanche-mainnet"
REACT_APP_SUBGRAPH_DEV1_API="http://local.local"
REACT_APP_SUBGRAPH_DEV2_API="http://local.local"
REACT_APP_SUBGRAPH_FANTOM_MAINNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-fantom-mainnet"
REACT_APP_SUBGRAPH_FANTOM_TESTNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-fantom-testnet"
REACT_APP_SUBGRAPH_FUJI_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-fuji-testnet"
REACT_APP_SUBGRAPH_GOERLI_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-goerli-testnet"
REACT_APP_SUBGRAPH_MAINNET_API="https://api.thegraph.com/subgraphs/name/vacekj/allo-mainnet"
REACT_APP_SUBGRAPH_OPTIMISM_MAINNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-optimism-mainnet"
REACT_APP_SUBGRAPH_PGN_API="https://graph-gitcoin-mainnet.hirenodes.io/subgraphs/name/gitcoin/allo"
REACT_APP_SUBGRAPH_PGN_TESTNET_API="https://graph-gitcoin-testnet.hirenodes.io/subgraphs/name/gitcoin/allo"
REACT_APP_SUBGRAPH_POLYGON_API="https://api.thegraph.com/subgraphs/name/allo-protocol/grants-round-polygon"
REACT_APP_SUBGRAPH_POLYGON_MUMBAI_API="https://api.thegraph.com/subgraphs/name/allo-protocol/grants-round-mumbai"
REACT_APP_SUBGRAPH_ZKSYNC_TESTNET_API="https://api.thegraph.com/subgraphs/name/gitcoinco/grants-round-zkync-era-testnet"
REACT_APP_SUBGRAPH_ZKSYNC_MAINNET_API="https://api.studio.thegraph.com/query/45391/grants-round-zkera/v0.0.2"
REACT_APP_GRANTS_STACK_SEARCH_API_BASE_URL="https://gitcoin-search-dev.fly.dev"
REACT_APP_SUBGRAPH_BASE_API="https://api.studio.thegraph.com/query/45391/grants-round-base/v0.0.1"
REACT_APP_SUBGRAPH_SEPOLIA_API=”https://api.thegraph.com/subgraphs/name/bhargavaparoksham/grants-round-sepolia-testnet”
REACT_APP_SUBGRAPH_SCROLL_API="https://api.studio.thegraph.com/query/45391/grants-round-scroll/v0.0.2"

REACT_APP_PINATA_GATEWAY="https://pinata-gateway.com"
REACT_APP_PINATA_JWT="abcedfg"
REACT_APP_IPFS_BASE_URL="https://local-ipfs.dev"
REACT_APP_PINATA_BASE_URL="https://local-pinata.dev"
REACT_APP_PINATA_JWT="test-token"
REACT_APP_WALLETCONNECT_PROJECT_ID="1234"
REACT_APP_PASSPORT_API_KEY="test-key"
REACT_APP_PASSPORT_AVALANCHE_API_KEY="test-key"
REACT_APP_PASSPORT_API_COMMUNITY_ID="0000"
REACT_APP_PASSPORT_API_COMMUNITY_ID_AVALANCHE="0000"

REACT_APP_POSTHOG_KEY=""
REACT_APP_POSTHOG_HOST=""
Loading

0 comments on commit 3919d12

Please sign in to comment.