-
Notifications
You must be signed in to change notification settings - Fork 212
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
feat(Payroll): small SLOAD optimizations to _transferTokensAmount() #822
Conversation
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.
Nice catch!
for (uint256 i = 0; i < allowedTokensArray.length; i++) { | ||
address token = allowedTokensArray[i]; | ||
if (employee.allocation[token] != uint256(0)) { | ||
uint128 exchangeRate = _getExchangeRate(token); |
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.
I think dropping this line was not intentionally actually.
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.
The CI failed due to a compilation error since exchangeRate
it's not declared.
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.
😅 Yes... messed up the merge conflict. Fixed in 9a602f2.
2 similar comments
…ragon#822) * feat(Payroll): small SLOAD optimizations to _transferTokensAmount * fix: put back accidentally deleted line from merge conflict
This should avoid a few unnecessary
SLOAD
s that result to the same state.