Created
April 12, 2018 15:05
-
-
Save cleanunicorn/500e53b86825c391b9d7947cf0c24d00 to your computer and use it in GitHub Desktop.
Emit events
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
pragma solidity ^0.4.21; | |
contract ShapeCalculator{ | |
function rectangle(uint256 w, uint256 h) public returns (uint256 s, uint256 p) { | |
//print value of w and h | |
emit Width(w); | |
emit Height(h); | |
s = w * h; | |
p = 2 * (w + h); | |
} | |
event Width(uint256 w); | |
event Height(uint256 h); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment