-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsubgraph.yaml
32 lines (29 loc) · 1002 Bytes
/
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
# Subgraph composition is supported as of 1.3.0 spec version.
specVersion: 1.3.0
description: A subgraph that calculates the block time for each block.
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: BlockDataSource
network: mainnet
source:
# We are only using block data in the example, so an empty contract address is fine.
address: "0x0000000000000000000000000000000000000000"
# The same is true for ABI, an empty event is provided.
abi: BlockDataSource
# Randomly selected at a point of high activity on the network.
startBlock: 10000000
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- BlockTime
# We are only using block data in the example, so an empty event is fine.
abis:
- name: BlockDataSource
file: ./abis/BlockDataSource.json
blockHandlers:
- handler: handleBlock
file: ./src/mapping.ts