Skip to content

Commit 437c6ab

Browse files
committed
feat: placeholders and manifest changes for delegation
1 parent f66e5bd commit 437c6ab

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

src/mappings/horizonStaking.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { BigInt } from '@graphprotocol/graph-ts'
22
import { addresses } from '../../config/addresses'
3-
import { DelegationFeeCutSet, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, TokensDeprovisioned, TokensToDelegationPoolAdded } from '../types/HorizonStaking/HorizonStaking'
3+
import { DelegatedTokensWithdrawn, DelegationFeeCutSet, DelegationSlashed, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, StakeDelegatedWithdrawn, TokensDelegated, TokensDeprovisioned, TokensToDelegationPoolAdded, TokensUndelegated } from '../types/HorizonStaking/HorizonStaking'
44
import { Indexer, ThawRequest } from '../types/schema'
55
import { createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, updateDelegationExchangeRate } from './helpers/helpers'
66
import {
@@ -279,4 +279,26 @@ export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolA
279279

280280
graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.tokens)
281281
graphNetwork.save()
282+
}
283+
284+
// Delegation
285+
286+
export function handleTokensDelegated(event: TokensDelegated): void {
287+
// To Do
288+
}
289+
290+
export function handleDelegationSlashed(event: DelegationSlashed): void {
291+
// To Do
292+
}
293+
294+
export function handleTokensUndelegated(event: TokensUndelegated): void {
295+
// To Do
296+
}
297+
298+
export function handleDelegatedTokensWithdrawn(event: DelegatedTokensWithdrawn): void {
299+
// To Do
300+
}
301+
302+
export function handleStakeDelegatedWithdrawn(event: StakeDelegatedWithdrawn): void {
303+
// To Do
282304
}

subgraph.template.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,16 @@ dataSources:
429429
handler: handleDelegationFeeCutSet
430430
- event: TokensToDelegationPoolAdded(indexed address,indexed address,uint256)
431431
handler: handleTokensToDelegationPoolAdded
432+
- event: TokensDelegated(indexed address,indexed address,indexed address,uint256,uint256)
433+
handler: handleTokensDelegated
434+
- event: DelegationSlashed(indexed address,indexed address,uint256)
435+
handler: handleDelegationSlashed
436+
- event: TokensUndelegated(indexed address,indexed address,indexed address,uint256)
437+
handler: handleTokensUndelegated
438+
- event: DelegatedTokensWithdrawn(indexed address,indexed address,indexed address,uint256)
439+
handler: handleDelegatedTokensWithdrawn
440+
- event: StakeDelegatedWithdrawn(indexed address,indexed address,uint256)
441+
handler: handleStakeDelegatedWithdrawn
432442
- kind: ethereum/contract
433443
name: SubgraphService
434444
network: {{network}}

0 commit comments

Comments
 (0)