Created
October 6, 2021 14:56
-
-
Save sepisoltani/035cfa13bb60f6b58c6a4e35f2fb4cdc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
contract Example{ | |
// declare the event | |
event IntegersAdded(uint x, uint y, uint result); | |
function add(uint _x, uint _y) public returns (uint) { | |
uint result = _x + _y; | |
// fire an event to let the app know the function was called: | |
emit IntegersAdded(_x, _y, result); | |
return result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment