{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/mist/issues/3216","repository_url":"https://api.github.com/repos/ethereum/mist","labels_url":"https://api.github.com/repos/ethereum/mist/issues/3216/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/mist/issues/3216/comments","events_url":"https://api.github.com/repos/ethereum/mist/issues/3216/events","html_url":"https://github.com/ethereum/mist/issues/3216","id":269255403,"number":3216,"title":"Unable to create contract","user":{"login":"mu2k","id":33166297,"avatar_url":"https://avatars3.githubusercontent.com/u/33166297?v=4","gravatar_id":"","url":"https://api.github.com/users/mu2k","html_url":"https://github.com/mu2k","followers_url":"https://api.github.com/users/mu2k/followers","following_url":"https://api.github.com/users/mu2k/following{/other_user}","gists_url":"https://api.github.com/users/mu2k/gists{/gist_id}","starred_url":"https://api.github.com/users/mu2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mu2k/subscriptions","organizations_url":"https://api.github.com/users/mu2k/orgs","repos_url":"https://api.github.com/users/mu2k/repos","events_url":"https://api.github.com/users/mu2k/events{/privacy}","received_events_url":"https://api.github.com/users/mu2k/received_events","type":"User","site_admin":false},"labels":[{"id":810189706,"url":"https://api.github.com/repos/ethereum/mist/labels/Status:%20Triage","name":"Status: Triage","color":"ededed","default":false},{"id":222796964,"url":"https://api.github.com/repos/ethereum/mist/labels/Type:%20Bug","name":"Type: Bug","color":"e41b1b","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ethereum/mist/milestones/23","html_url":"https://github.com/ethereum/mist/milestone/23","labels_url":"https://api.github.com/repos/ethereum/mist/milestones/23/labels","id":2917628,"number":23,"title":"0.9.4","description":"- Marc's core + refactors; \r\n\r\n- Geth 1.7.3 support;\r\n\r\n- Solo network (disable mining);\r\n\r\n- Test LES v2. If successful, promote it to the default setting;\r\n\r\n- Disable swarm from initialization (toggle from Develop menu)\r\n","creator":{"login":"evertonfraga","id":47108,"avatar_url":"https://avatars2.githubusercontent.com/u/47108?v=4","gravatar_id":"","url":"https://api.github.com/users/evertonfraga","html_url":"https://github.com/evertonfraga","followers_url":"https://api.github.com/users/evertonfraga/followers","following_url":"https://api.github.com/users/evertonfraga/following{/other_user}","gists_url":"https://api.github.com/users/evertonfraga/gists{/gist_id}","starred_url":"https://api.github.com/users/evertonfraga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evertonfraga/subscriptions","organizations_url":"https://api.github.com/users/evertonfraga/orgs","repos_url":"https://api.github.com/users/evertonfraga/repos","events_url":"https://api.github.com/users/evertonfraga/events{/privacy}","received_events_url":"https://api.github.com/users/evertonfraga/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":14,"state":"open","created_at":"2017-11-16T16:32:15Z","updated_at":"2018-02-01T13:19:56Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2017-10-27T22:36:55Z","updated_at":"2018-02-01T13:19:56Z","closed_at":"2018-02-01T13:19:56Z","author_association":"NONE","body":"I am trying to deploy a contract , every-time i get the message  : **The transaction from main account (etherbase) to undefined couldn't be successfully executed**\r\n\r\nI appreciate the help\r\n![cannotcreatecontract](https://user-images.githubusercontent.com/33166297/32127415-f83cbc16-bb76-11e7-97df-51c249e6b53c.JPG)\r\n\r\n\r\nthis is the code i am using:\r\n\r\npragma solidity ^0.4.16;\r\n\r\ninterface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }\r\n\r\ncontract TokenERC20 {\r\n    // Public variables of the token\r\n    string public name;\r\n    string public symbol;\r\n    uint8 public decimals = 18;\r\n    // 18 decimals is the strongly suggested default, avoid changing it\r\n    uint256 public totalSupply;\r\n\r\n    // This creates an array with all balances\r\n    mapping (address => uint256) public balanceOf;\r\n    mapping (address => mapping (address => uint256)) public allowance;\r\n\r\n    // This generates a public event on the blockchain that will notify clients\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n    // This notifies clients about the amount burnt\r\n    event Burn(address indexed from, uint256 value);\r\n\r\n    /**\r\n     * Constrctor function\r\n     *\r\n     * Initializes contract with initial supply tokens to the creator of the contract\r\n     */\r\n    function TokenERC20(\r\n        uint256 initialSupply,\r\n        string tokenName,\r\n        string tokenSymbol\r\n    ) public {\r\n        totalSupply = initialSupply * 10 ** uint256(decimals);  // Update total supply with the decimal amount\r\n        balanceOf[msg.sender] = totalSupply;                // Give the creator all initial tokens\r\n        name = tokenName;                                   // Set the name for display purposes\r\n        symbol = tokenSymbol;                               // Set the symbol for display purposes\r\n    }\r\n\r\n    /**\r\n     * Internal transfer, only can be called by this contract\r\n     */\r\n    function _transfer(address _from, address _to, uint _value) internal {\r\n        // Prevent transfer to 0x0 address. Use burn() instead\r\n        require(_to != 0x0);\r\n        // Check if the sender has enough\r\n        require(balanceOf[_from] >= _value);\r\n        // Check for overflows\r\n        require(balanceOf[_to] + _value > balanceOf[_to]);\r\n        // Save this for an assertion in the future\r\n        uint previousBalances = balanceOf[_from] + balanceOf[_to];\r\n        // Subtract from the sender\r\n        balanceOf[_from] -= _value;\r\n        // Add the same to the recipient\r\n        balanceOf[_to] += _value;\r\n        Transfer(_from, _to, _value);\r\n        // Asserts are used to use static analysis to find bugs in your code. They should never fail\r\n        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);\r\n    }\r\n\r\n    /**\r\n     * Transfer tokens\r\n     *\r\n     * Send `_value` tokens to `_to` from your account\r\n     *\r\n     * @param _to The address of the recipient\r\n     * @param _value the amount to send\r\n     */\r\n    function transfer(address _to, uint256 _value) public {\r\n        _transfer(msg.sender, _to, _value);\r\n    }\r\n\r\n    /**\r\n     * Transfer tokens from other address\r\n     *\r\n     * Send `_value` tokens to `_to` in behalf of `_from`\r\n     *\r\n     * @param _from The address of the sender\r\n     * @param _to The address of the recipient\r\n     * @param _value the amount to send\r\n     */\r\n    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {\r\n        require(_value <= allowance[_from][msg.sender]);     // Check allowance\r\n        allowance[_from][msg.sender] -= _value;\r\n        _transfer(_from, _to, _value);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * Set allowance for other address\r\n     *\r\n     * Allows `_spender` to spend no more than `_value` tokens in your behalf\r\n     *\r\n     * @param _spender The address authorized to spend\r\n     * @param _value the max amount they can spend\r\n     */\r\n    function approve(address _spender, uint256 _value) public\r\n        returns (bool success) {\r\n        allowance[msg.sender][_spender] = _value;\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * Set allowance for other address and notify\r\n     *\r\n     * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it\r\n     *\r\n     * @param _spender The address authorized to spend\r\n     * @param _value the max amount they can spend\r\n     * @param _extraData some extra information to send to the approved contract\r\n     */\r\n    function approveAndCall(address _spender, uint256 _value, bytes _extraData)\r\n        public\r\n        returns (bool success) {\r\n        tokenRecipient spender = tokenRecipient(_spender);\r\n        if (approve(_spender, _value)) {\r\n            spender.receiveApproval(msg.sender, _value, this, _extraData);\r\n            return true;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Destroy tokens\r\n     *\r\n     * Remove `_value` tokens from the system irreversibly\r\n     *\r\n     * @param _value the amount of money to burn\r\n     */\r\n    function burn(uint256 _value) public returns (bool success) {\r\n        require(balanceOf[msg.sender] >= _value);   // Check if the sender has enough\r\n        balanceOf[msg.sender] -= _value;            // Subtract from the sender\r\n        totalSupply -= _value;                      // Updates totalSupply\r\n        Burn(msg.sender, _value);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * Destroy tokens from other account\r\n     *\r\n     * Remove `_value` tokens from the system irreversibly on behalf of `_from`.\r\n     *\r\n     * @param _from the address of the sender\r\n     * @param _value the amount of money to burn\r\n     */\r\n    function burnFrom(address _from, uint256 _value) public returns (bool success) {\r\n        require(balanceOf[_from] >= _value);                // Check if the targeted balance is enough\r\n        require(_value <= allowance[_from][msg.sender]);    // Check allowance\r\n        balanceOf[_from] -= _value;                         // Subtract from the targeted balance\r\n        allowance[_from][msg.sender] -= _value;             // Subtract from the sender's allowance\r\n        totalSupply -= _value;                              // Update totalSupply\r\n        Burn(_from, _value);\r\n        return true;\r\n    }\r\n}\r\n"},"comment":{"url":"https://api.github.com/repos/ethereum/mist/issues/comments/362263507","html_url":"https://github.com/ethereum/mist/issues/3216#issuecomment-362263507","issue_url":"https://api.github.com/repos/ethereum/mist/issues/3216","id":362263507,"user":{"login":"alexvandesande","id":112898,"avatar_url":"https://avatars1.githubusercontent.com/u/112898?v=4","gravatar_id":"","url":"https://api.github.com/users/alexvandesande","html_url":"https://github.com/alexvandesande","followers_url":"https://api.github.com/users/alexvandesande/followers","following_url":"https://api.github.com/users/alexvandesande/following{/other_user}","gists_url":"https://api.github.com/users/alexvandesande/gists{/gist_id}","starred_url":"https://api.github.com/users/alexvandesande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexvandesande/subscriptions","organizations_url":"https://api.github.com/users/alexvandesande/orgs","repos_url":"https://api.github.com/users/alexvandesande/repos","events_url":"https://api.github.com/users/alexvandesande/events{/privacy}","received_events_url":"https://api.github.com/users/alexvandesande/received_events","type":"User","site_admin":false},"created_at":"2018-02-01T13:19:56Z","updated_at":"2018-02-01T13:19:56Z","author_association":"COLLABORATOR","body":"@mu2k We are looking at some older threads that went unanswered. Were you, by chance, using light client? This is known issue with the light client that was solved later.\r\n\r\nUnfortunately now, the light client discovery protocol is a bit broken so we are not recommending it.\r\n\r\nI am closing this issue due to inactivity. **Please feel free** to reopen should you still have some considerations about it."}}
{"actor":{"display_login":"alexvandesande"}}