Infinite loop version (EASY)
In this guide, we will walk through the process of setting up a script for quick minting DRC-20 tokens. This script will automate the process of minting, making it more efficient and user-friendly.
Splitting UTXO is requiered for the script below:
Splitting UTXOs allows you to process multiple transactions concurrently, enhancing the efficiency of the minting process.
To split your UTXOs, use the command:
Replace <count>
with the number of splits you want to make.
We recommend splitting into 50 UTXOs for optimal results.
Below is a shell script that you can use for this purpose:
If using a VPS:
To create the NAME_OF_YOUR_BASH_FILE.sh
, you can run the following command:
nano
NAME_OF_YOUR_BASH_FILE.sh
If using WINDOWS:
Simply create the NAME_OF_YOUR_BASH_FILE.sh
with any text editor.
And copy the following script:
You'll need to replace : <NAME_OF_YOUR_BASH_FILE.sh> : With the name of your .bash file, e.g : bulk-fiwb.sh <YOUR WALLET> : With the wallet that will receive the inscriptions <TICKER> : With the token you want to mint, e.g : fiwb <AMOUNT> : With the max limit amount per mint of this ficker, e.g : 50 (for fiwb)
Launch the bash files on your node :
VPS :
Allow the VPS to launch the bash files with the following command :
Start the script :
Windows :
Start the script:
We assume that you have placed the NAME_OF_YOUR_BASH_FILE.sh
file at the root of the inscription-wallet
folder.
Understanding the Script
The Basics
The script uses a while loop to automate the minting process. Inside the loop, a series of commands are executed, and after each cycle, the script sleeps for a certain amount of time before the next cycle begins.
Parameters
At the beginning of the script, we check to ensure that three arguments are passed when you call the script. If not, an error message is displayed, and the script exits. These arguments are:
A zero (0) - This is a placeholder for future use.
Your wallet address - This is where the minted tokens will be sent.
The token name - The token you are minting.
Looping and Minting
In the main loop of the script, the node . drc-20 mint "$target_address" "$token_name" 50 12
command is run to mint the tokens. The count
variable tracks the number of times this command has run, and remaining
calculates how many more times it will run before reaching max_count
.
Updating and Syncing
After reaching max_count
, the script removes the pending-txs.json
file and syncs the wallet by running node . wallet sync
. The script then sleeps for 600 seconds (10 minutes) before starting the next cycle.
This script won't stop until you decide to shut down the process by yourself.
Note: To use this script, you need to install Git Bash for Windows. For VPS, you just need to use a terminal.
Enjoy your quick minting journey!
Last updated