Skip to content

Commit

Permalink
included all updated subgraph manifests and new ci for non-deployable…
Browse files Browse the repository at this point in the history
… branches
  • Loading branch information
ernanirst committed Oct 17, 2023
1 parent 98fd5c2 commit f5b2fec
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 32 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:staged
- 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
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"scripts": {
"graph:auth": "graph auth --product hosted-service",
"build:goerli": "cp subgraph-goerli.yaml subgraph.yaml && graph codegen subgraph.yaml && graph build subgraph.yaml",
"build:mumbai": "cp subgraph-mumbai.yaml subgraph.yaml && graph codegen subgraph.yaml && graph build subgraph.yaml",
"build:polygon": "cp subgraph-polygon.yaml subgraph.yaml && graph codegen subgraph.yaml && graph build subgraph.yaml",
"deploy:goerli": "graph deploy --node https://api.thegraph.com/deploy/orium-network/nft-roles-goerli",
"test": "graph test",
"coverage": "graph test -- -c",
Expand Down
36 changes: 18 additions & 18 deletions subgraph-goerli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ specVersion: 0.0.4
schema:
file: ./schema.graphql
dataSources:
# (Chronos) Traveler
- kind: ethereum
name: Traveler

- name: ERC721-Chronos-Traveler
kind: ethereum
network: goerli
source:
address: '0x450c91d1fe9f3d57b91218f6ff96f7994eec4d32'
abi: ChronosTraveler
abi: ERC721
startBlock: 8099655
mapping:
kind: ethereum/events
Expand All @@ -18,20 +18,20 @@ dataSources:
- Nft
- Account
abis:
- name: ChronosTraveler
file: ./abis/ChronosTraveler.json
- name: ERC721
file: ./abis/ERC721.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTravelerTransfer
file: ./src/chronos/index.ts
# (ERC7432) Roles
- kind: ethereum
name: Roles
handler: handleErc721Transfer
file: ./src/erc721/index.ts

- name: ERC7432-Immutable-Roles
kind: ethereum
network: goerli
source:
address: '0x8680fC3Df31805B1F7f8BfB702f723460d360FE9'
abi: ERC7432Roles
startBlock: 9568669
address: '0xb2ad616e84e1ef7a9ed0fa3169aaf31ee51ea824'
abi: ERC7432
startBlock: 9815688
mapping:
kind: ethereum/events
apiVersion: 0.0.6
Expand All @@ -41,11 +41,11 @@ dataSources:
- Account
- Role
abis:
- name: ERC7432Roles
file: ./abis/ERC7432Roles.json
- name: ERC7432
file: ./abis/ERC7432.json
eventHandlers:
- event: RoleGranted(indexed bytes32,indexed address,indexed uint256,address,uint64,bytes)
- event: RoleGranted(indexed bytes32,indexed address,indexed uint256,address,address,uint64,bool,bytes)
handler: handleRoleGranted
- event: RoleRevoked(indexed bytes32,indexed address,indexed uint256,address)
- event: RoleRevoked(indexed bytes32,indexed address,indexed uint256,address,address)
handler: handleRoleRevoked
file: ./src/erc7432/index.ts
22 changes: 12 additions & 10 deletions subgraph-mumbai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ specVersion: 0.0.4
schema:
file: ./schema.graphql
dataSources:
# (ERC7432) Roles
- kind: ethereum
name: Roles

# There is no "(Chronos) Traveler" on Mumbai

- name: ERC7432-Immutable-Roles
kind: ethereum
network: mumbai
source:
address: '0x8680fC3Df31805B1F7f8BfB702f723460d360FE9'
abi: ERC7432Roles
startBlock: 39322273
address: '0xb2ad616e84e1ef7a9ed0fa3169aaf31ee51ea824'
abi: ERC7432
startBlock: 40877849
mapping:
kind: ethereum/events
apiVersion: 0.0.6
Expand All @@ -19,11 +21,11 @@ dataSources:
- Account
- Role
abis:
- name: ERC7432Roles
file: ./abis/ERC7432Roles.json
- name: ERC7432
file: ./abis/ERC7432.json
eventHandlers:
- event: RoleGranted(indexed bytes32,indexed address,indexed uint256,address,uint64,bytes)
- event: RoleGranted(indexed bytes32,indexed address,indexed uint256,address,address,uint64,bool,bytes)
handler: handleRoleGranted
- event: RoleRevoked(indexed bytes32,indexed address,indexed uint256,address)
- event: RoleRevoked(indexed bytes32,indexed address,indexed uint256,address,address)
handler: handleRoleRevoked
file: ./src/erc7432/index.ts
51 changes: 51 additions & 0 deletions subgraph-polygon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
specVersion: 0.0.4
schema:
file: ./schema.graphql
dataSources:

- name: ERC721-Chronos-Traveler
kind: ethereum
network: polygon
source:
address: '0xa03C4E40d1fCaa826591007a17Ca929ef8AdBF1C'
abi: ERC721
startBlock: 36796276
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Nft
- Account
abis:
- name: ERC721
file: ./abis/ERC721.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleErc721Transfer
file: ./src/erc721/index.ts

- name: ERC7432-Immutable-Roles
kind: ethereum
network: polygon
source:
address: '0xb2ad616e84e1ef7a9ed0fa3169aaf31ee51ea824'
abi: ERC7432
startBlock: 48672001
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Nft
- Account
- Role
abis:
- name: ERC7432
file: ./abis/ERC7432.json
eventHandlers:
- event: RoleGranted(indexed bytes32,indexed address,indexed uint256,address,address,uint64,bool,bytes)
handler: handleRoleGranted
- event: RoleRevoked(indexed bytes32,indexed address,indexed uint256,address,address)
handler: handleRoleRevoked
file: ./src/erc7432/index.ts

0 comments on commit f5b2fec

Please sign in to comment.