-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathproject.yaml
74 lines (64 loc) · 2.69 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
specVersion: "0.2.0"
name: "evm-starter"
version: "0.0.0"
description: ""
repository: "https://github.com/subquery/subql-starter"
schema:
file: "./schema.graphql"
network:
genesisHash: '0x401a1f9dca3da46f5c4091016c8a2f26dcea05865116b286f60f668207d1474b' # Moonriver
endpoint: wss://moonriver.api.onfinality.io/public-ws
dictionary: https://sz.api.subquery.network/sq/subquery/moonriver-dictionary
chaintypes:
file: "./dist/chaintypes.js"
dataSources:
- kind: substrate/Moonbeam
startBlock: 752073
processor:
file: './node_modules/@subql/contract-processors/dist/moonbeam.js'
options:
# Must be a key of assets
abi: erc20
## The contract that emitted the event
address: '0x6bd193ee6d2104f14f94e2ca6efefae561a4334b'
assets:
erc20:
file: './erc20.abi.json'
mapping:
file: './dist/index.js'
handlers:
- handler: handleEnumEvent
kind: substrate/MoonbeamEvent
- 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,u256 value)
## Example of OR filter, will capture Transfer or Approval events
# - - 'Transfer(address indexed from,address indexed to,u256 value)'
# - 'Approval(address indexed owner, address indexed spender, u256 value)'
- Transfer(address indexed from,address indexed to,u256 value)
## topics[1] to topics[3] are the indexed values
- null
- null
- null
- handler: handleMoonriverCall
kind: substrate/MoonbeamCall
filter:
## The function can either be the method fragment or signature
# function: '0x095ea7b3'
# function: '0x7ff36ab500000000000000000000000000000000000000000000000000000000'
# function: approve(address,uint256)
function: approve(address to,uint256 value)
## Tx to field, this can be a contract address or user address
# to: '0x6bd193ee6d2104f14f94e2ca6efefae561a4334b'
## The transaction sender
# from: '0x6bd193ee6d2104f14f94e2ca6efefae561a4334b'