Table of Contents
The project represents script allowing you create a loop of constant/automatic requests to your wallet withdrawing the balance. At this moment it does it for only native token of the chain you use: ETH, MATIC, BNB, AVAX etc.
There are multiple usecases for this:
- You might need to redirect incoming transaction from multiple wallets to the main one.
- You might need to protect your account and set up script when you are not using the wallet, and shutting the script off only when you need to make some transactions and back on when you are done.
- You might somehow disposed your private keys and want to protect other tokens you have on wallet. So emptying the wallet balance will prevent scammers making any other transaction.
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
-
Clone the repo
git clone https://github.com/turazashvili/Automatic-ETH-wallet-Balance-Transfer.git
-
Install Python Choose latest release for your OS https://www.python.org/downloads/
-
Enter your Wallets and Key in
loop.py
private_key = "<Your_Private_Key" pub_key ="<Your_wallet>" recipient_pub_key = "<Recipient_wallet>"
-
Enter your gasPrice, gasLimit and chainId in
loop.py
gasPrice = w3.toWei('30', 'gwei') gasLimit = 21000 tx = { 'chainId': 3,
You can find your chain ID here: https://chainlist.wtf/.
Your current required gasPrice in gwei here: -
Add the Endpoint for the chain you chose.
w3 = Web3(Web3.HTTPProvider(<Moralis or Infura_endpoint_link>)
Visit https://moralis.io or https://infura.io/ or any other endpoint you can find.
-
Run the script
python loop.py
- Add API support for GAS fees
- Add local ETH miner endpoint to refer quicker to chain and bypass API request limits
- Edit script for it to check the incoming transaction in pending transactions in mempool
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Nikoloz Turazashvili - @axrisi - turazashvili@gmail.com
Project Link: https://github.com/turazashvili/Automatic-ETH-wallet-Balance-Transfer/