-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ba3439
commit d4ed86e
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.28; | ||
|
||
contract GreeterNotifier { | ||
string greeting; | ||
|
||
event ReactiveNotification( | ||
address indexed from, | ||
address indexed to, | ||
string title, | ||
string description, | ||
uint256 chainId, | ||
string cta, | ||
bytes data | ||
); | ||
|
||
constructor() { | ||
greeting = "Hello, World!"; | ||
} | ||
|
||
function getGreeting() public view returns (string memory) { | ||
return greeting; | ||
} | ||
|
||
function setGreeting(string memory _greeting) public { | ||
greeting = _greeting; | ||
emit ReactiveNotification( | ||
address(this), | ||
msg.sender, | ||
"Greeting Updated", | ||
_greeting, | ||
block.chainid, | ||
"https://example-cta.com", | ||
"0x" | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters