The `mining-arc` Dividend Tool Gets a Major Upgrade!
Hey everyone,
Today I want to talk about an update to a tool I built a while ago that some of you might remember: mining-arc
. For those who are unfamiliar, it’s a Python script designed to automate the process of distributing dividend tokens to everyone holding a specific "miner" token. It reads its configuration from a .env
file and handles the calculations and transfers for you.
While it has been functional, I decided it was time to give it a much-needed refresh, both under the hood and on the surface.
The Big Overhaul: New Engine, New Look
The biggest changes in this update are:
- Migrated to
hive-nectar
&nectarengine
: The original script was built usingbeem
andhiveengine
. I've now completely migrated it over to use my ownhive-nectar
andnectarengine
libraries. This is part of my ongoing effort to standardize my own tools on a consistent set of libraries that I control and maintain. - Upgraded UI with
rich
: The old version used a combination oftqdm
for progress bars andcolorama
for basic colored text. I've ripped both of those out and replaced them with the excellentrich
library. This provides a much cleaner, more modern, and more readable output in the terminal, complete with nicely formatted tables and progress bars.
Here’s a look at the new summary report the script generates upon completion:
As part of the UI update, I also added a few more useful stats to the final report, like the average number of tokens distributed per holder.
Where to Find It
This tool is designed for anyone who runs a project that pays out dividends to token holders and wants a simple, automated way to handle the distribution. If you want to check it out, use it, or just see how it's built, the full code is available on GitHub. The README
there has instructions on how to set up your .env
file and run it.
- GitHub Repository: https://github.com/TheCrazyGM/mining-arc
It's always satisfying to go back to an older project and give it a fresh coat of paint and a better engine. Let me know what you think!
As always,
Michael Garcia a.k.a. TheCrazyGM
On line 40 of the readme I am guessing that would need to be changed to greater than 3.0 to avoid the new fees from Hive-Engine. Or just env.example line 7. Actually now I am curious if changing the env.example file would edit the line in the readme.
Actually, there are no fees on transfer of tokens. There is no reason to add fees, and as a witness I will continue to make sure that they don't.
The fees were/are only applied to market operations.
Thank you for the correction, the whole adding fees thing had me confused. The only exception I remember reading was LP actions since fees are already added in there.
!HOPE
!PIZZA
Actually, now that you said that probably a terrible variable name as that's how much to pay per token (there is a delay between txs to try to mitigate the spamming although that probably should be a variable too)
HAHA! I am glad my lack of understanding helped you.
!PIZZA
!HOPE
This is a classic from you, and I am pretty sure it will make many people happy, as it always does to me!
!PAKX
!PIMP
!PIZZA
View or trade
PAKX
tokens.Use !PAKX command if you hold enough balance to call for a @pakx vote on worthy posts! More details available on PAKX Blog.
$PIZZA slices delivered:
@txracer(3/15) tipped @thecrazygm
ecoinstant tipped thecrazygm
txracer tipped ecoinstant
Come get MOONed!
That right there is priceless!
This sounds great. @borniet created his own version of a token-distribution script for our daily dividend payouts to ALIVE holders and stakes, so we have that covered, but I'm quite curious how they might differ from each other. Excellent work as always, my friend. 😁 🙏 💚 ✨ 🤙