Skip to content

Commit

Permalink
Refactor to updated ERC (#3)
Browse files Browse the repository at this point in the history
Refactor to updated ERC
  • Loading branch information
ernanirst committed Oct 17, 2023
1 parent 4787e56 commit b76fae7
Show file tree
Hide file tree
Showing 31 changed files with 1,291 additions and 1,102 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
const config = require('@oriumnetwork/orium-commons/lint/eslint-config')
config.rules['@typescript-eslint/ban-types'] = ['warn', { types: { BigInt: false }, extendDefaults: true }]
module.exports = config
14 changes: 9 additions & 5 deletions .github/workflows/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

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

jobs:
build_test_deploy:
Expand All @@ -14,16 +14,20 @@ jobs:
uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
node-version: 18
registry-url: 'https://npm.pkg.github.com'
scope: '@oriumnetwork'
- name: Install Dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
- name: Code Generator
run: npm run codegen:goerli
- name: Build
- name: Lint
run: npm run lint
- name: Build Goerli
run: npm run build:goerli
- name: Build Mumbai
run: npm run build:mumbai
- name: Build Polygon
run: npm run build:polygon
- name: Test
run: npm run test
33 changes: 0 additions & 33 deletions .github/workflows/dev.yaml

This file was deleted.

25 changes: 18 additions & 7 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,31 @@ jobs:
uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
node-version: 18
registry-url: 'https://npm.pkg.github.com'
scope: '@oriumnetwork'
- name: Install Dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
- name: Code Generator
run: npm run codegen:goerli
- name: Build
- name: Lint
run: npm run lint
- name: Subgraph Auth
run: yarn graph:auth -- ${{ secrets.THEGRAPH_API_KEY }}
- name: Build Goerli
run: npm run build:goerli
- name: Test
run: npm run test
- name: Subgraph Auth
run: yarn graph:auth -- ${{ secrets.THEGRAPH_API_KEY }}
- name: Subgraph Deploy
- name: Deploy Goerli Hosted Service
run: npm run deploy:goerli
- name: Build Mumbai
run: npm run build:mumbai
# - name: Deploy Mumbai Hosted Service
# run: npm run deploy:mumbai
- name: Build Polygon
run: npm run build:polygon
- name: Subgraph Deploy Polygon Satsuma
run: npx graph deploy orium-subgraph --version-label ${{ github.sha }} --node https://app.satsuma.xyz/api/subgraphs/deploy --ipfs https://ipfs.satsuma.xyz --deploy-key ${{ secrets.SATSUMA_DEPLOY_KEY }}
- name: Subgraph Promote Polygon Satsuma
run: |
curl -X POST https://app.satsuma.xyz/api/subgraphs/8c268d3e8b83112a7d0c732a9b88ba1c732da600bffaf68790171b9a0b5d5394/orium-subgraph/${{ github.sha }}/auto-promote-live -H "Content-Type: application/json" -H "x-api-key: ${{ secrets.SATSUMA_DEPLOY_KEY }}"
21 changes: 13 additions & 8 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,25 @@ jobs:
uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
node-version: 18
registry-url: 'https://npm.pkg.github.com'
scope: '@oriumnetwork'
- name: Install Dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
- name: Code Generator
run: npm run codegen:goerli
- name: Build
- name: Lint
run: npm run lint
- name: Build Goerli
run: npm run build:goerli
- name: Build Mumbai
run: npm run build:mumbai
- name: Build Polygon
run: npm run build:polygon
- name: Test
run: npm run test
- name: Subgraph Auth
run: yarn graph:auth -- ${{ secrets.THEGRAPH_API_KEY }}
- name: Subgraph Deploy
run: npm run deploy:goerli
- name: Delete Satsuma Polygon QA
run: |
curl -X DELETE https://app.satsuma.xyz/api/subgraphs/8c268d3e8b83112a7d0c732a9b88ba1c732da600bffaf68790171b9a0b5d5394/polygon-roles-registry/qa/delete -H 'x-api-key: ${{ secrets.SATSUMA_DEPLOY_KEY }}'
- name: Deploy Satsuma Polygon QA
run: npx graph deploy polygon-roles-registry --version-label qa --node https://app.satsuma.xyz/api/subgraphs/deploy --ipfs https://ipfs.satsuma.xyz --deploy-key ${{ secrets.SATSUMA_DEPLOY_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.idea

#build
build/
Expand Down
36 changes: 10 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,28 @@
# 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.
The Roles Subgraph is a subgraph for tracking the state of [ERC-7432](https://eips.ethereum.org/EIPS/eip-7432) roles.

## Get Started

Get started by installing dependencies, building the project and running the tests.

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

## Generate Schema (goerli)
## Build Project

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

**goerli**
Building subgraphs consist in generating the code and building the project against a manifest file. This repository
provides a subgraph manifest for each network supported. You can build the project for **Goerli** with the following
command:

```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 b76fae7

Please sign in to comment.