-
Notifications
You must be signed in to change notification settings - Fork 9
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 #1 from aragon/f/OS-600_setup-osx-commons-with-sub…
…graph-package OS-600 : setup osx commons with subgraph package
- Loading branch information
Showing
14 changed files
with
896 additions
and
0 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,33 @@ | ||
--- | ||
name: Bug report | ||
about: Create a bug report to help us | ||
title: 'Bug: <add-text-here>' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A short summary of what the bug is. Please be clear and concise. | ||
|
||
**To Reproduce (please complete the following information)** | ||
- Config and flags: [e.g. variable="xyz"] | ||
- Steps to reproduce the behavior: | ||
1. node '...' | ||
2. make request with '....' | ||
3. '...' | ||
4. See error | ||
|
||
**Current behavior** | ||
In depth explanation, if required, or a clear and concise description of what actually happens. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**System (please complete the following information):** | ||
- OS: [e.g. Fedora 35] | ||
- Software version [e.g. Docker 8, Node 14.19.1] | ||
- Commit hash [e.g. e84617d] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,24 @@ | ||
## Description | ||
|
||
Please include a summary of the change and be sure you follow the contributions rules we do provide [here](./CONTRIBUTIONS.md) | ||
|
||
Task: [ID]() | ||
|
||
## Type of change | ||
|
||
<!--- 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. | ||
- [ ] 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. |
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,28 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"singleQuote": true, | ||
"arrowParens": "avoid", | ||
|
||
"overrides": [ | ||
{ | ||
"files": "*.sol", | ||
"options": { | ||
"printWidth": 100, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"singleQuote": false, | ||
"bracketSpacing": false | ||
} | ||
}, | ||
{ | ||
"files": "*.md", | ||
"options": { | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"bracketSpacing": false | ||
} | ||
} | ||
] | ||
} |
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,3 @@ | ||
# osx-commons | ||
|
||
OSX-Commons: A collection of shared resources and utilities for the Aragon OSX DAO Framework, including subgraph, contract, and SDK functionalities. |
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,28 @@ | ||
# dependencies | ||
node_modules | ||
|
||
# testing | ||
coverage | ||
|
||
# production | ||
build | ||
dist | ||
dist-ssr | ||
*.local | ||
.cache | ||
typechain | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
*.tgz | ||
|
||
# debug | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# generated | ||
generated | ||
.bin |
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,14 @@ | ||
# Aragon OSx Subgraph | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [UPCOMING] | ||
|
||
### Changed | ||
|
||
### Added | ||
|
||
### Removed |
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,42 @@ | ||
# Aragon OSx Subgraph Commons | ||
|
||
The `@aragon/osx-commons-subgraph` package provides a collection of utilities for the creation and management of subgraphs for the Aragon DAO Framework. | ||
|
||
## Installation | ||
|
||
To add this package to your project, navigate to your project's root directory and run: | ||
|
||
```bash | ||
yarn add @aragon/osx-commons-subgraph | ||
``` | ||
|
||
## Nohoist Configuration | ||
|
||
If this package is intended to be used with Matchstick in a mono repo, you might need to configure it to not hoist its dependencies. | ||
|
||
This can be done by adding the following configuration to your project's root package.json file: | ||
|
||
```json | ||
{ | ||
"workspaces": { | ||
"nohoist": ["**/@aragon/osx-commons-subgraph", "**/@aragon/osx-commons-subgraph/**"] | ||
} | ||
} | ||
``` | ||
|
||
This configuration ensures that all dependencies for the @aragon/osx-commons-subgraph package will be installed inside its own node_modules directory, which is required by Matchstick for proper functioning. | ||
|
||
## Usage | ||
|
||
After installing @aragon/osx-subgraph-commons, you can import and use its functions in your Subgraph project. | ||
|
||
Example: | ||
|
||
```ts | ||
import {getDaoId} from '@aragon/osx-commons-subgraph'; | ||
|
||
const daoId = getDaoId(<some-dao-address>); | ||
console.log(`The DAO ID is: ${daoId}`); | ||
``` | ||
|
||
In this example, the getDaoId function is used to generate a DAO ID from a given Ethereum address. |
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 @@ | ||
export * from './src'; |
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,26 @@ | ||
{ | ||
"name": "@aragon/osx-commons-subgraph", | ||
"version": "1.0.0", | ||
"description": "The Aragon subgraph-commons package for ID generation and other common utilities for subgraph", | ||
"module": "index.ts", | ||
"types": "index.ts", | ||
"private": false, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/aragon/osx.git" | ||
}, | ||
"author": "", | ||
"license": "AGPL-3.0-or-later", | ||
"bugs": { | ||
"url": "https://github.com/aragon/osx/issues" | ||
}, | ||
"homepage": "https://github.com/aragon/osx#readme", | ||
"scripts": { | ||
"test": "" | ||
}, | ||
"devDependencies": { | ||
"@graphprotocol/graph-ts": "^0.27.0", | ||
"@types/node": "^18.7.15", | ||
"typescript": "^4.9.5" | ||
} | ||
} |
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,5 @@ | ||
import {Address} from '@graphprotocol/graph-ts'; | ||
|
||
export function getDaoId(dao: Address): string { | ||
return dao.toHexString(); | ||
} |
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 @@ | ||
export * from './ids'; |
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,5 @@ | ||
{ | ||
"extends": "./node_modules/assemblyscript/std/assembly.json", | ||
"include": ["index.ts"], | ||
"exclude": ["node_modules"] | ||
} |
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,38 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
"@graphprotocol/graph-ts@^0.27.0": | ||
version "0.27.0" | ||
resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.27.0.tgz#948fe1716f6082964a01a63a19bcbf9ac44e06ff" | ||
integrity sha512-r1SPDIZVQiGMxcY8rhFSM0y7d/xAbQf5vHMWUf59js1KgoyWpM6P3tczZqmQd7JTmeyNsDGIPzd9FeaxllsU4w== | ||
dependencies: | ||
assemblyscript "0.19.10" | ||
|
||
"@types/node@^18.7.15": | ||
version "18.16.19" | ||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.19.tgz#cb03fca8910fdeb7595b755126a8a78144714eea" | ||
integrity sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA== | ||
|
||
[email protected]: | ||
version "0.19.10" | ||
resolved "https://registry.yarnpkg.com/assemblyscript/-/assemblyscript-0.19.10.tgz#7ede6d99c797a219beb4fa4614c3eab9e6343c8e" | ||
integrity sha512-HavcUBXB3mBTRGJcpvaQjmnmaqKHBGREjSPNsIvnAk2f9dj78y4BkMaSSdvBQYWcDDzsHQjyUC8stICFkD1Odg== | ||
dependencies: | ||
binaryen "101.0.0-nightly.20210723" | ||
long "^4.0.0" | ||
|
||
[email protected]: | ||
version "101.0.0-nightly.20210723" | ||
resolved "https://registry.yarnpkg.com/binaryen/-/binaryen-101.0.0-nightly.20210723.tgz#b6bb7f3501341727681a03866c0856500eec3740" | ||
integrity sha512-eioJNqhHlkguVSbblHOtLqlhtC882SOEPKmNFZaDuz1hzQjolxZ+eu3/kaS10n3sGPONsIZsO7R9fR00UyhEUA== | ||
|
||
long@^4.0.0: | ||
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" | ||
integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== | ||
|
||
typescript@^4.9.5: | ||
version "4.9.5" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" | ||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== |