Skip to content

yoyoismee/Provably-Rare-Gem-Miner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Provably Rare Gem Miner

just another random project by yoyoismee.eth

useful link

useful thing you should know

  • read contract -> gems(gemID) to get useful info
  • write contract -> mine to claim(kind, salt) to claim your NFT

to run. just edit the python file and run it.

pip install -r requirement.txt
python3 stick_the_miner.py

or new one auto_mine.py for less input. but you'll need infura account

Ps. too lazy to write docs. but it's 50 LoCs have fun.


why stick the miner ? welp.. this is part of the stick the BUIDLer series.

TL;DR - I'm working on a series of opensource NFT related project just for fun.

Key parameters to change if you are using orginal version 'stick_the_miner.py' (cr. K Nattakit's FB post)

  • chain_id - eth:1, fantom:250
  • entropy - ??
  • gemAddr - Game address, can get from https://gems.alphafinance.io/ (loot/bloot/rarity)
  • userAddr - your Wallet address
  • kind = ประเภทของเพชรที่จะขุด ผมแนะนำเป็น Emerald เพราะ return/difficult สูงที่สุด ง่าย ๆ คือคุณจะกำไรเร็วกว่านั่นเอง
  • nonce - number of times you've minted a gem (https://gems.alphafinance.io/ and connect your wallet)
  • diff - difficulty of gemID (https://gems.alphafinance.io/), note that this changes everytime someone minted that gem, so you need to change it too

(more detail) how to use 'auto_mine.py', the updated version of stick_the_miner

  • benefits: manual version (stick_the_miner.py) requires you to update the 'diff' parameter every time someone minted the nft of the target gem, and 'nounce' if you successfully minted one. This version automates that so you just have to rerun to update.
  • steps:
    1. update requirements pip install -r requirements.txt
    1. create an account at (https://infura.io/), select your chain (e.g. Ethereum), create a project and obtain your project ID
    1. create a .env file in the same format as .env-example, inputing your information from (2.), your wallet address and gem ID
    1. python3 auto_mine.py
  • Note: although you dont have to manually adjust 'diff' parameter everytime, you still need to restart the process everytime someone minted target gem's nft still

Once you get the salt:

Multicore version

  • Normal version uses only 1 core of processors, the multicore version should be ~8 times faster depending on your CPU / coreNumber variable
  • You can select the number of processors by chainging coreNumber variable (should not exceed ~16 tho)
  • "fantom_mining_pool_auto_multicore_line.py" is the multicore version of fantom_mining_pool.py
  • for mining by yourself and manual claim please use "fantom_multicore_line.py"