forked from subquery/tutorials-frontier-evm-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.yaml
55 lines (47 loc) · 2.16 KB
/
project.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
specVersion: "0.2.0"
name: "Moonriver EVM Starter Project"
version: "1.0.0"
description: "A basic Moonriver EVM example project with an event and call handler. Read more about this at https://doc.subquery.network/create/moonbeam/"
repository: "https://github.com/subquery/tutorials-moonriver-evm-starter"
schema:
file: "./schema.graphql"
network:
genesisHash: '0x401a1f9dca3da46f5c4091016c8a2f26dcea05865116b286f60f668207d1474b' # Genesis hash of Moonriver
endpoint: wss://moonriver.api.onfinality.io/public-ws
# Optionally provide the HTTP endpoint of a full chain dictionary to speed up processing
dictionary: 'https://api.subquery.network/sq/subquery/moonriver-dictionary'
chaintypes:
file: "./types.yaml"
dataSources:
- kind: substrate/Moonbeam
startBlock: 837852
processor:
file: './node_modules/@subql/contract-processors/dist/moonbeam.js'
options:
# Must be a key of assets
abi: erc20
# Contract address (or recipient if transfer) to filter, if `null` should be for contract creation
address: null
assets:
erc20:
file: './erc20.abi.json'
mapping:
file: './dist/index.js'
handlers:
- handler: handleMoonriverEvent
kind: substrate/MoonbeamEvent
filter:
## Topics that follow Ethereum JSON-RPC log filters
## https://docs.ethers.io/v5/concepts/events/
## With a couple of added benefits:
## - Values don't need to be 0 padded
## - Event fragments can be provided and automatically converted to their id
topics:
## Example valid values:
# - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
# - Transfer(address,address,u256)
# - Transfer(address from,address to,uint256 value)
## Example of OR filter, will capture Transfer or Approval events
# - - 'Transfer(address indexed from,address indexed to,uint256 value)'
# - 'Approval(address indexed owner, address indexed spender, uint256 value)'
- Transfer(address indexed from,address indexed to,uint256 value)