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

ci: remove subgraph #29

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
10 changes: 0 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,3 @@ ETHERSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
POLYGONSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
BASESCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
ARBISCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"

# SUBGRAPH

## The Graph credentials
GRAPH_KEY="zzzzzzzzzzzz"

## Subgraph
SUBGRAPH_NAME="osx"
SUBGRAPH_VERSION="v1.0.0"
SUBGRAPH_NETWORK_NAME="mainnet" # ["mainnet", "sepolia", "polygon", "base", "arbitrum"]
4 changes: 0 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@
contracts:
- ./packages/contracts/**/*
- ./packages/contracts/*

subgraph:
- ./packages/subgraph/**/*
- ./packages/subgraph/*
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ See the framework lifecylce in `packages/contracts/docs/framework-lifecycle` to
- [ ] I have updated the `CHANGELOG.md` file in the root folder.
- [ ] I have updated the `DEPLOYMENT_CHECKLIST` file in the root folder.
- [ ] I have updated the `UPDATE_CHECKLIST` file in the root folder.
- [ ] I have updated the Subgraph and added a QA URL to the description of this PR.
3 changes: 0 additions & 3 deletions .github/workflows/formatting-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ jobs:

- name: 'Lint contracts ts and js'
run: 'yarn lint:contracts:ts'

- name: 'Lint subgraph ts and js'
run: 'yarn lint:subgraph:ts'
48 changes: 0 additions & 48 deletions .github/workflows/subgraph-tests.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ dist
node_modules
typechain

packages/subgraph/imported
packages/subgraph/generated
packages/subgraph/tests/.bin

# files
*.env
*.log
Expand All @@ -23,8 +19,3 @@ coverage.json

packages/contracts/createVersionProposalData*.json
packages/contracts/upgradeRepoProposalData*.json

packages/subgraph/deploy-output.txt
packages/subgraph/subgraph.yaml
packages/subgraph/tests/.latest.json
packages/subgraph/tests/helpers/extended-schema.ts
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ coverage.json
package-lock.json
pnpm-lock.yaml
yarn.lock
extended-schema.ts
101 changes: 1 addition & 100 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Project

The root folder of the repo includes two subfolders:
The root folder of the repo includes one subfolders:

```markdown
.
Expand All @@ -19,15 +19,6 @@ The root folder of the repo includes two subfolders:
│ ├── ...
│ └── package.json
├── packages/subgraph
│ ├── src
│ ├── scripts
│ ├── manifest
│ ├── tests
│ ├── utils
│ ├── ...
│ └── package.json
├── ...
└── package.json
```
Expand Down Expand Up @@ -69,7 +60,6 @@ yarn lint
To be able to work on the contracts, make sure that you have created an `.env` file from the `.env.example` file and put in the API keys for

- [Alchemy](https://www.alchemy.com) that we use as the web3 provider
- [Alchemy Subgraphs](https://www.alchemy.com/subgraphs) that we use as the subgraph provider
- the block explorer that you want to use depending on the networks that you want to deploy to

Before deploying, you MUST also change the default hardhat private key (`PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"`).
Expand Down Expand Up @@ -224,95 +214,6 @@ This will upgrade your plugin repo to the latest Aragon OSx protocol version imp

Note, that if the deploying account doesn't own the repo anymore, this will create a `upgradeRepoProposalData-sepolia.json` containing the data for a management DAO signer to create a proposal upgrading the repo.

## Subgraph

### Installing

In `packages/subgraph`, first run

```sh
yarn install
```

which will also run

```sh
yarn postinstall
```

subsequently, to build the ABI in the `imported` folder.

### Building

Build the subgraph and

```sh
yarn build
```

which will first build the contracts (see [Contracts / Building](#building)) with

```
yarn build:contracts
```

second the subgraph manifest with

```sh
yarn build:manifest
```

and finally the subgraph itself with

```
yarn build:subgraph
```

When running `yarn build`, it requires a plugin address, which is obtained from the configuration file located
at `subgraph/manifest/data/<network>.json`, based on the network specified in your `.env` file under the `SUBGRAPH_NETWORK_NAME` variable.
You do not need to provide a plugin address for building or testing purposes, but it becomes necessary when deploying the subgraph.

During development of the subgraph, you might want to clean outdated files that were build, imported, and generated. To do this, run

```sh
yarn clean
```

### Testing

Test the subgraph with

```sh
yarn test
```

### Linting

Lint the TypeScript code with

```sh
yarn lint
```

### Coverage

Generate the code coverage with

```sh
yarn coverage
```

### Deployment

To deploy the subgraph to the subgraph provider, write your intended subgraph name and version into the `SUBGRAPH_NAME` and `SUBGRAPH_VERSION` variables [in the `.env` file that you created in the beginning](environment-variables) and pick a network name `SUBGRAPH_NETWORK_NAME` [being supported by the subgraph provider](https://docs.alchemy.com/reference/supported-subgraph-chains). Remember to place correctly the Plugin address on the network you are going to deploy to, you can do that by adding it on `subgraph/manifest/data/<network>.json`.
Then run

```sh
yarn deploy
```

to deploy the subgraph and check your [Alchemy subgraph dashboard](https://subgraphs.alchemy.com/onboarding) for completion and possible errors.

## License

This project is licensed under AGPL-3.0-or-later.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"prettier:write": "prettier --write \"**/*.{js,json,md,sol,ts,yml}\"",
"lint:contracts:sol": "solhint --max-warnings 0 \"packages/contracts/src/**/*.sol\"",
"lint:contracts:ts": "eslint --ext .js,.ts ./packages/contracts/",
"lint:subgraph:ts": "eslint --ext .js,.ts ./packages/subgraph/",
"lint": "yarn run lint:contracts:sol; yarn run lint:contracts:ts; yarn run lint:subgraph:ts"
"lint": "yarn run lint:contracts:sol; yarn run lint:contracts:ts;"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
Expand Down
10 changes: 0 additions & 10 deletions packages/subgraph/.eslintrc.yml

This file was deleted.

30 changes: 0 additions & 30 deletions packages/subgraph/abis/ERC165.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/subgraph/manifest/data/arbitrum.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/subgraph/manifest/data/baseMainnet.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/subgraph/manifest/data/localhost.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/subgraph/manifest/data/mainnet.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/subgraph/manifest/data/polygon.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/subgraph/manifest/data/sepolia.json

This file was deleted.

Loading
Loading