Skip to content

Commit

Permalink
Add rari fuse pools support (#40)
Browse files Browse the repository at this point in the history
* Add rari fuse pools support

* Refactor subgraph tasks

* Remove reference to stakewise subgraph
  • Loading branch information
tsudmi authored Jan 11, 2022
1 parent f482468 commit efd692d
Show file tree
Hide file tree
Showing 18 changed files with 2,041 additions and 49 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Run network prepare
- name: Build subgraph
env:
NETWORK: ${{ matrix.network }}
run: yarn prepare:$NETWORK

- name: Run codegen
run: yarn codegen

- name: Build project
run: yarn build
run: yarn build:$NETWORK
13 changes: 1 addition & 12 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,11 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Run network prepare
env:
NETWORK: ${{ matrix.network }}
run: yarn prepare:$NETWORK

- name: Run codegen
run: yarn run codegen

- name: Build project
run: yarn run build

- name: Install Graph CLI
run: |
yarn global add @graphprotocol/graph-cli
graph auth https://api.thegraph.com/deploy/ ${{ secrets.THEGRAPH_TOKEN }}
- name: Deploy Subgraphs
env:
NETWORK: ${{ matrix.network }}
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stakewise-subgraphs",
"version": "0.1.0",
"version": "1.0.5",
"description": "Subgraphs for the StakeWise Protocol",
"repository": "https://github.com/stakewise/subgraphs",
"license": "AGPL-3.0-only",
Expand All @@ -10,13 +10,11 @@
"subgraphs/*"
],
"scripts": {
"codegen": "yarn workspaces run codegen",
"build": "yarn workspaces run build",
"prepare:goerli": "yarn workspaces run prepare:goerli",
"prepare:mainnet": "yarn workspaces run prepare:mainnet",
"build:goerli": "yarn workspaces run build:goerli",
"build:mainnet": "yarn workspaces run build:mainnet",
"create:local": "yarn workspaces run create:local",
"deploy:mainnet": "yarn workspaces run deploy:mainnet",
"deploy:goerli": "yarn workspaces run deploy:goerli",
"deploy:mainnet": "yarn workspaces run deploy:mainnet",
"deploy:local": "yarn workspaces run deploy:local"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/constants/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "const",
"version": "0.1.0",
"version": "1.0.5",
"license": "AGPL-3.0-only",
"main": "index.ts",
"scripts": {
"codegen": "true",
"build": "true",
"prepare:goerli": "mustache ../../config/goerli.json index.template.ts > index.ts",
"prepare:mainnet": "mustache ../../config/mainnet.json index.template.ts > index.ts",
"build:goerli": "yarn prepare:goerli",
"build:mainnet": "yarn prepare:mainnet",
"create:local": "true",
"deploy:mainnet": "true",
"deploy:goerli": "true",
"deploy:goerli": "yarn build:goerli",
"deploy:mainnet": "yarn build:mainnet",
"deploy:local": "true"
}
}
12 changes: 6 additions & 6 deletions subgraphs/ethereum/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "ethereum",
"version": "0.1.1",
"version": "1.0.5",
"license": "AGPL-3.0-only",
"scripts": {
"codegen": "graph codegen subgraph.yaml",
"build": "graph build subgraph.yaml",
"prepare:goerli": "mustache config/goerli.json subgraph.template.yaml > subgraph.yaml",
"prepare:mainnet": "mustache config/mainnet.json subgraph.template.yaml > subgraph.yaml",
"build:goerli": "yarn prepare:goerli && graph codegen subgraph.yaml && graph build subgraph.yaml",
"build:mainnet": "yarn prepare:mainnet && graph codegen subgraph.yaml && graph build subgraph.yaml",
"create:local": "graph create --node $GRAPH_NODE_URL stakewise/ethereum",
"deploy:mainnet": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ stakewise/ethereum-mainnet",
"deploy:goerli": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ stakewise/ethereum-goerli",
"deploy:local": "graph deploy --version-label 0.1.1 --node $GRAPH_NODE_URL --ipfs $IPFS_URL stakewise/ethereum"
"deploy:mainnet": "yarn build:mainnet && graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ stakewise/ethereum-mainnet",
"deploy:goerli": "yarn build:goerli && graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ stakewise/ethereum-goerli",
"deploy:local": "graph deploy --version-label 1.0.5 --node $GRAPH_NODE_URL --ipfs $IPFS_URL stakewise/ethereum"
}
}
15 changes: 15 additions & 0 deletions subgraphs/rari-fuse/config/mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"network": "mainnet",
"sETH2_149": {
"address": "0x18f49849d20bc04059fe9d775df9a38cd1f5ec9f",
"startBlock": "13976410"
},
"sETH2_46": {
"address": "0x83d534ab1d4002249b0e6d22410b62cf31978ca2",
"startBlock": "13398765"
},
"rewardEthToken": {
"address": "0x20bc832ca081b91433ff6c17f85701b6e92486c5",
"startBlock": "13298766"
}
}
15 changes: 15 additions & 0 deletions subgraphs/rari-fuse/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "rari-fuse",
"version": "1.0.5",
"license": "AGPL-3.0-only",
"scripts": {
"prepare:goerli": "true",
"prepare:mainnet": "mustache config/mainnet.json subgraph.template.yaml > subgraph.yaml",
"build:goerli": "yarn prepare:goerli",
"build:mainnet": "yarn prepare:mainnet && graph codegen subgraph.yaml && graph build subgraph.yaml",
"create:local": "graph create --node $GRAPH_NODE_URL stakewise/rari-fuse",
"deploy:mainnet": "yarn build:mainnet && graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ stakewise/rari-fuse-mainnet",
"deploy:goerli": "yarn build:goerli",
"deploy:local": "graph deploy --version-label 1.0.5 --node $GRAPH_NODE_URL --ipfs $IPFS_URL stakewise/rari-fuse"
}
}
Loading

0 comments on commit efd692d

Please sign in to comment.