NFT (Axie Infinity) Sniper bot as-a-service in Nest.js.
Key Features • How To Use • Technologies • Contact and Support • License
- Authetication:
- Json Web Token (JWT)
- Fetches and filters recently listed axies
- Replicates Ronin Wallet's purchase transaction
- Buys the axie instantly if it matches the user's configuration (See Configurations)
- Retries to buy a good axie while user wallet has funds available
- Stops filtering for a user if reached target number of axies or funds were withdrawn
- Logs all activity and purchase attempts
- Protected HTTP endpoints for all user activity
To clone and run this application, you'll need Git and Node.js (which comes with npm) installed on your computer.
Note : Before running the app, make you sure you made a
.env
file with valid parameters, see.env.sample
# .env
JWT_SECRET=secret
JWT_EXP=1d
ENCRYPTION_KEY=d85117047fd06d3afa79b6e44ee3a52eb426f
MIN_RON_BALANCE=0.001
From your command line:
# Clone this repository
$ git clone https://github.com/yahyaoukharta/botaxie-backend.git
# Go into the repository
$ cd botaxie-backend
# Install dependencies
$ npm install
# Run the app
$ npm run start:dev
Users can specify to the bot which axies they are interested in by creating Configurations, the data type used resembles this :
// /src/types/AxieConfig
interface AxieConfig {
maxPrice: number;
minId?: number;
maxId?: number;
//Class
_class?: AxieClass;
//Min Stats
minStats?: AxieStats;
//Breed Count 0-7
minBreedCount?: number;
maxBreedCount?: number;
// Purity 1-6
minPurity?: number;
maxPurity?: number;
//Pureness 0-100 %
minPureness?: number;
maxPureness?: number;
//Potential points
minPotentialPoints?: PotentialPoints;
//genes
eyesD?: BodyPart;
earsD?: BodyPart;
backD?: BodyPart;
mouthD?: BodyPart;
hornD?: BodyPart;
tailD?: BodyPart;
eyesR1?: BodyPart;
earsR1?: BodyPart;
backR1?: BodyPart;
mouthR1?: BodyPart;
hornR1?: BodyPart;
tailR1?: BodyPart;
eyesR2?: BodyPart;
earsR2?: BodyPart;
backR2?: BodyPart;
mouthR2?: BodyPart;
hornR2?: BodyPart;
tailR2?: BodyPart;
}
Note : You can notice that only
maxPrice
is mandatory, but users can use any other filters or leave empty
After creating a configuration, and having a wallet with enough funds, users can launch instances. When you have an instance running, it means the following :
- The main bot's cron job will consider the user configuration when filtering the recently listed axies
- Axies are matched with the oldest instances first
- If an axie recently listed, and matches with two configurations, Botaxie will give priority to the owner of the oldest instance created:
first come, first served
.
- If an axie recently listed, and matches with two configurations, Botaxie will give priority to the owner of the oldest instance created:
- When a config matches with an axie, a purchase attempt is done, the result is logged, and emitted in real time to the user.
- Instance stop conditions :
- Not enough funds in the user's wallet.
- Reached the target amount of axie to buy using that instance.
- Instance with no purchase for more than 24 hours.
Test the app's endpoint, by importing the collection /test/backend.postman_collection.json
to Postman and running the requests.
This app uses the following frameworks and libraries :
You can always contact me for support via the following channels
LinkedIn Yahya Oukharta
GitHub @yahyaoukharta
Discord @Yhyo#9751
Email youkharta@gmail.com