Ethereum 通过MyTherWallet设置代币的初始供应

Ethereum 通过MyTherWallet设置代币的初始供应,ethereum,wallet,Ethereum,Wallet,我试着用MyTherWallet创建一个新的加密代币,除了最初的供应不正确外,它还能工作。我要求了10000000000,但只得到了1000000 我可以通过MyTherWallet设置初始供应,还是应该使用Myst 以下是我创建合同的方式: 在myst pragma solidity ^0.4.8; contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token,

我试着用MyTherWallet创建一个新的加密代币,除了最初的供应不正确外,它还能工作。我要求了10000000000,但只得到了1000000

我可以通过MyTherWallet设置初始供应,还是应该使用Myst

以下是我创建合同的方式:

  • 在myst

    pragma solidity ^0.4.8;
    contract tokenRecipient { function receiveApproval(address _from, uint256 
    _value, address _token, bytes _extraData); }
    
    contract ForCoin {
    /* Public variables of the token */
    string public standard = 'ForCoin 0.1';
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;
    
    /* This creates an array with all balances */
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;
    
    /* This generates a public event on the blockchain that will notify clients 
    */
    event Transfer(address indexed from, address indexed to, uint256 value);
    
    /* This notifies clients about the amount burnt */
    event Burn(address indexed from, uint256 value);
    
    /* Initializes contract with initial supply tokens to the creator of the 
    contract */
    function ForCoin(
        uint256 initialSupply,
        string tokenName,
        uint8 decimalUnits,
        string tokenSymbol
        ) {
        initialSupply = 100000000000;
        balanceOf[msg.sender] = initialSupply;              // Give the creator 
    all initial tokens
        totalSupply = initialSupply;                        // Update total 
    supply
        name = tokenName;                                   // Set the name for 
    display purposes
        symbol = tokenSymbol;                               // Set the symbol 
    for display purposes
        decimals = decimalUnits;                            // Amount of 
    decimals for display purposes
    }
    
  • 将代码复制到MyTherWallet并部署

  • 备注:我也在右边填写了myst本身的初始供应值


    谢谢

    你必须给小数点后5位。

    他们会在哪里做?他们如何检查?请添加更多信息。这不是很有帮助。