mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 08:54:05 +00:00
Integrate generated watcher to invoke handlers in graph-node (#33)
* Invoke handlers based on watcher-ts events * Read subgraph yaml and listen to events from watcher-ts * Create GraphWatcher class to use in generated example contract watcher * Call graph-node event handler from generated watcher
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
pragma solidity >=0.4.22 <0.8.0;
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
|
||||
contract Example {
|
||||
event Test(string param1, uint param2);
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
contract Example {
|
||||
uint256 private _test;
|
||||
|
||||
event Test(string param1, uint8 param2);
|
||||
|
||||
function getMethod() public view virtual returns (string memory)
|
||||
{
|
||||
return 'test';
|
||||
}
|
||||
|
||||
function emitEvent() public virtual returns (bool) {
|
||||
emit Test('abc', 123);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user