1- specVersion : 1.0 .0
1+ specVersion : 1.2 .0
22description : Subgraph for the Superfluid Protocol V1 contracts.
33repository : https://github.com/superfluid-finance/protocol-monorepo
44schema :
@@ -21,7 +21,7 @@ dataSources:
2121 entities :
2222 - CustomSuperTokenCreatedEvent
2323 - SuperTokenCreatedEvent
24- - SuperTokenLogicCreatedEvent
24+ - SuperTokenLogicCreatedEventß
2525 - Token
2626 - TokenStatistic
2727 abis :
@@ -37,12 +37,24 @@ dataSources:
3737 - event : SuperTokenCreated(indexed address)
3838 handler : handleSuperTokenCreated
3939 receipt : true
40+ calls :
41+ getHost : ISuperToken[event.params.token].getHost()
42+ getUnderlyingToken : ISuperToken[event.params.token].getUnderlyingToken()
43+ getSymbol : ISuperToken[event.params.token].symbol()
44+ getDecimals : ISuperToken[event.params.token].decimals()
4045 - event : CustomSuperTokenCreated(indexed address)
4146 handler : handleCustomSuperTokenCreated
4247 receipt : true
48+ calls :
49+ getHost : ISuperToken[event.params.token].getHost()
50+ getUnderlyingToken : ISuperToken[event.params.token].getUnderlyingToken()
51+ getSymbol : ISuperToken[event.params.token].symbol()
52+ getDecimals : ISuperToken[event.params.token].decimals()
4353 - event : SuperTokenLogicCreated(indexed address)
4454 handler : handleSuperTokenLogicCreated
4555 receipt : true
56+ calls :
57+ getHost : ISuperToken[event.params.token].getHost()
4658 - kind : ethereum/contract
4759 name : Host
4860 network : {{ network }}
@@ -126,6 +138,9 @@ dataSources:
126138 - event : FlowUpdated(indexed address,indexed address,indexed address,int96,int256,int256,bytes)
127139 handler : handleFlowUpdated
128140 receipt : true
141+ calls :
142+ balanceOfSender : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.sender)
143+ balanceOfReceiver : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.receiver)
129144 - event : FlowUpdatedExtension(indexed address,uint256)
130145 handler : handleFlowUpdatedExtension
131146 receipt : true
@@ -179,9 +194,12 @@ dataSources:
179194 - event : IndexDistributionClaimed(indexed address,indexed address,indexed uint32,address,uint256)
180195 handler : handleIndexDistributionClaimed
181196 receipt : true
197+ calls :
198+ balanceOfSubscriber : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.subscriber)
182199 - event : IndexUpdated(indexed address,indexed address,indexed uint32,uint128,uint128,uint128,uint128,bytes)
183200 handler : handleIndexUpdated
184201 receipt : true
202+ # TODO
185203 - event : IndexSubscribed(indexed address,indexed address,indexed uint32,address,bytes)
186204 handler : handleIndexSubscribed
187205 receipt : true
@@ -194,15 +212,25 @@ dataSources:
194212 - event : SubscriptionApproved(indexed address,indexed address,address,uint32,bytes)
195213 handler : handleSubscriptionApproved
196214 receipt : true
215+ calls :
216+ balanceOfSubscriber : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.subscriber)
197217 - event : SubscriptionDistributionClaimed(indexed address,indexed address,address,uint32,uint256)
198218 handler : handleSubscriptionDistributionClaimed
199219 receipt : true
220+ calls :
221+ balanceOfPublisher : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.publisher)
222+ balanceOfSubscriber : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.subscriber)
200223 - event : SubscriptionRevoked(indexed address,indexed address,address,uint32,bytes)
201224 handler : handleSubscriptionRevoked
202225 receipt : true
226+ calls :
227+ balanceOfSubscriber : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.subscriber)
203228 - event : SubscriptionUnitsUpdated(indexed address,indexed address,address,uint32,uint128,bytes)
204229 handler : handleSubscriptionUnitsUpdated
205230 receipt : true
231+ calls :
232+ balanceOfPublisher : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.publisher)
233+ balanceOfSubscriber : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.subscriber)
206234 - kind : ethereum/contract
207235 name : GeneralDistributionAgreementV1
208236 network : {{ network }}
@@ -247,15 +275,23 @@ dataSources:
247275 - event : FlowDistributionUpdated(indexed address,indexed address,indexed address,address,int96,int96,int96,address,int96,bytes)
248276 handler : handleFlowDistributionUpdated
249277 receipt : true
278+ calls :
279+ balanceOfDistributor : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.distributor)
250280 - event : InstantDistributionUpdated(indexed address,indexed address,indexed address,address,uint256,uint256,bytes)
251281 handler : handleInstantDistributionUpdated
252282 receipt : true
283+ calls :
284+ balanceOfDistributor : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.distributor)
253285 - event : PoolConnectionUpdated(indexed address,indexed address,indexed address,bool,bytes)
254286 handler : handlePoolConnectionUpdated
255287 receipt : true
288+ calls :
289+ balanceOfAccount : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.account)
256290 - event : PoolCreated(indexed address,indexed address,address)
257291 handler : handlePoolCreated
258292 receipt : true
293+ calls :
294+ balanceOfAdmin : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.admin)
259295 - kind : ethereum/contract
260296 name : ResolverV1
261297 network : {{ network }}
@@ -327,9 +363,17 @@ templates:
327363 - event : AgreementLiquidatedBy(address,indexed address,bytes32,indexed address,indexed address,uint256,uint256)
328364 handler : handleAgreementLiquidatedBy
329365 receipt : true
366+ calls :
367+ balanceOfLiquidator : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.liquidatorAccount)
368+ balanceOfPenalty : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.penaltyAccount)
369+ balanceOfBond : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.bondAccount)
330370 - event : AgreementLiquidatedV2(indexed address,bytes32,indexed address,indexed address,address,uint256,int256,bytes)
331371 handler : handleAgreementLiquidatedV2
332372 receipt : true
373+ calls :
374+ balanceOfLiquidator : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.liquidatorAccount)
375+ balanceOfTarget : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.targetAccount)
376+ balanceOfRewardReceiver : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.rewardAmountReceiver)
333377 - event : Burned(indexed address,indexed address,uint256,bytes,bytes)
334378 handler : handleBurned
335379 receipt : true
@@ -342,12 +386,18 @@ templates:
342386 - event : TokenUpgraded(indexed address,uint256)
343387 handler : handleTokenUpgraded
344388 receipt : true
389+ # Decided not to do calls here as the RPC call might not always happen.
345390 - event : TokenDowngraded(indexed address,uint256)
346391 handler : handleTokenDowngraded
347392 receipt : true
393+ # Decided not to do calls here as the RPC call might not always happen.
348394 - event : Transfer(indexed address,indexed address,uint256)
349395 handler : handleTransfer
350396 receipt : true
397+ calls :
398+ # Decided to parallelize here even though the RPC call might not always happen in the handler.
399+ balanceOfFrom : ISuperToken[event.address].realtimeBalanceOfNow(event.params.from)
400+ balanceOfTo : ISuperToken[event.address].realtimeBalanceOfNow(event.params.to)
351401 - event : Approval(indexed address,indexed address,uint256)
352402 handler : handleApproval
353403 receipt : true
@@ -452,6 +502,10 @@ templates:
452502 - event : MemberUnitsUpdated(indexed address,indexed address,uint128,uint128)
453503 handler : handleMemberUnitsUpdated
454504 receipt : true
505+ calls :
506+ balanceOfMember : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.member)
455507 - event : DistributionClaimed(indexed address,indexed address,int256,int256)
456508 handler : handleDistributionClaimed
457509 receipt : true
510+ calls :
511+ balanceOfMember : ISuperToken[event.params.token].realtimeBalanceOfNow(event.params.member)
0 commit comments