I see a lot of people talking about their bot and selling it at a high price, only to end up with 3 lines of code taken from protocol docs. So I decided to make a thread about how I developed mine using the same protocols and library : @JupiterExchange @solana/web3.js 🧵
@Bousquet_FR@Qofficiel Mais il dit la vérité . À Paris il y a des quartiers où les blancs ne sont plus présents. Le gars rigole, il vit ou ? Certainement pas dans ces quartiers
15/15
Et voilà - I decided not to share the code on Github. Experienced developers don't need it and I find it more instructive to rewrite the code and try to understand it, rather than simply "git clone" a repo.
Feel free to share / copy / improved.
7/x
First of all, we need to initiate our project:
Create a folder of your choice, for my part I named it botsolana
Go to the folder via your terminal, once in the folder execute the following command :
npm init -y
6/x
2. Call the swap function to buy token
3. Refresh the price every 5 seconds until it reaches the desired price (purchase price x expected multiple).
4. Call the swap function to resell the previously purchased token and return to the starting currency.
5/x
Now let's talk about the "architecture". In order to keep the code as readable and comprehensible as possible, we're going to create one file per function. The main script will run as follows:
1. Call the Initialization function: we'll gather all the information needed.
3/x
-UserAddress: your private key - if you're going to publish your code / share it, make sure it's never visible - I highly recommend using a burn wallet
-Token you want to buy: you need the address of the token, e.g. for USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
2/X
We'll start by listing the information we'll need:
-RPC EndPoint: this allows you to connect to the blockchain to perform your transactions. You can find it for free at https://t.co/gwsRez2iGt
1/X
Note: the script is probably not optimized and may contain vulnerabilities - this thread is for informational purposes only - I can't be held responsible for any funds you may lose
I see a lot of people talking about their bot and selling it at a high price, only to end up with 3 lines of code taken from protocol docs. So I decided to make a thread about how I developed mine using the same protocols and library : @JupiterExchange @solana/web3.js 🧵