Skip to main content
fix formatting code and tags
Source Link
Antonio Carito
  • 2.5k
  • 3
  • 10
  • 24

function transferFrom(address from, address to, uint value) public returns (bool) { require(balanceOf(from) => value, 'balance too low'); require(allowance)[from][msg.sender] >= value, 'allowance too low'); balances[to] += value; balances[from] -= value; emit Transfer(from, to, value); return true; }

 function transferFrom(address from, address to, uint value) public returns (bool) {
        require(balanceOf(from) => value, 'balance too low');
        require(allowance)[from][msg.sender] >= value, 'allowance too low');
        balances[to] += value;
        balances[from] -= value;
        emit Transfer(from, to, value);
        return true;
    }

function transferFrom(address from, address to, uint value) public returns (bool) { require(balanceOf(from) => value, 'balance too low'); require(allowance)[from][msg.sender] >= value, 'allowance too low'); balances[to] += value; balances[from] -= value; emit Transfer(from, to, value); return true; }

 function transferFrom(address from, address to, uint value) public returns (bool) {
        require(balanceOf(from) => value, 'balance too low');
        require(allowance)[from][msg.sender] >= value, 'allowance too low');
        balances[to] += value;
        balances[from] -= value;
        emit Transfer(from, to, value);
        return true;
    }
Source Link

This function gives me an error. I'm confused. I keep getting ParserError: Expected '(' but got identifier

function transferFrom(address from, address to, uint value) public returns (bool) { require(balanceOf(from) => value, 'balance too low'); require(allowance)[from][msg.sender] >= value, 'allowance too low'); balances[to] += value; balances[from] -= value; emit Transfer(from, to, value); return true; }