forked from subquery/cosmos-subql-starter
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathproject.yaml
141 lines (141 loc) · 4.58 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
specVersion: 1.0.0
name: juno-subql-starter
version: 0.0.1
runner:
node:
name: "@subql/node-cosmos"
version: ">=0.1.0"
query:
name: "@subql/query"
version: "*"
description: >-
Fetch ledger SubQuery project
repository: https://github.com/fetchai/ledger-subquery
schema:
file: ./schema.graphql
network:
chainId: dorado-1
endpoint: https://rpc-dorado.fetch.ai:443
chainTypes: # This is a beta feature that allows support for any Cosmos chain by importing the correct protobuf messages
cosmos.slashing.v1beta1:
file: "./proto/cosmos/slashing/v1beta1/tx.proto"
messages:
- "MsgUnjail"
# Using a dictionary can massively improve indexing speed
dictionary: https://api.subquery.network/sq/subquery/cosmos-fetch-ai-dictionary
dataSources:
- kind: cosmos/Runtime
startBlock: 827201
mapping:
file: "./dist/index.js"
handlers:
# -------- Primitives
- handler: handleBlock
kind: cosmos/BlockHandler
- handler: handleTransaction
kind: cosmos/TransactionHandler
filter:
includeFailedTx: true
- handler: handleMessage
kind: cosmos/MessageHandler
- handler: handleEvent
kind: cosmos/EventHandler
# -------- Governance
- handler: handleGovProposalVote
kind: cosmos/EventHandler
filter:
type: "proposal_vote"
messageFilter:
type: "/cosmos.gov.v1beta1.MsgVote"
# -------- Staking
- handler: handleDistDelegatorClaim
kind: cosmos/EventHandler
filter:
type: "withdraw_rewards"
messageFilter:
type: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"
- handler: handleDelegatorWithdrawRewardEvent
kind: cosmos/EventHandler
filter:
type: "withdraw_rewards"
- handler: handleAuthzExec
kind: cosmos/MessageHandler
filter:
type: "/cosmos.authz.v1beta1.MsgExec"
# -------- Bank
- handler: handleNativeTransfer
kind: cosmos/EventHandler
filter:
type: "transfer"
messageFilter:
type: "/cosmos.bank.v1beta1.MsgSend"
- handler: handleNativeBalanceDecrement
kind: cosmos/EventHandler
filter:
type: "coin_spent"
- handler: handleNativeBalanceIncrement
kind: cosmos/EventHandler
filter:
type: "coin_received"
# -------- Wasm
- handler: handleContractStoreEvent
kind: cosmos/EventHandler
filter:
type: "store_code"
- handler: handleContractInstantiateEvent
kind: cosmos/EventHandler
filter:
type: "instantiate"
- handler: handleExecuteContractEvent
kind: cosmos/EventHandler
filter:
type: "execute"
- handler: handleLegacyBridgeSwap
kind: cosmos/EventHandler
filter:
type: "execute"
messageFilter:
type: "/cosmwasm.wasm.v1.MsgExecuteContract"
# Filter to only messages with the swap function call
contractCall: "swap"
# TODO: perhaps merge this handler config and that of Cw20BalanceTransfer
- handler: handleCw20Transfer
kind: cosmos/EventHandler
filter:
type: "execute"
messageFilter:
type: "/cosmwasm.wasm.v1.MsgExecuteContract"
contractCall: "transfer"
- handler: handleIBCTransfer
kind: cosmos/EventHandler
filter:
type: "ibc_transfer"
- handler: handleCw20BalanceTransfer
kind: cosmos/EventHandler
filter:
type: "execute"
messageFilter:
type: "/cosmwasm.wasm.v1.MsgExecuteContract"
contractCall: "transfer"
- handler: handleCw20BalanceBurn
kind: cosmos/EventHandler
filter:
type: "execute"
messageFilter:
type: "/cosmwasm.wasm.v1.MsgExecuteContract"
contractCall: "burn"
- handler: handleCw20BalanceMint
kind: cosmos/EventHandler
filter:
type: "execute"
messageFilter:
type: "/cosmwasm.wasm.v1.MsgExecuteContract"
contractCall: "mint"
# -------- Agents
- handler: handleAlmanacRegistration
kind: cosmos/EventHandler
filter:
type: "wasm"
messageFilter:
type: "/cosmwasm.wasm.v1.MsgExecuteContract"
contractCall: "register"