diff --git a/config/goerli.json b/config/goerli.json index d05f302..27275c3 100644 --- a/config/goerli.json +++ b/config/goerli.json @@ -2,9 +2,10 @@ "network": "goerli", "erc721": [ { - "name": "ERC721", + "name": "AavegotchiDiamond", "address": "0x450c91d1fe9f3d57b91218f6ff96f7994eec4d32", - "startBlock": 8099655 + "startBlock": 8099655, + "isFirstElement": true } ] } \ No newline at end of file diff --git a/config/mumbai.json b/config/mumbai.json index 3db4d64..ec966ce 100644 --- a/config/mumbai.json +++ b/config/mumbai.json @@ -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 } ] } \ No newline at end of file diff --git a/config/polygon.json b/config/polygon.json index e8d83ac..1d58a02 100644 --- a/config/polygon.json +++ b/config/polygon.json @@ -2,9 +2,10 @@ "network": "matic", "erc721": [ { - "name": "ERC721", + "name": "AavegotchiDiamond", "address": "0x86935f11c86623dec8a25696e1c19a8659cbf95d", - "startBlock": 11516320 + "startBlock": 11516320, + "isFirstElement": true }, { "name": "RealmDiamond", @@ -19,9 +20,10 @@ ], "erc1155": [ { - "name": "ERC1155", + "name": "WearableDiamond", "address": "0x58de9aabcaeec0f69883c94318810ad79cc6a44f", - "startBlock": 35999793 + "startBlock": 35999793, + "isFirstElement": true } ] } \ No newline at end of file diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 20b2268..bd1bb6a 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -4,7 +4,12 @@ schema: dataSources: {{#erc721}} + {{#isFirstElement}} + - name: ERC721 + {{/isFirstElement}} + {{^isFirstElement}} - name: {{name}} + {{/isFirstElement}} kind: ethereum network: {{network}} source: @@ -28,7 +33,12 @@ dataSources: {{/erc721}} {{#erc1155}} + {{#isFirstElement}} + - name: ERC1155 + {{/isFirstElement}} + {{^isFirstElement}} - name: {{name}} + {{/isFirstElement}} kind: ethereum network: {{network}} source: @@ -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