-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubgraph.template.yaml
160 lines (160 loc) · 5.83 KB
/
subgraph.template.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
specVersion: 0.0.4
description: OpenShelf-OpenDesk Subgraph
repository: https://github.com/OpenShelf-OpenDesk/subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Publisher
network: {network}
source:
address: "{{ Publisher Contract Address }}"
abi: Publisher
startBlock: {{Publisher Contract Start Block}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Book
- Series
- Edition
- EditionMetadata
- SeriesMetadata
abis:
- name: Publisher
file: ./abis/Publisher.json
eventHandlers:
- event: NewBookLaunched(uint256,indexed address,string,uint256,uint256,uint256,bool,indexed address)
handler: handleNewBookLaunched
- event: NewEditionLaunched(uint256,string,uint256,uint256,uint256,bool,indexed address)
handler: handleNewEditionLaunched
- event: NewSeriesCreated(uint256,string,indexed address)
handler: handleNewSeriesCreated
- event: AddedBookToSeries(uint256,uint256)
handler: handleAddedBookToSeries
file: ./mappings/Publisher.ts
- kind: ethereum/contract
name: Profile
network: mumbai
source:
address: "{{ Profile Contract Address }}"
abi: Profile
startBlock: {{Profile Contract Start Block}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- ReaderProfile
- ContributorProfile
abis:
- name: Profile
file: ./abis/Profile.json
eventHandlers:
- event: ReaderProfileUpdated(indexed address,string)
handler: handleReaderProfileUpdated
- event: ContributorProfileUpdated(indexed address,string)
handler: handleContributorProfileUpdated
file: ./mappings/Profile.ts
- kind: ethereum/contract
name: Exchange
network: {network}
source:
address: "{{ Exchange Contract Address }}"
abi: Exchange
startBlock: {{Exchange Contract Start Block}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Offer
abis:
- name: Exchange
file: ./abis/Exchange.json
eventHandlers:
- event: OfferMade(indexed address,uint256,indexed address,uint256)
handler: handleOfferMade
- event: OfferCancelled(indexed address,uint256,indexed address)
handler: handleOfferCancelled
- event: OfferAccepted(indexed address,uint256,indexed address)
handler: handleOfferAccepted
file: ./mappings/Exchange.ts
- kind: ethereum/contract
name: Rentor
network: {network}
source:
address: "{{ Rentor Contract Address }}"
abi: Rentor
startBlock: {{Rentor Contract Start Block}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Copy
- RentRecord
abis:
- name: Rentor
file: ./abis/Rentor.json
eventHandlers:
- event: BookPutOnRent(indexed address,uint256,int96)
handler: handleBookPutOnRent
- event: BookRemovedFromRent(indexed address,uint256)
handler: handleBookRemoveFromRent
- event: BookTakenOnRent(indexed address,uint256,indexed address,int96)
handler: handleBookTakenOnRent
- event: BookReturned(indexed address,uint256)
handler: handleBookReturned
file: ./mappings/Rentor.ts
templates:
- name: Edition
kind: ethereum/contract
network: {network}
source:
abi: Edition
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./mappings/Edition.ts
entities:
- Book
- Edition
- Copy
- DistributedCopy
- Contribution
- ContributorProfile
- ReaderProfile
abis:
- name: Edition
file: ./abis/Edition.json
eventHandlers:
- event: BookBought(uint256,indexed address,uint256)
handler: handleBookBought
- event: BookTransferred(uint256,indexed address)
handler: handleBookTransferred
- event: PriceUpdated(uint256)
handler: handlePriceUpdated
- event: MarketSupplyIncreased(uint256)
handler: handleMarketSupplyIncreased
- event: SupplyUnlimited()
handler: handleSupplyUnlimited
- event: SupplyLimited()
handler: handleSupplyLimited
- event: RoyaltyUpdated(uint256)
handler: handleRoyaltyUpdated
- event: BookRedeemed(uint256,uint256,indexed address)
handler: handleBookRedeemed
- event: ContributorAdded(indexed address,uint96,string,uint256)
handler: handleContributorAdded
- event: RevenueWithdrawn(uint256)
handler: handleRevenueWithdrawn
- event: BookLocked(uint256,indexed address)
handler: handleBookLocked
- event: BookUnlocked(uint256)
handler: handleBookUnlocked
features:
- fullTextSearch
- ipfsOnEthereumContracts