PLEASE HELP:Created a contract with a amount of ethers and can´t delete the contract /no ether back

samsam90samsam90 Member Posts: 4
hi,

yesterday i have created a own contract with the follow code:

contract MyToken {
/* Public variables of the token */
string public name;
string public symbol;
uint8 public decimals;

/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;

/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);

/* Initializes contract with initial supply tokens to the creator of the contract */
function MyToken(uint256 _supply, string _name, string _symbol, uint8 _decimals) {
/* if supply not given then generate 1 million of the smallest unit of the token */
if (_supply == 0) _supply = 1000000;

/* Unless you add other functions these variables will never change */
balanceOf[msg.sender] = _supply;
name = _name;
symbol = _symbol;

/* If you want a divisible token then add the amount of decimals the base unit has */
decimals = _decimals;
}

/* Send coins */
function transfer(address _to, uint256 _value) {
/* if the sender doenst have enough balance then stop */
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + value < balanceOf[to]) throw;

/* Add and subtract new balances */
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;

/* Notifiy anyone listening that this transfer took place */
Transfer(msg.sender, _to, _value);
}
}


from that page: http://chriseth.github.io/browser-solidity/?#gist=0d1a998d949e26942212&version=soljson-latest.js1


and i have 8.65 ethers used -> i thought this is the right way in order to receive DAO Token.

So but the message from this transaction is this: "Transaction could not be executed" not enough Gas. When i click to the contract is there: "The transaction needs more gas to get carried"

But i have a contract with the Ethers in my Contract Tab.

When i click into the contract i can choose on the right side a "select function" which is named "transfer" but it doesn't work.

What can i do to get my ethers back in my main account?

Screenshot:



And the Transacktion ID is: https://etherscan.io/address/0xebF1031E6690d9bEfE06DC19B0114C592694abF31

Please help me.

Comments

  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    @samsam90 So you created your own MyToken contract and sent it money thinking it would give you 'The DAO' tokens in return? If that's the case, I'm afraid you've greatly misunderstood The DAO. The DAO funding has finished now, but when it was open, simply sending eth to its address would register tokens against the address you sent from.

    The 'MyToken' contract you've created is simply an example of a tokens contract and a very incomplete one. It has no function to actually withdraw ether that has been sent to it and I'm afraid they are now stuck for good.
Sign In or Register to comment.