Skip to content

PaulWCZ/Auto-Daily-Claim-on-MultiversX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Auto Daily Claim for MultiversX on Raspberry Pi

This tutorial guides you through setting up a Raspberry Pi to run a scheduled script every 24 hours using Ubuntu Server 20.04.5 LTS for claiming MultiversX XP daily. This automated process is convenient but carries a minor risk as it involves keeping your PEM file accessible on the device, potentially exposing your wallet to unauthorized access.

If you encounter any issues during installation, feel free to send your console output to ChatGPT for assistance!

Step 1: Converting Keystore to PEM

  • To convert a keystore file to PEM format, use the following command:
mxpy wallet convert --infile path/to/test_wallet.json --in-format keystore-mnemonic --outfile path/to/converted_wallet.pem --out-format pem

Step 2: Downloading the OS

Step 3: Writing the Image to SD Card

  • Insert your SD card into your computer.
  • Open Raspberry Pi Imager and select the OS image for Ubuntu Server 20.04.5 LTS or other versions depending on your Raspberry Pi. Here is the path: Other general Purpose (other)--> Ubuntu--> Select the version you want.
  • Choose the SD card as your target.

Step 4: Enabling SSH and Configuring WiFi

  • Before ejecting the SD card, enable SSH in the Raspberry Pi Imager settings:
    • Enable SSH.
    • Set a username and password for SSH access.
  • Configure WiFi by providing your network name (SSID) and password.
  • Click "Write".

Step 5: Connecting to Raspberry Pi

  • Eject the SD card from your computer and insert it into your Raspberry Pi.
  • Power up the Raspberry Pi.
  • Find your Raspberry Pi's IP address from your router's connected devices list or use a network scanner.

Step 6: Accessing Raspberry Pi via SSH

ssh username@raspberry_pi_ip

Step 7: Installing Necessary Packages

sudo apt update
sudo apt install curl jq perl git build-essential pkg-config libssl-dev
sudo apt install python3-pip python3-venv libffi-dev rustc cargo
sudo apt-get install libudev-dev

Step 8: Installing the MultiversX SDK CLI

sudo apt install pipx
pipx ensurepath
pipx install multiversx-sdk-cli --force
pipx ensurepath
  • After installation, reboot to activate the MultiversX command-line tool:
sudo reboot

Step 9: Deploying Your Script and Wallet File

  • Create a directory for your wallet:
mkdir -p /home/username/wallet

-Transfer your PEM file from your computer to the Raspberry Pi using SCP:

scp path/to/your_wallet.pem username@raspberry_pi_ip:/home/username/wallet/
  • Transfer your script from your computer to the Raspberry Pi using SCP:
scp path/to/your_script.sh username@raspberry_pi_ip:/home/username/
  • Ensure the script has execute permissions:
chmod +x /home/username/your_script.sh
  • Update the script to include the correct path to the PEM file:
nano /home/username/your_script.sh
  • Modify the WALLET_PEM variable to "/home/username/wallet/your_wallet"

Step 10: Setting Up Cron Job

  • Ensure the MultiversX SDK CLI command mxpy is accessible by adding its path to the cron file:
which mxpy

to find the path

  • Open the crontab editor to schedule your script:
crontab -e
  • Add these lines to run your script daily at 19:00:
PATH=/path/to/mxpy
0 19 * * * /home/username/your_script.sh
  • The cron job will automatically restart upon reboot.

Step 11: Reboot and Verify

  • Reboot your Raspberry Pi to ensure all configurations take effect:
sudo reboot
  • After rebooting, check that the cron job is active:
crontab -l

Conclusion

Your Raspberry Pi is now configured to execute your script every 24 hours automatically. Monitor the cron job's output to verify it runs as expected.

License

GNU General Public License v3.0

About

Build an automating system to claim daily XP on MultiversX.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages