-
Notifications
You must be signed in to change notification settings - Fork 23
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
Storage #34
base: master
Are you sure you want to change the base?
Conversation
…contracts into upgrade_storage
Upgrade token
* @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)); |
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.
why not check if _value is positive?
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 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)); |
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.
where did you check if its approved to transfer?
contracts/TokenStorage.sol
Outdated
_; | ||
} | ||
} | ||
contract TokenStorage is Ownable2 { |
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.
Ownable2?
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)); |
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.
@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 { |
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.
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 { |
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.
lets keep it as Ownable.
No description provided.