找不到标识符或标识符不唯一。编译错误

时间:2018-11-23 11:57:03

标签: ethereum solidity

/home/ubuntu/token_sale/contracts/SandeepDappToken.sol:17:34:DeclarationError:找不到标识符或标识符不唯一。         函数传递(地址_to, unit256 _value )公共返回(布尔成功)                                         ^-^ 编译失败。见下文 代码:

pragma solidity ^0.4.23;

contract SandeepDappToken
{
    // constructor

    // set the v ariable
    uint256  public totalSupply;

    string public name = ‘Dapp’;

    mapping(address => uint256) public balanceOf;

    constructor(uint256 _initialSupply )  public {
        balanceOf[msg.sender] = _initialSupply;
        totalSupply = _initialSupply;
    }

    function  transfer(address _to, unit256  _value) public returns (bool success)
    {
        require(balanceOf[msg.sender] >= _value);
    }
}

1 个答案:

答案 0 :(得分:0)

更改代码:

unit256到uint256

function  transfer(address _to, uint256  _value) public returns (bool success)