-
Notifications
You must be signed in to change notification settings - Fork 7
/
subgraph.template.yaml
113 lines (113 loc) · 3.62 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
specVersion: 0.0.2
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: DydxToken
network: {{network}}
source:
address: "{{dydxTokenAddress}}"
abi: DydxToken
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- User
abis:
- name: DydxToken
file: ./abi/contracts/governance/token/DydxToken.sol/DydxToken.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTokenTransfer
- event: DelegatedPowerChanged(indexed address,uint256,uint8)
handler: handleTokenDelegation
file: ./src/token.ts
- kind: ethereum/contract
name: DydxGovernor
network: {{network}}
source:
address: "{{dydxGovernorAddress}}"
abi: DydxGovernor
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Proposal
- ProposalVote
abis:
- name: DydxGovernor
file: ./abi/contracts/governance/DydxGovernor.sol/DydxGovernor.json
eventHandlers:
- event: ProposalCreated(uint256,indexed address,indexed address,address[],uint256[],string[],bytes[],bool[],uint256,uint256,address,bytes32)
handler: handleProposalCreated
- event: VoteEmitted(uint256,indexed address,bool,uint256)
handler: handleVoteEmitted
file: ./src/proposal.ts
- kind: ethereum/contract
name: SafetyModule
network: {{network}}
source:
address: "{{safetyModuleAddress}}"
abi: SafetyModule
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- User
abis:
- name: SafetyModule
file: ./abi/contracts/safety/v1/SafetyModuleV1.sol/SafetyModuleV1.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleSafetyModuleTransfer
- event: DelegatedPowerChanged(indexed address,uint256,uint8)
handler: handleSafetyModuleDelegation
- event: ClaimedRewards(indexed address,address,uint256)
handler: handleSafetyModuleClaimRewards
file: ./src/safety-module.ts
- kind: ethereum/contract
name: MerkleDistributor
network: {{network}}
source:
address: "{{merkleDistributorAddress}}"
abi: MerkleDistributor
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- User
abis:
- name: MerkleDistributor
file: ./abi/contracts/merkle-distributor/v1/MerkleDistributorV1.sol/MerkleDistributorV1.json
eventHandlers:
- event: RewardsClaimed(address,uint256)
handler: handleMerkleDistributorClaimRewards
file: ./src/merkle-distributor.ts
- kind: ethereum/contract
name: LiquidityStaking
network: {{network}}
source:
address: "{{liquidityStakingAddress}}"
abi: LiquidityStaking
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- User
abis:
- name: LiquidityStaking
file: ./abi/contracts/liquidity/v1/LiquidityStakingV1.sol/LiquidityStakingV1.json
eventHandlers:
- event: ClaimedRewards(indexed address,address,uint256)
handler: handleLiquidityStakingClaimedRewards
file: ./src/liquidity-staking.ts