3

I have followed the previous solutions to this problem as mentioned in this question: Mist: "No data is deployed on the contract address!"

I also checked if the Estimated consumption fee is > Provide Max fee. There were some cases when not using they keyword "payable" was the problem where msg.value was called. I have checked it as well. Still, I am getting "No data deployed" error. Following is my code:

pragma solidity 0.4.8;

contract SGBFactory {

    event FundsReceived(address indexed sender, uint256 amt);
    mapping (address => uint256) public investmentFrom; 
    address public owner;

    modifier onlyOwner {
        if(msg.sender != owner) throw;
        _;
    }

    function SGBFactory() {
        // constructor
        owner = msg.sender;
    }

    function() payable {
        investmentFrom[msg.sender] += msg.value;      
        FundsReceived(msg.sender, msg.value);
    }

}

Is there a problem in the code leading to this? The error message is not very helpful.

  • Could you kindly edit the question as it has some formatting problems? – Mikko Ohtamaa Apr 2 '17 at 11:58
  • @MikkoOhtamaa done :) . – freerunner Apr 2 '17 at 18:26
  • Umm, it's still kind of messed up? :) stackoverflow.com/editing-help – Mikko Ohtamaa Apr 2 '17 at 19:49
  • The code seems fine. Are you sure you've sent enough gas? Try sending 3mm gas just to make sure – Tjaden Hess Apr 4 '17 at 3:19
1

I was able to deploy this contract (it's on the Ropsten test network at address 0x70e91f8500667fd5e190f6ea31fc113b013a2067), and send Ether to its fallback function. I used a gas limit of 4,707,786 and deployed from remix.ethereum.org using MetaMask.

I'd suggest retrying with the above "settings" and see if it now works. There may have been a temporary issue with the network when you tried previously.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.