小编Okh*_*uan的帖子

声明错误:未声明的标识符

我正在尝试使用 Solidity 编程创建令牌,但是当我在 Remix 浏览器 IDE 上编译时,我不断收到此未声明的标识符错误。我是 Solidity 新手,如何解决这个问题?

我在这里附上了我的代码:

pragma solidity >=0.4.16 < 0.6.0;
    /*declare an interfaced named tokenReceipent so that any contract that implements receiveApproval function counts as a tokenReceipent*/
interface tokenRecipient
    {
         function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external;
    }
    contract TokenERC20  //create a contract ERC20 and declare public variables of the token
    {
        string public name;
        string public symbol;
        uint8 public decimals = 18;
        uint256 public totalSupply;
        mapping(address => uint256)public balanceOf; // …
Run Code Online (Sandbox Code Playgroud)

solidity

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

solidity ×1