-
Notifications
You must be signed in to change notification settings - Fork 4
/
subgraph.yaml
156 lines (156 loc) · 4.99 KB
/
subgraph.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
specVersion: 0.0.2
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ERC1155
network: mainnet
source:
abi: ERC1155
startBlock: 5806610
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- NftContract
- Nft
abis:
- name: ERC1155
file: ./abis/IERC1155.json
- name: ERC1155Metadata
file: ./abis/IERC1155MetadataURI.json
- name: ERC721
file: ./abis/IERC721.json
- name: ERC721Metadata
file: ./abis/IERC721Metadata.json
eventHandlers:
- event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[])
handler: handleTransferBatchErc1155
- event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)
handler: handleTransferSingleErc1155
- event: URI(string,indexed uint256)
handler: handleURI
file: ./src/mapping-generic-erc1155.ts
- kind: ethereum/contract
name: ERC721
network: mainnet
source:
abi: ERC721
startBlock: 5806610
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- NftContract
- Nft
abis:
- name: ERC721
file: ./abis/IERC721.json
- name: ERC721Metadata
file: ./abis/IERC721Metadata.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransferErc721
file: ./src/mapping-generic-erc721.ts
######################## NON STANDARD NFTS ################################
# CryptoKitties non-standard
- kind: ethereum/contract
name: CryptoKitties
network: mainnet
source:
address: "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d"
startBlock: 4605167 # 13010732
abi: KittyCore
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- NftContract
- Nft
abis:
- name: KittyCore
file: ./abis/KittyCore.json
- name: ERC721
file: ./abis/IERC721.json
- name: ERC721Metadata
file: ./abis/IERC721Metadata.json
eventHandlers:
- event: Approval(address,address,uint256)
handler: handleApproval
- event: Birth(address,uint256,uint256,uint256,uint256)
handler: handleBirth
- event: ContractUpgrade(address)
handler: handleContractUpgrade
- event: Pregnant(address,uint256,uint256,uint256)
handler: handlePregnant
- event: Transfer(address,address,uint256)
handler: handleTransfer
file: ./src/mapping-cryptokitties.ts
# CryptoPunks non-standard
- kind: ethereum/contract
name: CryptoPunks
network: mainnet
source:
address: "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB"
startBlock: 3914495 # 13010732 <- recent block
abi: CryptoPunk
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- NftContract
- Nft
abis:
- name: CryptoPunk
file: ./abis/CryptoPunk.json
- name: ERC721
file: ./abis/IERC721.json
- name: ERC721Metadata
file: ./abis/IERC721Metadata.json
eventHandlers:
- event: Assign(indexed address,uint256)
handler: handleAssign
- event: PunkBidEntered(indexed uint256,uint256,indexed address)
handler: handlePunkBidEntered
- event: PunkBidWithdrawn(indexed uint256,uint256,indexed address)
handler: handlePunkBidWithdrawn
- event: PunkBought(indexed uint256,uint256,indexed address,indexed address)
handler: handlePunkBought
- event: PunkNoLongerForSale(indexed uint256)
handler: handlePunkNoLongerForSale
- event: PunkOffered(indexed uint256,uint256,indexed address)
handler: handlePunkOffered
- event: PunkTransfer(indexed address,indexed address,uint256)
handler: handlePunkTransfer
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
file: ./src/mapping-cryptopunks.ts
#########################################################################################################
templates:
- kind: ethereum/contract
name: NftContract
network: mainnet
source:
abi: ERC721
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- NftContract
- Nft
- NftOwner
- ContractOwner
abis:
- name: ERC721
file: ./abis/IERC721.json
- name: ERC721Metadata
file: ./abis/IERC721Metadata.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransferErc721
file: ./src/mapping-generic-erc721.ts