Skip to content
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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Storage #34

wants to merge 18 commits into from

Conversation

vinay035
Copy link
Contributor

No description provided.

* @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));
Copy link
Contributor

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?

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

* @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));
Copy link
Contributor

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?

_;
}
}
contract TokenStorage is Ownable2 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ownable2?

* @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));
Copy link
Contributor Author

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.

@@ -0,0 +1,51 @@
pragma solidity ^0.4.19;
contract Ownable2 {
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants