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

TUTORIAL 09 MyToken.sol #32

Open
jjmr007 opened this issue Feb 1, 2019 · 1 comment
Open

TUTORIAL 09 MyToken.sol #32

jjmr007 opened this issue Feb 1, 2019 · 1 comment

Comments

@jjmr007
Copy link

jjmr007 commented Feb 1, 2019

function "approve" shuoldn't be something like this?

`function approve(address _spender, uint _value) public returns (bool success) {
   
    if (_value > 0 && __balanceOf[msg.sender] >= _value) {
    __allowances[msg.sender][_spender] = _value;
    return true;
    }
    return false;
}`

line 49, file MyToken.sol
thanks! =)

@YannyD
Copy link

YannyD commented Jun 24, 2020

I don't think so. He put these constraints in the 'transferFrom' function. You'll see those, along with some others, on lines 36-39.

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

No branches or pull requests

2 participants