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

WIP chore: merge develop into main #3

Closed
wants to merge 228 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
e749c39
feat: copied files from the simple-storage-example-plugin repo into p…
heueristik Jun 1, 2023
bf0b457
set monorepo package.json
Rekard0 Jun 1, 2023
bce3b5b
fix: CI/CD
heueristik Jun 1, 2023
d84d365
init subgraph
Rekard0 Jun 1, 2023
a515d75
fix: CI/CD
heueristik Jun 2, 2023
005882a
feat: CI/CD improvements
heueristik Jun 2, 2023
b390e17
feat: cleaned devDependencies
heueristik Jun 2, 2023
37b7adb
feat: improve CI step description
heueristik Jun 2, 2023
8b98b95
subgraph bare bone (WIP)
Rekard0 Jun 2, 2023
44d795d
feat: add subpackages and cleaned dependencies
heueristik Jun 2, 2023
187372a
feat: temporary readme
heueristik Jun 2, 2023
c2b3e36
feat: move packages
heueristik Jun 2, 2023
e177a48
fix: wrong path
heueristik Jun 2, 2023
8ca275f
add post install
Rekard0 Jun 13, 2023
55d81e2
plugin repo only
heueristik Jun 15, 2023
a75aca8
switch to osx-ethers
Rekard0 Jun 16, 2023
0cdbdc8
fix missing dir issue
Rekard0 Jun 16, 2023
2cfdc44
make it build
Rekard0 Jun 16, 2023
7019544
build 1
heueristik Jun 19, 2023
1da6159
Merge remote-tracking branch 'origin/main' into prepare-repo
heueristik Jun 19, 2023
5ec6a55
chore: cleaning
heueristik Jun 19, 2023
38f76d8
feat: deleted contracts-versions
heueristik Jun 19, 2023
3c7aa8a
feat: refactoring
heueristik Jun 19, 2023
0e90148
feat: refactoring
heueristik Jun 19, 2023
d5785cb
feat: improvements
heueristik Jun 20, 2023
10852bc
Merge branch 'prepare-repo' into main
heueristik Jun 20, 2023
ee6c9b7
feat: refactoring
heueristik Jun 20, 2023
6183940
fix: linting and prettier
heueristik Jun 20, 2023
b5ec888
feat: print more infos, remove unused function
heueristik Jun 20, 2023
6e267cd
fix: print more info
heueristik Jun 20, 2023
6a288f0
More infos
heueristik Jun 20, 2023
0ffd7b7
Renaming
heueristik Jun 20, 2023
23a0440
More info
heueristik Jun 20, 2023
f78c6ed
fix: test failing because of wrong default test network
heueristik Jun 20, 2023
5439c74
Merge pull request #3 from aragon/prepare-repo
heueristik Jun 20, 2023
a3d394e
feature: add subgraph workflow
heueristik Jun 20, 2023
5b7d2e3
fix: rename flows
heueristik Jun 20, 2023
e929ed6
fix: adapt triggers
heueristik Jun 20, 2023
a891df2
fix: install packages first
heueristik Jun 20, 2023
a14ebb6
fix: triggers
heueristik Jun 20, 2023
be78c1f
feat: one .env file
heueristik Jun 20, 2023
6d46014
fix: .env paths
heueristik Jun 20, 2023
a759395
fix: remove redundant checkout
heueristik Jun 20, 2023
6309fec
debug: print info
heueristik Jun 20, 2023
03c3ee7
debug: attempt fix
heueristik Jun 20, 2023
3885283
fix: missing env variable
heueristik Jun 20, 2023
bb9f1ea
fix: triggers
heueristik Jun 20, 2023
db98da3
Merge pull request #4 from aragon/feature/ci-cd
heueristik Jun 20, 2023
791da1d
Removed summaries
heueristik Jun 21, 2023
5791520
WIP
heueristik Jun 21, 2023
1661786
improvements
heueristik Jun 21, 2023
4e71d84
fix: path
heueristik Jun 21, 2023
40eb7a3
fix: empty json handling
heueristik Jun 21, 2023
21fe6e1
fix: lint warnings
heueristik Jun 22, 2023
e2dabff
Merge pull request #5 from aragon/feature/ci-cd
heueristik Jun 22, 2023
746aa6b
add psp and pluginRepos related mapping WIP
Rekard0 Jun 23, 2023
c6683dd
refactor PSP handlers (WIP)
Rekard0 Jun 26, 2023
ecd5d9b
refactor PSP handlers (WIP)
Rekard0 Jul 4, 2023
3b6dc63
refactor PSP handlers (WIP)
Rekard0 Jul 6, 2023
c6063db
refactor PSP handlers (WIP)
Rekard0 Jul 10, 2023
82380c4
clean up
Rekard0 Jul 11, 2023
9f00d58
create common id functions
Rekard0 Jul 12, 2023
066c53a
clean up
Rekard0 Jul 14, 2023
70b6b7e
Feature: Add js client (#2)
josemarinas Jul 18, 2023
1f5f31e
fix subgraph build
Rekard0 Jul 19, 2023
bf0c676
fix lint
Rekard0 Jul 19, 2023
bc91488
map 1 event
Rekard0 Jul 19, 2023
2c0d1e4
chore: bump package versions
heueristik Jul 27, 2023
598e0c2
feat: added event, tests, and improved signer, renamed plugin
heueristik Jul 27, 2023
a545bd1
fix: linting and formatting errors
heueristik Jul 27, 2023
cdb285b
feature: support base goerli network
heueristik Aug 1, 2023
a0b5db8
Merge pull request #6 from aragon/feature/base-goerli-support
heueristik Aug 1, 2023
8bb3d8f
Add missing migration import for setup processing
brickpop Aug 24, 2023
7477f69
Merge pull request #8 from aragon/fix/add-missing-migration-import
heueristik Aug 24, 2023
3ff241a
feat: added sepolia and base support and fix IPFS returning empty str…
heueristik Oct 18, 2023
2b066ca
OS-593: refactors repo for linting and linting during workflows (#11)
mathewmeconry Oct 19, 2023
6b3bb1c
docs: added readme (#13)
heueristik Oct 20, 2023
e8948ee
Os 782 remove the contracts ethers and do rollup in mini sdk (#12)
mathewmeconry Oct 25, 2023
8bd3457
refactor: renamed and refactored files
heueristik Nov 8, 2023
1003777
refactor: skip repo creation if ENS name is already taken
heueristik Nov 8, 2023
143aa08
docs: added usage guide and improved comments
heueristik Nov 8, 2023
014d732
ci: fix workflow by removing outdated lint
heueristik Nov 8, 2023
dd08774
ci: formatting & linting on every push
heueristik Nov 8, 2023
1cf2894
docs: improve migration file comment
heueristik Nov 8, 2023
a4ef1d5
ci: fix linting workflow
heueristik Nov 8, 2023
610c1e1
build: use the same typescript version everywhere
heueristik Nov 8, 2023
fd0e7a5
docs: improve usage guide
heueristik Nov 8, 2023
7e00454
docs: improved usage guide
heueristik Nov 8, 2023
fa55216
Merge pull request #16 from aragon/feature/usage-guide
pythonpete32 Nov 13, 2023
a4a768b
OS-754 : re-organize entity relations & add testing (#15)
Rekard0 Nov 14, 2023
da4da85
fix(js-client): exclude dist from tsconfig.json (#20)
mathewmeconry Nov 15, 2023
d2394e6
chore: added arbitrum and arbitrumGoerli (#18)
heueristik Nov 20, 2023
5ee399b
build(js-client): replaces tsdx with dts-cli (#21)
mathewmeconry Nov 27, 2023
1f4af1f
chore: bump OZ dependency (#22)
heueristik Nov 27, 2023
cb673e0
docs: add readme and usage guide
heueristik Nov 28, 2023
d3af915
Merge pull request #23 from aragon/feature/OS-786-subgraph-readme
pythonpete32 Nov 29, 2023
145b252
OS-888 fix: Import Repo address from plugin-info (#26)
Rekard0 Dec 19, 2023
61a2172
build: clean-up of dependecy and commands (#19)
heueristik Dec 20, 2023
7de41f2
Feature: Add Subgraph step-by-step guide (#25)
josemarinas Dec 21, 2023
7dc7cdb
feat: use `osx-commons-contracts` and `osx-commons-configs` (#28)
heueristik Feb 8, 2024
d86bd53
refactor: improve folder structure (#30)
heueristik Feb 8, 2024
c17721c
build: remove js client (#31)
heueristik Feb 13, 2024
d02b165
ci: clean GH flows and remove gitpod (#32)
heueristik Feb 13, 2024
ebeef5e
docs: update README.md (#33)
heueristik Feb 13, 2024
bed129b
feat: use commons subgraph (#29)
josemarinas Feb 14, 2024
8a35842
build: improve package.json files (#34)
heueristik Feb 14, 2024
8b83595
refactor: rename files
heueristik Feb 15, 2024
f61877c
feat: move contract code
heueristik Feb 15, 2024
7137c98
feat: move tests
heueristik Feb 15, 2024
cf769ea
feat: move contracts (#1)
heueristik Feb 28, 2024
8bdff80
feat: improvements surfaced from the admin plugin (#36)
heueristik Feb 28, 2024
85ec99c
Merge branch 'main' into develop
heueristik Feb 28, 2024
5f37a13
Merge remote-tracking branch 'origin/main' into develop
heueristik Feb 28, 2024
113147c
feat: add version information
heueristik Feb 28, 2024
20f3e75
feat: add tag for repo ownership transfer
heueristik Feb 28, 2024
d474ef1
doc: adapt readme (#4)
heueristik Mar 8, 2024
debbcd6
feat: update the env examples to change the infura api key for the al…
clauBv23 Mar 8, 2024
f12d885
feat: update the hardhat contracts file to use the new commons networ…
clauBv23 Mar 8, 2024
bfcea08
feat: update the hardhat config to use the new addRpcUrlToNetwork fun…
clauBv23 Mar 11, 2024
70b3441
feat: update the config commons dependency version
clauBv23 Mar 11, 2024
2a8c7da
ci: update the readme to add the new alchemy api key needed
clauBv23 Mar 11, 2024
edc2dc1
feat: add new commons config version
clauBv23 Mar 12, 2024
e630db0
ci: typo
clauBv23 Mar 12, 2024
a656459
Update .env.example
clauBv23 Mar 12, 2024
97342dd
Update README.md
clauBv23 Mar 12, 2024
b2dc6b4
feat: update the api key in the workflows
clauBv23 Mar 12, 2024
f7c5f31
ci: update readme
clauBv23 Mar 12, 2024
8d105f8
feat: bump commons config version on subgraph
clauBv23 Mar 12, 2024
65d4f7b
Merge pull request #46 from aragon/OS-1109/use-new-osx-common-network…
clauBv23 Mar 12, 2024
37fc816
feat: add the plugin events to the placeholder and update the contrac…
clauBv23 Mar 12, 2024
c3c0918
feat: update the actions to run over the PR changes instead of the c…
clauBv23 Mar 12, 2024
b0f962d
ci: comment to check the pipeline
clauBv23 Mar 12, 2024
afae57e
ci: undo the last comment added on the readme
clauBv23 Mar 12, 2024
74b6d8c
feature: improvements (#44)
heueristik Mar 13, 2024
54e5704
Merge branch 'develop' into OS-1127/fix-github-actions-to-run-over-pr…
clauBv23 Mar 13, 2024
deaef7a
Merge pull request #47 from aragon/OS-1127/fix-github-actions-to-run-…
clauBv23 Mar 13, 2024
951a623
feat: add manifest with psp address for missing networks and add the …
clauBv23 Mar 13, 2024
154cc96
feat: update the script for getting the repo address
clauBv23 Mar 13, 2024
56b6524
feat: update the readme
clauBv23 Mar 13, 2024
7a90e39
feat: update the deployment script to avoid deploying if the plugin a…
clauBv23 Mar 13, 2024
d51c1dc
ci update comment
clauBv23 Mar 13, 2024
14d9cd8
Merge pull request #48 from aragon/OS-1124/fix-plugin-repo-address
clauBv23 Mar 14, 2024
055fdf7
feat: start moving admin subgraph
clauBv23 Mar 14, 2024
d8722e2
Merge remote-tracking branch 'template/develop' into merge/template/d…
clauBv23 Mar 14, 2024
df043c9
fix: some duplication resulting of the merge
clauBv23 Mar 14, 2024
83f4465
ci: undo line removed
clauBv23 Mar 14, 2024
87c5434
ci: remove generate random name function due to it is not needed in t…
clauBv23 Mar 14, 2024
fbbb440
Merge pull request #6 from aragon/merge/template/develop
Rekard0 Mar 14, 2024
260e336
Merge branch 'merge/template/develop' into OS-497/move-and-refactor-s…
clauBv23 Mar 14, 2024
41dceff
feat: update template placeholder
clauBv23 Mar 15, 2024
545801a
ci: remove not needed files
clauBv23 Mar 15, 2024
795de85
feat: update some types and refactor handle proposal created function
clauBv23 Mar 15, 2024
3d60002
feat: update psp tests to work
clauBv23 Mar 15, 2024
c4bd5d1
feat: add tests, constants, and helper functions
clauBv23 Mar 15, 2024
b6db7b5
fix: undo changes
clauBv23 Mar 15, 2024
d390ed4
ci: remove not needed definitions
clauBv23 Mar 15, 2024
3537ab5
ci: rmv new line
clauBv23 Mar 15, 2024
6c9207c
ci: add new line
clauBv23 Mar 15, 2024
6dba0c4
feat: add PermissionManager to generate his ABI
clauBv23 Mar 15, 2024
040912e
feat: add admin members
clauBv23 Mar 15, 2024
1c0790f
feat: add admin members tests
clauBv23 Mar 15, 2024
c9e0a7d
feat: add pr template from osx
jordaniza Mar 15, 2024
05dd481
lint: linted pr template
jordaniza Mar 15, 2024
17b3dc6
feat: refactor the manifest placeholder
clauBv23 Mar 15, 2024
fd20963
ci: rename the dao param for daoAddress
clauBv23 Mar 15, 2024
5ad7ef1
fix: added missing contributions guide
jordaniza Mar 15, 2024
6e8ac3a
fix: broken links and add pr template check
jordaniza Mar 15, 2024
590734a
Merge pull request #8 from aragon/f/pr-template
jordaniza Mar 15, 2024
55507fc
feat: update the psp handle installation prepared function to use the…
clauBv23 Mar 15, 2024
e72b7b7
feat: update the psp test
clauBv23 Mar 15, 2024
9c68f25
ci: update entities property name
clauBv23 Mar 15, 2024
c906b0d
fix: admin tests
clauBv23 Mar 15, 2024
65ecba7
fix psp handler problem with the plugin entity id
clauBv23 Mar 24, 2024
8a05901
ci: refactor the var names
clauBv23 Mar 24, 2024
7d63ed8
ci: update entity param description
clauBv23 Mar 24, 2024
327af0d
feat: update the plugin deployed addresses
clauBv23 Mar 24, 2024
e8d7343
ci: rename var in tests helpers
clauBv23 Mar 24, 2024
2f95884
ci: remove new line
clauBv23 Mar 25, 2024
da6095b
feat: update the manifest data json
clauBv23 Mar 25, 2024
b4885c8
ci: remove base goerli due to is deprecated
clauBv23 Mar 25, 2024
6db495e
feat: update the placeholder
clauBv23 Mar 25, 2024
98edc23
feat: update the script to correctly get the plugin repo address
clauBv23 Mar 25, 2024
e516b13
feat: rename admin ts file for plugin ts file
clauBv23 Mar 25, 2024
338938d
fix: update import
clauBv23 Mar 25, 2024
ce2572b
fix: update import
clauBv23 Mar 25, 2024
858836d
Update packages/subgraph/schema.graphql
clauBv23 Mar 25, 2024
5ee03f5
Update packages/subgraph/schema.graphql
clauBv23 Mar 25, 2024
fa02664
feat: remove loop for iterate over a single element array list
clauBv23 Mar 25, 2024
27f9499
ci: add comment for clarification
clauBv23 Mar 25, 2024
85cbd65
feat: create constant and move the execute proposal permission has
clauBv23 Mar 25, 2024
c444bb7
feat: rename administrator related variables to be more clear
clauBv23 Mar 25, 2024
b292034
feat: define variables for clarifying the usage in the code
clauBv23 Mar 25, 2024
bbbb379
feat: use constant in test instead of magic expression
clauBv23 Mar 25, 2024
82cef2a
feat: update the deploy script to get the repo address from the corre…
clauBv23 Mar 25, 2024
67eed30
Update packages/subgraph/manifest/data/localhost.json
clauBv23 Mar 25, 2024
f1cfcc1
Merge pull request #7 from aragon/OS-497/move-and-refactor-subgraph
clauBv23 Mar 25, 2024
b3bc7f1
feat: update repository
clauBv23 Mar 25, 2024
1fe5ce8
Merge pull request #9 from aragon/fix/repository-name-in-subgraph-pla…
clauBv23 Mar 25, 2024
e3749f7
feature: improvements (#5)
heueristik Mar 25, 2024
d85fa1a
feat: reorder the create grant and revoke event params to be more log…
clauBv23 Mar 26, 2024
1748672
feat: update the handleRevoke test to properly check the permission w…
clauBv23 Mar 26, 2024
baec9d3
feat: add helper function for
clauBv23 Mar 26, 2024
524e59b
feat: revert
clauBv23 Mar 26, 2024
73196b4
feat: update the schema to remove the failure map and to adjust the a…
clauBv23 Mar 27, 2024
4d8b6f8
feat: update the handlers to fit the new schema
clauBv23 Mar 27, 2024
74b507e
feat: add function to generate the new action Id
clauBv23 Mar 27, 2024
2e31137
feat: update the tests and add new one for checking the entity id is …
clauBv23 Mar 27, 2024
02fbbda
feat: add tests for membership contract announced handler, test the A…
clauBv23 Mar 27, 2024
a1a505a
feat: bump graph version to 0.6.0
clauBv23 Mar 27, 2024
1e2f45e
feat: add extra checks and descriptions
clauBv23 Mar 27, 2024
7bc4101
feat: rename the proposal action back to action to unify names
clauBv23 Mar 28, 2024
66c6776
ci: update comment
clauBv23 Mar 28, 2024
7fc0e2c
ci: change variable name for a more descriptive one
clauBv23 Mar 28, 2024
79efa9a
feat: change the constant name
clauBv23 Mar 28, 2024
52a361b
ci: remove not needed imports
clauBv23 Mar 28, 2024
1839ab5
Merge pull request #10 from aragon/OS-1163/improve-subgraph-tests
clauBv23 Apr 2, 2024
638dc0e
feat: use new subgraph commons version
clauBv23 Apr 2, 2024
678ef2a
feat: use generate action entity id function from the new subgraph c…
clauBv23 Apr 2, 2024
7f0426a
ci: remove generate action entity id method due to is not longer used
clauBv23 Apr 2, 2024
df5ce0f
ci: reorder imports
clauBv23 Apr 2, 2024
34e23b8
ci: fix import in the tests
clauBv23 Apr 2, 2024
68a0a80
ci: remove clearStore when not needed
clauBv23 Apr 2, 2024
8d77179
Merge branch 'develop' into OS-1162/update-action-entity-and-proposal
clauBv23 Apr 2, 2024
66bfe39
ci: remove test for imported function
clauBv23 Apr 2, 2024
f0fb7fd
Merge pull request #11 from aragon/OS-1162/update-action-entity-and-p…
clauBv23 Apr 3, 2024
77fba4d
fix: update schema inline comments to reflect ID handling
banasa44 Apr 9, 2024
ca8d521
ci: lower casing to prevent confusions
banasa44 Apr 10, 2024
003ca4e
Merge pull request #12 from aragon/f/subgraph-ids-review
banasa44 Apr 12, 2024
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
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# GENERAL

## The network used for testing purposes
NETWORK_NAME="sepolia" # ["mainnet", "sepolia", "polygon", "polygonMumbai", "base", "baseSepolia", "arbitrum", "arbitrumSepolia"]
NETWORK_NAME="sepolia" # ["mainnet", "sepolia", "polygon", "mumbai","baseMainnet", "baseGoerli", "baseSepolia", "arbitrum", "arbitrumSepolia"]

# CONTRACTS

## One or multiple hex encoded private keys separated by commas `,` replacing the hardhat default accounts.
PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" # Default hardhat account 0 private key. DON'T USE FOR DEPLOYMENTS

## Infura credentials
INFURA_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
## Alchemy RPC endpoint credentials
ALCHEMY_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"

## Gas Reporting
REPORT_GAS='true'
Expand Down
28 changes: 28 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Description

Please include a summary of the change and be sure you follow the contributions rules we do provide [here](../CONTRIBUTIONS.md)

Task ID: [OS-?](https://aragonassociation.atlassian.net/browse/OS-?)

## Type of change

See the framework lifecylce in `packages/contracts/docs/framework-lifecycle` to decide what kind of change this pull request is.

<!--- Please delete options that are not relevant. -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:

- [ ] I have selected the correct base branch.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] My changes generate no new warnings.
- [ ] Any dependent changes have been merged and published in downstream modules.
- [ ] I ran all tests with success and extended them if necessary.
- [ ] 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.
6 changes: 3 additions & 3 deletions .github/workflows/contracts-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'contracts'

on:
workflow_dispatch:
push:
pull_request:
paths:
- 'packages/contracts/**'
- '.github/workflows/contracts-*.yml'
Expand Down Expand Up @@ -31,10 +31,10 @@ jobs:
- name: 'Build the contracts'
run: 'yarn build'
env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}

- name: 'Test the contracts and generate the coverage report'
run: 'yarn coverage'
env:
NETWORK_NAME: ${{ vars.NETWORK_NAME }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/subgraph-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'subgraph'

on:
workflow_dispatch:
push:
pull_request:
paths:
- 'packages/subgraph/**'
- 'packages/contracts/**'
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
working-directory: packages/subgraph
env:
SUBGRAPH_NETWORK_NAME: ${{ vars.SUBGRAPH_NETWORK_NAME }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}

- name: 'Test the subgraph'
run: yarn test
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ packages/subgraph/tests/.bin
.pnp.*
coverage.json

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

packages/subgraph/deploy-output.txt
packages/subgraph/subgraph.yaml
packages/subgraph/tests/.latest.json
Expand Down
129 changes: 129 additions & 0 deletions CONTRIBUTIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Contribution Guide

---

Thank you for being interested in contributing to Aragon! 🎉  We’re excited to have you building this vision with us.

There are many ways to contribute! Some ideas are:

- writing tutorials, blog posts or improving the documentation,
- submitting bug reports,
- submitting feature requests,
- refactoring code,
- or even writing new functionality to incorporate into the project.

All community members are expected to adhere to our community guidelines. Please familiarize yourself with our [Terms and Conditions](https://aragon.org/terms-and-conditions) to ensure a welcoming and friendly environment across all our platforms. Adhering to these principles is essential. 💙

## Your first contribution

Unsure where to begin contributing to Aragon?

You can start with a [Good First Issue](https://github.com/aragon/admin-plugin/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).

> Good first issues are usually for small features, additional tests, spelling / grammar fixes, formatting changes, or other clean up.

Start small, pick a subject you care about, are familiar with, or want to learn.

If you're not already familiar with git or Github, here are a couple of friendly tutorials: [First Contributions](https://github.com/firstcontributions/first-contributions), [Open Source Guide](https://opensource.guide/), and [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).

Otherwise, you can also contribute through improving our documentation. You can find our documentation within the `docs` folder of each of our repositories. If you see something that could be better explained, or if you want to share better resources for each of the topics, we’d love to hear from you. Feel free to either submit a PR directly to the repo or simply [register here](https://aragonteam.typeform.com/to/QJyKtESU) and we’ll reach out.

## How to file an issue or report a bug

If you see a problem, you can report it in our [issue tracker](https://github.com/aragon/admin-plugin/issues) (or [here](https://aragonteam.typeform.com/to/QJyKtESU)).

Please take a quick look to see if the issue doesn't already exist before filing yours.

Do your best to include as many details as needed in order for someone else to fix the problem and resolve the issue.

Some things that help us better understand:

- Device: which device are you using, which version, how old is it, etc
- Browser: which browser are you using, which version..
- Wallet: which wallet do you use to sign transactions
- Network: which network have you been testing on
- Logs: any specific transaction error or log that may support us in reviewing the error

### If you find a security vulnerability, do NOT open an issue. Email [[email protected]](mailto:[email protected]) instead.

In order to determine whether you are dealing with a security issue, ask yourself these two questions:

- Can I access or steal something that's not mine, or access something I shouldn't have access to?
- Can I disable something for other people?

If the answer to either of those two questions are "yes", then you're probably dealing with a security issue. Note that even if you answer "no" to both questions, you may still be dealing with a security issue, so if you're unsure, please send a email.

## Fixing issues

1. [Find an issue](https://github.com/aragon/admin-plugin/issues) that you are interested in.
- You may want to ask on the GitHub issue or in our [developer channel](https://discord.com/channels/672466989217873929/742442842474938478) if anyone has already started working on the issue.
2. Fork and clone a local copy of the repository.
3. Make the appropriate changes for the issue you are trying to address or the feature that you want to add.
4. Push the changes to the remote repository.
5. Submit a pull request to our repository on Github, explaining any changes and further questions you may have.

We kindly ask that every PR follows this format and checks all checkboxes.

```markdown
## Description

## Type of change

## Checklist

[ ] I have selected the correct base branch.
[ ] I have performed a self-review of my own code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[ ] My changes generate no new warnings.
[ ] Any dependent changes have been merged and published in downstream modules.
[ ] I ran all tests with success and extended them if necessary.
[ ] I have updated the CHANGELOG.md file in the root folder of the package after the [UPCOMING] title and before the latest version.
[ ] I have tested my code on the test network.
```

6. Wait for the pull request to be reviewed by the team.
7. Make adjustments to the pull request if they were requested by the maintainer.
8. Celebrate your success after your pull request is merged! You will be able to claim your POAP for the hard work and join our Developer Inner Circle community.

**Disclaimer**

It's OK if your pull request is not perfect (no pull request is). The reviewer will be able to help you address any issues and improve it.

### Tips and Tricks

Windows users may need to install the [windows-build-tools](https://www.npmjs.com/package/windows-build-tools) or [Windows Subsystems for Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) before installing this project's dependencies.

### Documentation

The documentation on how to run the code locally will be found within the `docs` folder of every repository.

You can also access our [Developer Portal](https://devs.aragon.org) where you’ll learn about our architecture, how it works, and useful tutorials to get you started.

### Style guide and development processes

You can find our documentation [Style Guide here](https://www.notion.so/Documentation-Style-Guide-07c88cec18114b0aac88e8f0ba289976).

For the frontends, we use [prettier](https://prettier.io/) and [eslint](https://eslint.org/) to automatically lint and format the project.

For the contracts, we use [eth-lint](https://github.com/duaraghav8/Ethlint) and [prettier](https://prettier.io/) to automatically lint the project.

For the SDK, we use [Prettier JS/TS formatter](https://prettier.io/docs/en/editors.html).

Handy `npm` scripts (usually `npm run lint`) are provided at all levels to help automate these checks.

We generally avoid adding external dependencies if they can be ported over easily, due to numerous NPM-related security issues in the past (e.g. `[event-stream](https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident)`).

### Git branch convention

Due to the unconventional release process of smart contracts, this repo utilizes a slightly different flow of git.

The main challenge is that smart contracts should be heavily scrutinized before a release, making the process cumbersome and unlike the release process for "normal" dependencies or apps. [See here](https://forum.aragon.org/t/git-branch-convention-for-aragon-repos/298/3) for a more detailed explanation.

Thus, we use the following convention: any change that can be release immediately, base it on the [develop branch](https://github.com/aragon/admin-plugin/tree/develop).

As `next` becomes ready, merge `next` onto `master` with a rebase.

## Community

If you need help, please reach out to Aragon core contributors and community members in our [Discord](https://discord.gg/aragon-672466989217873929). We'd love to hear from you and know what you're working on!
70 changes: 31 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
# Aragon OSX Plugin Template [![Hardhat][hardhat-badge]][hardhat] [![License: AGPL v3][license-badge]][license]
# Admin Plugin [![Hardhat][hardhat-badge]][hardhat] [![License: AGPL v3][license-badge]][license]

[hardhat]: https://hardhat.org/
[hardhat-badge]: https://img.shields.io/badge/Built%20with-Hardhat-FFDB1C.svg
[license]: https://opensource.org/licenses/AGPL-v3
[license-badge]: https://img.shields.io/badge/License-AGPL_v3-blue.svg

## Quickstart

After [creating a new repository from this template](https://github.com/new?template_name=osx-plugin-template-hardhat&template_owner=aragon), cloning, and opening it in your IDE, run

```sh
yarn install && cd packages/contracts && yarn install && yarn build && yarn typechain
```

Meanwhile, create an `.env` file from the `.env.example` file and put in the API keys for the services that you want to use.
You can now develop a plugin by changing the `src/MyPlugin.sol` and `src/MyPluginSetup.sol` files. You can directly import contracts from [Aragon OSx](https://github.com/aragon/osx) as well as OpenZeppelin's [openzeppelin-contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) and [openzeppelin-contracts-upgradeable](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable) that are already set up for you.

```sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.17;

import {IDAO, PluginUUPSUpgradeable} from "@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol";
import {SafeCastUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol';

contract MyPlugin is PluginUUPSUpgradeable {
//...
};
```

The initial `MyPlugin` and `MyPluginSetup` example comes with unit test, integration test, and test helpers in the `package/contracts/test` folder that you can reuse.

To build and test your contracts, run

```sh
yarn clean && yarn build && yarn test
```

## Project

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

```markdown
.
Expand Down Expand Up @@ -99,7 +68,7 @@ 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

- [Infura](https://www.infura.io/) that we use as the web3 provider
- [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

Expand Down Expand Up @@ -202,22 +171,38 @@ Deploy the contracts to the local Hardhat Network (being forked from the network
yarn deploy --tags CreateRepo,NewVersion
```

This will create a plugin repo and publish the the first version (`v1.1`) of your plugin.
This will create a plugin repo and publish the first version (`v1.1`) of your plugin.
By adding the tag `TransferOwnershipToManagmentDao`, the `ROOT_PERMISSION_ID`, `MAINTAINER_PERMISSION_ID`, and
`UPGRADE_REPO_PERMISSION_ID` are granted to the management DAO and revoked from the deployer.
You can do this directly

```sh
yarn deploy --tags CreateRepo,NewVersion,TransferOwnershipToManagmentDao
```

or at a later point by executing

Deploy the contracts to sepolia with
```sh
yarn deploy --tags TransferOwnershipToManagmentDao
```

To deploy the contracts to a production network use the `--network` option, for example

```sh
yarn deploy --network sepolia --tags CreateRepo,NewVersion,Verification
yarn deploy --network sepolia --tags CreateRepo,NewVersion,TransferOwnershipToManagmentDao,Verification
```

This will create a plugin repo, publish the the first version (`v1.1`) of your plugin, and verfiy the contracts on sepolia.
This will create a plugin repo, publish the first version (`v1.1`) of your plugin, transfer permissions to the
management DAO, and lastly verfiy the contracts on sepolia.

If you want to deploy a new version of your plugin afterwards (e.g., `1.2`), simply change the `VERSION` entry in the `packages/contracts/plugin-settings.ts` file and use

```sh
yarn deploy --network sepolia --tags NewVersion,Verification
```

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

Note, that if you include the `CreateRepo` tag after you've created your plugin repo already, this part of the script will be skipped.

#### Upgrading Your Plugin Repository
Expand All @@ -237,6 +222,8 @@ yarn deploy --network sepolia --tags UpgradeRepo
This will upgrade your plugin repo to the latest Aragon OSx protocol version implementation, which might include new features and security updates.
**For this to work, make sure that you are using the latest version of [this repository](https://github.com/aragon/osx-plugin-template-hardhat) in your fork.**

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
Expand Down Expand Up @@ -281,6 +268,10 @@ 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
Expand Down Expand Up @@ -313,7 +304,8 @@ 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). Then run
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
Expand Down
Loading
Loading