Invoke subgraph handler in watcher event processing (#34)

* Invoke subgraph handler in watcher event processing

* Fix error when invoking subgraph handler

* Parse events using event signature specified in subgraph yaml

* Use contract abi to parse event params

* Invoke event handler based on event signature

* Fill event with block and transaction data

* Comment missing fields in block and transaction data
This commit is contained in:
2021-12-28 16:08:05 +05:30
committed by nabarun
parent 6cca55a1ab
commit 43d64f9e4b
21 changed files with 409 additions and 230 deletions
@@ -6,7 +6,7 @@ dataSources:
name: Example1
network: mainnet
source:
address: "0x3ebd8bb51fF52aDAc490117B31F5F137BB125A9D"
address: "0x4Ab7aE18973491Df21d6103dfA55170fdB2CCC98"
abi: Example1
mapping:
kind: ethereum/events
@@ -18,6 +18,6 @@ dataSources:
- name: Example1
file: ./abis/Example1.json
eventHandlers:
- event: Test(string,uint256)
- event: Test(string,uint8)
handler: handleTest
file: ./src/mapping.ts