Official site: https://darkforest.cryptounicorns.fun/
Use at your own risk, we're not responsible for loss of funds / nfts
- Detect all Unicorns NFTs being staked in Dark Forest and unstake it
- Detect all Unicorns in the wallet and stake it
- Allow replacement of tx since polygon are super unstable in terms of gas price.
- Allow the script to determine the current gas price and +15% on top of the current gas to ensure tx dont get block.
- The script only work in a mode, if users got staked unicorn will unstaked all that is available; if user dont have staked unicorn, it will proceed to stake every single unicorn in the wallet.
- Make it into a cron job.
- Node.js
- Setup
.env
PRIVATE_KEY=<insert private key here>
- Change
src/config.mjs
, change gas price based on polygon chain.
const config = {
// Check gas price here https://polygonscan.com/gastracker
GAS_PRICE: 30 // gas price in gwei
}
- Installation
npm install
npm run start
Scenario 1:
When you got 5 unstaked unicorns, run npm run start
, it will stake the unicorns one by one and make sure all tx fulfilled before sending another one, so make sure there is enough $MATIC and the gas fee is high enough.
Scenario 2:
When you got 5 staked unicorns, run npm run start
, it will unstake all your unicorns, same as above, run npm run start
again to stake all the unicorns again.
To get total unicorns being staked in DarkForest:
npm run totalUnicorns
# Export the log
npm run totalUnicorns >> result.txt
Script created by Johnson Lai under MIT License