Skip to content

Commit

Permalink
included cronos network
Browse files Browse the repository at this point in the history
  • Loading branch information
ernanirst committed Nov 16, 2023
1 parent 0e5b696 commit 722dbeb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build Mumbai
run: npm run build:mumbai
- name: Build Cronos
run: npm run build:cronos
- name: Build Polygon
run: npm run build:polygon
- name: Test
run: npm run test

4 changes: 4 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
run: npm run build:mumbai
- name: Deploy Mumbai Hosted Service
run: npm run deploy:mumbai
- name: Build Cronos
run: npm run build:cronos
- name: Deploy Self-hosted Cronos
run: npx graph deploy --node ${SELF_HOSTED_SUBGRAPH_URL} --version-label ${{ github.sha }} cronos-mainnet_prod_nft-roles
- name: Build Polygon
run: npm run build:polygon
- name: Test
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GHB_TOKEN }}
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build Mumbai
run: npm run build:mumbai
- name: Build Cronos
run: npm run build:cronos
- name: Deploy Self-hosted Cronos QA
run: npx graph deploy --node ${SELF_HOSTED_SUBGRAPH_URL} --version-label qa cronos-mainnet_qa_nft-roles
- name: Build Polygon
run: npm run build:polygon
- name: Test
run: npm run test
- name: Delete Satsuma Polygon QA
run: |
curl -X DELETE https://subgraphs.alchemy.com/api/subgraphs/8c268d3e8b83112a7d0c732a9b88ba1c732da600bffaf68790171b9a0b5d5394/polygon-roles-registry/qa/delete -H 'x-api-key: ${{ secrets.SATSUMA_DEPLOY_KEY }}'
Expand Down
11 changes: 11 additions & 0 deletions config/cronos-mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"isSelfHosted": true,
"network": "cronos-mainnet",
"ERC721": [
{
"name": "BoredCandyCity",
"address": "0xe1049178296ce004996afb16b0816c5a95ac8482",
"startBlock": 5203166
}
]
}
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
},
"scripts": {
"graph:auth": "graph auth --product hosted-service",
"build:goerli": "node mustache.config.js goerli && graph codegen subgraph.yaml && graph build subgraph.yaml",
"build:mumbai": "node mustache.config.js mumbai && graph codegen subgraph.yaml && graph build subgraph.yaml",
"build:polygon": "node mustache.config.js polygon && graph codegen subgraph.yaml && graph build subgraph.yaml",
"deploy:goerli": "graph deploy --node https://api.thegraph.com/deploy/ orium-network/nft-roles-goerli",
"build:cronos-mainnet": "node mustache.config.js cronos-mainnet && graph codegen subgraph.yaml && graph build subgraph.yaml",
"deploy:mumbai": "graph deploy --node https://api.thegraph.com/deploy/ orium-network/nft-roles-mumbai",
"deploy:polygon": "graph deploy --node https://api.thegraph.com/deploy/ orium-network/nft-roles-polygon",
"test": "graph test",
"test": "node mustache.config.js polygon && graph codegen subgraph.yaml && graph test",
"coverage": "graph test -- -c",
"lint": "npx eslint src/",
"lint:fix": "npx eslint src/ --fix && npx prettier --write .",
Expand Down
5 changes: 4 additions & 1 deletion subgraph.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ dataSources:
network: {{network}}
source:
abi: ERC7432
{{#isSelfHosted}}
startBlock: 1
{{/isSelfHosted}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
Expand All @@ -79,4 +82,4 @@ dataSources:
handler: handleRoleRevoked
- event: RoleApprovalForAll(indexed address,indexed address,bool)
handler: handleRoleApprovalForAll
file: ./src/erc7432/index.ts
file: ./src/erc7432/index.ts

0 comments on commit 722dbeb

Please sign in to comment.