0

I have a vast amount of Ethereum wallets, all packed with Ether. I need to transfer all the Ether to a single account. I don't want to do it manually. Is there a way to script it or use a smart contract or anything else?

0

There is going to be a level of manual work that will be unavoidable since each wallet will need to be recognized and unlocked via a private key.

You could use web3 and some sort of key/value formatted data and loop through that to unlock and send the ether balance (minus gas) to whatever account you want to send it too.

  • That's what I was thinking about. I have a csv file with the public keys of the wallets. So I would first go and check the balance and calculate the gas, as I want to fully withdraw everything from the wallets. Than I would use my list with privat and public keys to generate the transactions and to sign them. Do you think this should work this way? – Manuel Apr 30 '18 at 14:26
0

You can use web3js or web3py, as you do not seem to have the accounts linked to a node with a json file per account, you can use web3 to get the balance of each account then build the transaction locally, sign it with the corresponding private_key and send sendRawTransaction. Then repeat for every account.

You can see how to sign using your private key and send raw transactions here

0

I also have a similar sort of situation. I have a HD wallet and many of the child address will have ethereum. So my plan is:

Loop through each index (address) in HD wallet and check balance. If balance found create a send transaction with locally signed and keep it in memory. At the end of processing, send all the transaction as batch to an Ethereum node.

Is this the right/best approach?

I am creating a crypto exchange and I am giving each customer a address from my HD wallet (using index) and so I can recover all eth from HD wallet which will have eth from multiple customers. Please suggest, if this is the right approach?

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.