10 December, 2024 - 05:16 PM
(01 November, 2024 - 10:39 PM)AVAL4NCHE Wrote: Show Moretysmm bumpPreface
Since I started learning how to work with the TON blockchain, I decided to develop several tools that might be useful for forum participants. This article will present two programs: the first is a checker that checks seed phrases for validity and balance, and the second is a program for constant monitoring of wallet balances. If a non-zero balance is detected on the wallet, the program will automatically withdraw funds. Both tools are designed to work with TON wallets.
How the seed phrase checker will work:
First, the seed phrases will be taken from the txt.
Then a wallet will be created based on the seed phrase.
After that, the wallet balance will be determined.
When checking the balance, there will be several checks, for example, in case the balance is zero or the seed phrase is invalid.
After checking the wallets, the results of the check will be output to the console and written to a new txt.
How will the software for automatic withdrawal work?
Seed phrases from a TXT file will be taken.
Then wallets will be created based on them.
After that, the balance will be checked to ensure that it is not zero.
Then a transaction will be created for 90% of the amount in the wallet.
PS All this software will work in an infinite loop, so the program will endlessly check the balance and display a message if it is replenished on the wallets.
PSS All software will be tested only in the test network due to the lack of TON. The main library for implementing the idea will be tonutils, and the API will be used from tonconsole (TonapiClient) - https://tonconsole.com/ .
You can get TON in the test network in this telegram bot - @testgiver_ton_bot.
To correctly withdraw and replenish wallets, you will need to activate them by sending TON to each other (if new regs are used for the test).
To find out if the wallet is active, you can follow this link: https://testnet.tonapi.io/v2/accounts/wallet_address . On the page that opens, find the "status" key.
Seed Phrase Checker
The first thing that will be implemented is the software for checking validity and balance, and immediately you need to specify several variables, including not forgetting to specify the API from tonconsole (TonapiClient).
When generating random wallets from seed phrases and checking the balance, a 404 error may occur. This is due to the fact that empty wallets without transfers and with an inactive status are not displayed in this API (tonconsole). If the wallet is active, there will be no such error. Also, even if a 404 error occurs, the generated wallet is still written to a text file along with its seed phrase.
Conclusion
I think this is where the article comes to an end. It turned out to be quite simple, but I think it is not useless. I tried to create software that can be useful to users of this forum. Of course, the software is not that fast, but due to the use of an API with a limit of 1 request per second, it will not be possible to make it faster. If you have ideas on how to improve the performance of this software, I will be happy to read about it in the comments.
Link to the article in the form of a document - https://docs.google.com/document/d/1Hdpr...sp=sharing
Also, if you want to test these softwares in a test network or in practice, then I provide you with a link to the GitHub repository - https://github.com/overlordgamedev/Check...phrase-TON
leaving a like is much appreciated and help me to keep publishing threads.