forked from itsjerryokolo/CryptoPunks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.yaml
162 lines (162 loc) · 4.92 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
157
158
159
160
161
162
specVersion: 0.0.4
description: "Subgraph for the CryptoPunks marketplace"
repository: "https://github.com/itsjerryokolo/cryptopunks"
schema:
file: ./schema.graphql
# features:
# - grafting
# graft:
# base: QmaWuaC2x6YV8GZVNWizKtuYkyZqPGCfKMdEB15i6DYZpx
# block: 15205322
dataSources:
- kind: ethereum/contract
name: cryptopunks
network: mainnet
source:
address: "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB"
abi: cryptopunks
startBlock: 3914494
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Account
- Punk
- NFT
- Transfer
- MetaData
- Trait
- WrappedPunk
- Assign
- Offer
- Transfer
- Sale
abis:
- name: cryptopunks
file: ./abis/cryptopunks.json
eventHandlers:
- event: Assign(indexed address,uint256)
handler: handleAssign
- event: PunkTransfer(indexed address,indexed address,uint256)
handler: handlePunkTransfer
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: PunkOffered(indexed uint256,uint256,indexed address)
handler: handlePunkOffered
- 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
file: ./src/mapping.ts
- kind: ethereum/contract
name: WrappedPunks
network: mainnet
source:
address: "0xb7F7F6C52F2e2fdb1963Eab30438024864c313F6"
abi: WrappedPunks
startBlock: 10821736
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ProxyRegistered
abis:
- name: WrappedPunks
file: ./abis/WrappedPunks.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleWrappedPunkTransfer
- event: ProxyRegistered(address,address)
handler: handleProxyRegistered
file: ./src/mapping.ts
- kind: ethereum/contract
name: ERC721Sale
network: mainnet
source:
address: "0x131aebbfe55bca0c9eaad4ea24d386c5c082dd58"
startBlock: 10786971 #contract created before wrappedPunks
abi: ERC721Sale
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Account
abis:
- name: ERC721Sale
file: ./abis/ERC721Sale.json
- name: WrappedPunks
file: ./abis/WrappedPunks.json
eventHandlers:
- event: Buy(indexed address,indexed uint256,address,address,uint256,uint256)
handler: handleBuy
file: ./src/marketplaces/ERC721Sale.ts
- kind: ethereum/contract
name: RaribleExchangeV1
network: mainnet
source:
address: "0xcd4ec7b66fbc029c116ba9ffb3e59351c20b5b06"
startBlock: 11274515
abi: RaribleExchangeV1
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Buy
abis:
- name: RaribleExchangeV1
file: ./abis/RaribleExchangeV1.json
- name: WrappedPunks
file: ./abis/WrappedPunks.json
eventHandlers:
- event: Buy(indexed address,indexed uint256,uint256,address,address,uint256,uint256,address,uint256,uint256)
handler: handleExchangeV1Buy
file: ./src/marketplaces/RaribleExchangeV1.ts
- kind: ethereum/contract
name: Opensea
network: mainnet
source:
address: "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b"
startBlock: 5774644
abi: Opensea
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Account
abis:
- name: Opensea
file: ./abis/Opensea.json
- name: WrappedPunks
file: ./abis/WrappedPunks.json
eventHandlers:
- event: OrdersMatched(bytes32,bytes32,indexed address,indexed address,uint256,indexed bytes32)
handler: handleOpenSeaSale
file: ./src/marketplaces/OpenSea.ts
- kind: ethereum/contract
name: CryptoPunksData
network: mainnet
source:
address: "0x16F5A35647D6F03D5D3da7b35409D65ba03aF3B2"
startBlock: 13047091
abi: CryptoPunksData
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Punk
abis:
- name: CryptoPunksData
file: ./abis/CryptoPunksData.json
blockHandlers:
- handler: handleBlock
file: ./src/data.ts