diff --git a/.github/workflows/all.yaml b/.github/workflows/all.yaml index eba4d62..8cff089 100644 --- a/.github/workflows/all.yaml +++ b/.github/workflows/all.yaml @@ -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 + diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index afbb227..12481f3 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -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 diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index 7453b73..e816713 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -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 }}' diff --git a/config/cronos-mainnet.json b/config/cronos-mainnet.json new file mode 100644 index 0000000..ca7806d --- /dev/null +++ b/config/cronos-mainnet.json @@ -0,0 +1,11 @@ +{ + "isSelfHosted": true, + "network": "cronos-mainnet", + "ERC721": [ + { + "name": "BoredCandyCity", + "address": "0xe1049178296ce004996afb16b0816c5a95ac8482", + "startBlock": 5203166 + } + ] +} diff --git a/package.json b/package.json index 7ff6eef..53b10a1 100644 --- a/package.json +++ b/package.json @@ -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 .", diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 1203296..216c436 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -58,6 +58,9 @@ dataSources: network: {{network}} source: abi: ERC7432 +{{#isSelfHosted}} + startBlock: 1 +{{/isSelfHosted}} mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -79,4 +82,4 @@ dataSources: handler: handleRoleRevoked - event: RoleApprovalForAll(indexed address,indexed address,bool) handler: handleRoleApprovalForAll - file: ./src/erc7432/index.ts \ No newline at end of file + file: ./src/erc7432/index.ts