【发布时间】:2019-04-26 01:01:12
【问题描述】:
/home/ubuntu/token_sale/contracts/SandeepDappToken.sol:17:34: DeclarationError: Identifier not found or not unique. function transfer(address _to, unit256 _value) public 返回(bool 成功) ^—-^ 编译失败。见下文 代码:
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);
}
}
【问题讨论】: