Convert your DAO tokens back into ether

Here is a good explanation how to refund DAO tokens using geth, so you do not have to worry about latest mist version or post your key somewhere.

Make sure that you are running geth version 1.4.10 or later. And run your geth commands with the --support-dao-fork option so that you are on the hard-forked blockchain. By now the latest versions support hard-fork anyway. For example:
geth --support-dao-fork console

The --support-dao-fork setting is persisted between separate executions of geth, so you only have to specify this parameter once.

Confirm your geth version using
$ geth version
Geth
Version: 1.4.10-stable
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.5.1
OS: linux
...
geth --support-dao-fork --unlock {your account} console
...
Unlocking account {your account}
Passhrase: {enter your passphrase}

// Allow your blockchain to sync
> var account = "{your account}";
undefined
> var theDAOAddress = "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413";
undefined
> var theDAOWithdrawalAddress = "0xbf4ed7b27f1d666546e30d74d50d173d20bca754";
undefined
> var theDAOABIFragment = [{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"type":"function"}, {"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"type":"function"}];
undefined
> var theDAO = web3.eth.contract(theDAOABIFragment).at(theDAOAddress);
undefined
> var approve = theDAO.approve(theDAOWithdrawalAddress, theDAO.balanceOf(account), {from: account});
undefined
> eth.getTransaction(approve);

// Repeat the command above until you see that blockNumber is not null
// Wait a few blocks (~ 15 seconds each) for your approve transaction to get mined
> var theDAOWithdrawalABIFragment = [{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"type":"function"}];
undefined
> var theDAOWithdrawal = web3.eth.contract(theDAOWithdrawalABIFragment).at(theDAOWithdrawalAddress);
undefined
> var withdrawal = theDAOWithdrawal.withdraw({from: account});
undefined

Source: http://ethereum.stackexchange.com/questions/7204/how-do-i-convert-my-the-dao-tokens-into-ethers-using-the-withdrawal-contract-aft

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.