Merged
Conversation
brandoniles
reviewed
Jan 12, 2021
Member
brandoniles
left a comment
There was a problem hiding this comment.
LGTM
transferAllFrom... yea or nay?
contracts/UFragments.sol
Outdated
| * @param to The address to transfer to. | ||
| * @return True on success, false otherwise. | ||
| */ | ||
| function transferAll(address to) public validRecipient(to) returns (bool) { |
contracts/UFragments.sol
Outdated
|
|
||
| uint256 gonValue = _gonBalances[msg.sender]; | ||
| uint256 value = gonValue.div(_gonsPerFragment); | ||
| _gonBalances[msg.sender] = 0; |
Member
There was a problem hiding this comment.
I wonder if it's better to delete _gonBalances[msg.sender] instead. Any differences on storage?
Thinking both short term, like cost of operation, and long term, like in the case of storage rent. I assume they're the same...
2bea842 to
2ef26a3
Compare
2ef26a3 to
d98e9c4
Compare
brandoniles
reviewed
Jan 15, 2021
contracts/UFragments.sol
Outdated
|
|
||
| _allowedFragments[from][msg.sender] = _allowedFragments[from][msg.sender].sub(value); | ||
|
|
||
| _gonBalances[from] = _gonBalances[from].sub(gonValue); |
Member
There was a problem hiding this comment.
To keep consistent with transferAll, delete _gonBalances[msg.sender]; ?
Member
Author
There was a problem hiding this comment.
delete _gonBalances[from]
Right! 👍
Member
There was a problem hiding this comment.
Ah right. You're version's much better :)
Member
Author
|
will wait for @ahnaguib to review this one too |
ahnaguib
reviewed
Jan 18, 2021
ahnaguib
requested changes
Jan 18, 2021
5547382 to
a69ab46
Compare
Co-authored-by: Ahmed Naguib Aly <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #184
Added
transferAllandtransferAllFromto the token