Skip to content

Commit

Permalink
update first element logic mustache
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lima committed Oct 30, 2023
1 parent 459fbc6 commit 89731bd
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
5 changes: 3 additions & 2 deletions config/goerli.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"network": "goerli",
"erc721": [
{
"name": "ERC721",
"name": "AavegotchiDiamond",
"address": "0x450c91d1fe9f3d57b91218f6ff96f7994eec4d32",
"startBlock": 8099655
"startBlock": 8099655,
"isFirstElement": true
}
]
}
16 changes: 9 additions & 7 deletions config/mumbai.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
{
"network": "mumbai",
"erc721": [
{
"name": "ERC721",
{
"name": "AavegotchiDiamond",
"address": "0x83e73D9CF22dFc3A767EA1cE0611F7f50306622e",
"startBlock": 34467860
"startBlock": 34467860,
"isFirstElement": true
},
{
{
"name": "RealmDiamond",
"address": "0xBcCf68d104aCEa36b1EA20BBE8f06ceD12CaC008",
"startBlock": 38134604
}
],
"erc1155": [
{
"name": "ERC1155",
{
"name": "WearableDiamond",
"address": "0x1b1bcB49A744a09aEd636CDD9893508BdF1431A8",
"startBlock": 34467877
"startBlock": 34467877,
"isFirstElement": true
}
]
}
10 changes: 6 additions & 4 deletions config/polygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"network": "matic",
"erc721": [
{
"name": "ERC721",
"name": "AavegotchiDiamond",
"address": "0x86935f11c86623dec8a25696e1c19a8659cbf95d",
"startBlock": 11516320
"startBlock": 11516320,
"isFirstElement": true
},
{
"name": "RealmDiamond",
Expand All @@ -19,9 +20,10 @@
],
"erc1155": [
{
"name": "ERC1155",
"name": "WearableDiamond",
"address": "0x58de9aabcaeec0f69883c94318810ad79cc6a44f",
"startBlock": 35999793
"startBlock": 35999793,
"isFirstElement": true
}
]
}
12 changes: 12 additions & 0 deletions subgraph.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ schema:
dataSources:

{{#erc721}}
{{#isFirstElement}}
- name: ERC721
{{/isFirstElement}}
{{^isFirstElement}}
- name: {{name}}
{{/isFirstElement}}
kind: ethereum
network: {{network}}
source:
Expand All @@ -28,7 +33,12 @@ dataSources:
{{/erc721}}

{{#erc1155}}
{{#isFirstElement}}
- name: ERC1155
{{/isFirstElement}}
{{^isFirstElement}}
- name: {{name}}
{{/isFirstElement}}
kind: ethereum
network: {{network}}
source:
Expand Down Expand Up @@ -70,6 +80,8 @@ dataSources:
abis:
- name: ERC7432
file: ./abis/ERC7432.json
- name: ERC721
file: ./abis/ERC721.json
eventHandlers:
- event: RoleGranted(indexed bytes32,indexed address,indexed uint256,address,address,uint64,bool,bytes)
handler: handleRoleGranted
Expand Down

0 comments on commit 89731bd

Please sign in to comment.