mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-23 19:49:06 +00:00
nikugogoi
6cca55a1ab
* 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
20 lines
380 B
Solidity
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;
|
|
}
|
|
}
|