mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-09 09:14:06 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user