-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9 张伟 - 第一次作业 #31
9 张伟 - 第一次作业 #31
Conversation
Create payroll.sol
update lesson folder
1st assignment: add functionality to update salary and wallet address
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good! Please check the comment.
*/ | ||
function calculateRunway() returns (uint) { | ||
if (employeeSalary == 0) { | ||
revert(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good that you thought about this. Luckily, EVM throws upon division by zero. Refer to this thread.
ethereum/solidity#670
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your advice.
谢谢助教!