Conversation
…contracts into upgrade_storage
Upgrade token
kar2905
reviewed
Jul 16, 2018
| * @param _value The amount to be transferred. | ||
| */ | ||
| function transfer(address _to, uint256 _value) whenNotPaused returns (bool success) { | ||
| require(Tstore.getBalanceFromAddress(msg.sender)>=_value&&Tstore.getBalanceFromAddress(_to)+_value>Tstore.getBalanceFromAddress(_to)); |
Contributor
There was a problem hiding this comment.
why not check if _value is positive?
There was a problem hiding this comment.
The checks are same as in the original contract just changed them to what they should be according to the storage contract
contracts/SPRINGToken_Upgrade.sol
Outdated
| * @param _value uint256 the amout of tokens to be transfered | ||
| */ | ||
| function transferFrom(address _from, address _to, uint256 _value) whenNotPaused returns (bool success) { | ||
| require(Tstore.getBalanceFromAddress(_from)>=_value && Tstore.getAmountFromAddress(_from,msg.sender)>=_value && Tstore.getBalanceFromAddress(_from)+_value>Tstore.getBalanceFromAddress(_from)); |
Contributor
There was a problem hiding this comment.
where did you check if its approved to transfer?
contracts/TokenStorage.sol
Outdated
| _; | ||
| } | ||
| } | ||
| contract TokenStorage is Ownable2 { |
vinay035
commented
Jul 16, 2018
contracts/SPRINGToken_Upgrade.sol
Outdated
| * @param _value uint256 the amout of tokens to be transfered | ||
| */ | ||
| function transferFrom(address _from, address _to, uint256 _value) whenNotPaused returns (bool success) { | ||
| require(Tstore.getBalanceFromAddress(_from)>=_value && Tstore.getAmountFromAddress(_from,msg.sender)>=_value && Tstore.getBalanceFromAddress(_from)+_value>Tstore.getBalanceFromAddress(_from)); |
Contributor
Author
There was a problem hiding this comment.
@kpulkit29 lets change the name of getAmountFromAddress to getAllowedAmount for better naming convention.
contracts/TokenStorage.sol
Outdated
| @@ -0,0 +1,51 @@ | |||
| pragma solidity ^0.4.19; | |||
| contract Ownable2 { | |||
Contributor
Author
There was a problem hiding this comment.
lets keep this as ownable
| ** The storage contract for vanityURL_Upgradable contract | ||
| ** Storage contract remains same even when logic of vanity contract is changed | ||
| */ | ||
| contract Ownable2 { |
Contributor
Author
There was a problem hiding this comment.
lets keep it as Ownable.
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.
No description provided.