Skip to content

Commit

Permalink
Merge pull request #1 from OriumNetwork/ON-453-erc-721-ownership
Browse files Browse the repository at this point in the history
ON-453: create project structure
  • Loading branch information
juo-dev authored Aug 23, 2023
2 parents 826623a + 1f51743 commit 0574df5
Show file tree
Hide file tree
Showing 24 changed files with 13,669 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const config = require('@oriumnetwork/orium-commons/lint/eslint-config')
module.exports = config
30 changes: 30 additions & 0 deletions .github/workflows/all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build

on:
push:
branches: ['*', '!master', '!dev', '!qa']

jobs:
build_test_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
registry-url: 'https://npm.pkg.github.com'
scope: '@oriumnetwork'
- name: Install Dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
# Goerli
- name: Goerli Code Generator
run: npm run codegen-goerli
- name: Goerli Build
run: npm run build-goerli
- name: Goerli Test
run: npm run test-goerli
34 changes: 34 additions & 0 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build
on:
push:
branches:
- dev
jobs:
build_test_deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
registry-url: 'https://npm.pkg.github.com'
scope: '@oriumnetwork'
- name: Install Dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
- name: Subgraph Auth
run: yarn graph-auth -- ${{ secrets.THEGRAPH_API_KEY }}
# Goerli
- name: Code Generator Goerli
run: npm run codegen-goerli
- name: Build Goerli
run: npm run build-goerli
- name: Goerli Test
run: npm run test-goerli
- name: Subgraph Deploy Goerli
run: npm run deploy-goerli
34 changes: 34 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build
on:
push:
branches:
- master
jobs:
build_test_deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
registry-url: 'https://npm.pkg.github.com'
scope: '@oriumnetwork'
- name: Install Dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
- name: Subgraph Auth
run: yarn graph-auth -- ${{ secrets.THEGRAPH_API_KEY }}
# Goerli
- name: Code Generator Goerli
run: npm run codegen-goerli
- name: Build Goerli
run: npm run build-goerli
- name: Goerli Test
run: npm run test-goerli
- name: Subgraph Deploy Goerli
run: npm run deploy-goerli
30 changes: 30 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build
on:
push:
branches:
- qa
jobs:
build_test_deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
registry-url: 'https://npm.pkg.github.com'
scope: '@oriumnetwork'
- name: Install Dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
# Goerli
- name: Code Generator Goerli
run: npm run codegen-goerli
- name: Build Goerli
run: npm run build-goerli
- name: Goerli Test
run: npm run test-goerli
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules

#build
build/
generated/

#tests
tests/.latest.json
tests/.bin/

#subgraph
subgraph.yaml
2 changes: 2 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const config = require('@oriumnetwork/orium-commons/lint/lintstaged-config')
module.exports = config
2 changes: 2 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const config = require('@oriumnetwork/orium-commons/prettier/prettier-config')
module.exports = config
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# roles-subgraph
A set of subgraphs (one for each network) for Orium Network dapps
# Orium NFT Roles Subgraph
[![License: CC0 v1](https://img.shields.io/badge/License-CC0v1-blue.svg)](https://creativecommons.org/publicdomain/zero/1.0/legalcode)
![Github Badge](https://github.com/OriumNetwork/roles-subgraph/actions/workflows/master.yaml/badge.svg)
[![Discord](https://img.shields.io/discord/1009147970832322632?label=discord&logo=discord&logoColor=white)](https://discord.gg/NaNTgPK5rx)
[![Twitter Follow](https://img.shields.io/twitter/follow/oriumnetwork?label=Follow&style=social)](https://twitter.com/OriumNetwork)

Orium NFT Roles Subgraph is a subgraph for the Orium Roles Register Contracts.

## Get Started

```shell
npm ci
npm run test-goerli
```

## Generate Schema (goerli)

To generate schema for a subgraph in a different network, **goerli** just change the network parameter to the preference.

**goerli**

```shell
cp subgraph-goerli.yaml subgraph.yaml && graph codegen subgraph.yaml
```

## Build (goerli)

To build a subgraph in a different network, **goerli**, just change the network parameter to the preference.

**goerli**

```shell
cp graph build subgraph.yaml
```

## Deploy subgraph (goerli)

To deploy contract in a different network, **goerli** or **goerli**, just change the network parameter to the preference.

**goerli**

```shell
graph deploy --node https://api.thegraph.com/deploy/ orium-network/nft-roles-goerli
```
Loading

0 comments on commit 0574df5

Please sign in to comment.