watcher-ts/packages/graph-node/test/contracts/Example.sol
nikugogoi 6cca55a1ab 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
2021-12-28 16:08:05 +05:30

20 lines
380 B
Solidity

// SPDX-License-Identifier: UNLICENSED
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;
}
}