diff --git a/.gitignore b/.gitignore index 6048c0f..2e00a90 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ error_logs/commit_error.log temp.json .DS_Store design/ +contracts/ # Xcode # files/images/ diff --git a/ABIs/erc20.js b/ABIs/erc20.js index 42a7d9f..d3a16ba 100644 --- a/ABIs/erc20.js +++ b/ABIs/erc20.js @@ -38,6 +38,17 @@ function erc20(account, tokenAddress) { stateMutability: "nonpayable", type: "function", }, + { + constant: true, + inputs: [ + { name: "_owner", type: "address" }, + { name: "_spender", type: "address" } + ], + name: "allowance", + outputs: [{ name: "remaining", type: "uint256" }], + type: "function", + }, + ], account ); diff --git a/Functions/buyToken.js b/Functions/buyToken.js index e287381..98d3b4e 100644 --- a/Functions/buyToken.js +++ b/Functions/buyToken.js @@ -63,4 +63,4 @@ const buyToken = async (account, tokenContract, gasLimit, gasPrice) => { } -export default buyToken; +export default buyToken; \ No newline at end of file diff --git a/Functions/sellToken.js b/Functions/sellToken.js index a51ae43..b495223 100644 --- a/Functions/sellToken.js +++ b/Functions/sellToken.js @@ -4,39 +4,29 @@ import constants from '../Config/constants.js'; const delay = ms => new Promise(res => setTimeout(res, ms)); const sellToken = async (account, tokenContract, gasLimit, gasPrice, value = 99) => { - let attempts = 10; // max attempts - let slippage = constants.Slippage; // starting slippage + let attempts = 10; // max attempts + let slippage = constants.Slippage; // starting slippage - while (attempts > 0) { - try { - const sellTokenContract = new constants.ethers.Contract( - tokenContract, - constants.swapAbi, - account - ); - - const contract = new constants.ethers.Contract(constants.PANROUTERADDRESS, constants.abi, account); - const accountAddress = account.address; - const tokenBalance = await constants.erc20(account, tokenContract).balanceOf( - accountAddress - ); - let amountOutMin = 0; - const amountIn = tokenBalance.mul(value).div(100); - const amounts = await constants.router(account).getAmountsOut(amountIn, [ - tokenContract, - constants.BNBCONTRACT - ]); + while (attempts > 0) { + try { + const contract = new constants.ethers.Contract(constants.PANROUTERADDRESS, constants.abi, account); + const accountAddress = account.address; + const tokenBalance = await constants.erc20(account, tokenContract).balanceOf( + accountAddress + ); + let amountOutMin = 0; + const amountIn = tokenBalance.mul(value).div(100); - // increment slippage by 2% for each attempt - slippage += 2; + const sellTokenContract = new constants.ethers.Contract( + tokenContract, + constants.swapAbi, + account + ); + const allowance = await sellTokenContract.allowance(account.address, constants.PANROUTERADDRESS); - if (parseInt(slippage) !== 0) { - amountOutMin = amounts[1].sub(amounts[1].mul(slippage.toString()).div(100)); - } else { - amountOutMin = amounts[1]; - } - - const approve = await sellTokenContract.approve(constants.PANROUTERADDRESS, amountIn); + // If allowance is less than double the amount we want to sell, approve double the spending + if (allowance.lt(amountIn.mul(2))) { + const approve = await sellTokenContract.approve(constants.PANROUTERADDRESS, amountIn.mul(2)); const receipt_approve = await approve.wait(); if ( receipt_approve && @@ -46,79 +36,92 @@ const sellToken = async (account, tokenContract, gasLimit, gasPrice, value = 99) const message = `INFO - Approved https://bscscan.com/tx/${receipt_approve.transactionHash} ${constants.chalk.green('✅')}`; console.log(constants.chalk.green(message)); constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); - const swap_txn = - await contract.swapExactTokensForETHSupportingFeeOnTransferTokens( - amountIn, - amountOutMin, - [tokenContract, constants.BNBCONTRACT], - accountAddress, - Date.now() + 1000 * 60 * 10, - { - gasLimit: gasLimit, - gasPrice: gasPrice, - } - ); - const receipt = await swap_txn.wait(); - if (receipt && receipt.blockNumber && receipt.status === 1) { - // 0 - failed, 1 - success - const message = `INFO - Transaction https://bscscan.com/tx/${receipt.transactionHash} mined, status success ${constants.chalk.green('✅')}`; - console.log(constants.chalk.green(message)); - constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); - // if the sell transaction is successful, break the loop - break; - } else if (receipt && receipt.blockNumber && receipt.status === 0) { - const message = `ERROR - Transaction https://bscscan.com/tx/${receipt.transactionHash} mined, status failed ${constants.chalk.red('❌')}`; - console.log(constants.chalk.red(message)); - constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); - } else { - const message = `WARNING - Transaction https://bscscan.com/tx/${receipt.transactionHash} not mined ${constants.chalk.yellow('⚠️')}`; - console.log(constants.chalk.yellow(message)); - constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); - } } + } - // decrement the value by 10 each time - value -= 10; - attempts--; + const amounts = await constants.router(account).getAmountsOut(amountIn, [ + tokenContract, + constants.BNBCONTRACT + ]); - // delay execution for 5 second (5000 milliseconds) between each sell attempt - await delay(5000); - } catch (error) { - let errorMessage = error.message; - const errorReasonIndex = errorMessage.indexOf("(reason="); - - // Extract error reason if it exists - if (errorReasonIndex !== -1) { - errorMessage = errorMessage.substring(errorReasonIndex + 9, errorMessage.indexOf(",")); - errorMessage = `Error reason: ${errorMessage}`; - } - - const message = `ERROR - Error while selling token: ${errorMessage} ${constants.chalk.red('❌')}`; - console.error(constants.chalk.red(message)); - constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); - attempts--; - - // delay execution for 5 second (5000 milliseconds) between each sell attempt - await delay(5000); + // increment slippage by 2% for each attempt + slippage += 2; + + if (parseInt(slippage) !== 0) { + amountOutMin = amounts[1].sub(amounts[1].mul(slippage.toString()).div(100)); + } else { + amountOutMin = amounts[1]; } - - } // closing brace for while loop - // If all attempts have been made and the token couldn't be sold, add to blacklist - if (attempts === 0) { - constants.blacklist.push(tokenContract); - constants.fs.writeFile('./Lists/blacklist.json', JSON.stringify(constants.blacklist), (err) => { - if (err) { - const message = `ERROR - Error while updating blacklist: ${err} ${constants.chalk.red('❌')}`; - console.error(constants.chalk.red(message)); - constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); - } else { - const message = `INFO - Token ${tokenContract} added to blacklist after unsuccessful sell attempts ${constants.chalk.green('✅')}`; - console.log(constants.chalk.green(message)); - constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); + + const swap_txn = await contract.swapExactTokensForETHSupportingFeeOnTransferTokens( + amountIn, + amountOutMin, + [tokenContract, constants.BNBCONTRACT], + accountAddress, + Date.now() + 1000 * 60 * 10, + { + gasLimit: gasLimit, + gasPrice: gasPrice, } - }); + ); + const receipt = await swap_txn.wait(); + if (receipt && receipt.blockNumber && receipt.status === 1) { + // 0 - failed, 1 - success + const message = `INFO - Transaction https://bscscan.com/tx/${receipt.transactionHash} mined, status success ${constants.chalk.green('✅')}`; + console.log(constants.chalk.green(message)); + constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); + // if the sell transaction is successful, break the loop + break; + } else if (receipt && receipt.blockNumber && receipt.status === 0) { + const message = `ERROR - Transaction https://bscscan.com/tx/${receipt.transactionHash} mined, status failed ${constants.chalk.red('❌')}`; + console.log(constants.chalk.red(message)); + constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); + } else { + const message = `WARNING - Transaction https://bscscan.com/tx/${receipt.transactionHash} not mined ${constants.chalk.yellow('⚠️')}`; + console.log(constants.chalk.yellow(message)); + constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); + } + // decrement the value by 10 each time + value -= 10; + attempts--; + + // delay execution for 5 second (5000 milliseconds) between each sell attempt + await delay(5000); + } catch (error) { + let errorMessage = error.message; + const errorReasonIndex = errorMessage.indexOf("(reason="); + + // Extract error reason if it exists + if (errorReasonIndex !== -1) { + errorMessage = errorMessage.substring(errorReasonIndex + 9, errorMessage.indexOf(",")); + errorMessage = `Error reason: ${errorMessage}`; + } + + const message = `ERROR - Error while selling token: ${errorMessage} ${constants.chalk.red('❌')}`; + console.error(constants.chalk.red(message)); + constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); + attempts--; + + // delay execution for 1 second (1000 milliseconds) between each sell attempt + await delay(1000); } + + } // closing brace for while loop + // If all attempts have been made and the token couldn't be sold, add to blacklist + if (attempts === 0) { + constants.blacklist.push(tokenContract); + constants.fs.writeFile('./Lists/blacklist.json', JSON.stringify(constants.blacklist), (err) => { + if (err) { + const message = `ERROR - Error while updating blacklist: ${err} ${constants.chalk.red('❌')}`; + console.error(constants.chalk.red(message)); + constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); + } else { + const message = `INFO - Token ${tokenContract} added to blacklist after unsuccessful sell attempts ${constants.chalk.green('✅')}`; + console.log(constants.chalk.green(message)); + constants.fs.appendFileSync('./error_logs/log.txt', `${new Date().toLocaleString()} - ${message}\n`); + } + }); + } } export default sellToken; - diff --git a/Lists/blacklist.json b/Lists/blacklist.json index 4f83287..754cb68 100644 --- a/Lists/blacklist.json +++ b/Lists/blacklist.json @@ -1 +1 @@ -["0x171130a203df66c50B2Ec2BC0E385dF4F5F6eC20","0x556a527E17732735cf7baBf582a7cF001Fc309C2","0xC41Cd7cE260704b1Fb2AA630ec2d959C529A36BA","0xa18F57919851387Affc4482bF77c2A0609F4DE67","0x55d398326f99059fF775485246999027B3197955","0xB10EDe74D38b15751BACe7CdA02dd6d684126c30","0xda74cD3D68A3E54D955162110Ea40c04Bf7e17E6","0xC4Fd0a6328f39F1db9E9A0DFc32534C78E19Bf6f","0xb5002A946c0150A0EF30eEB034b099928490E67C","0x877839Cc5312743aAEc1F1DDa0c195d89Cd755D5","0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56","0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82","0x608756c184A0723077B0c10F97f4D054c9eE1C0F","0x1E84BFB6dc6cf352572344B772DF549c04Fda869","0x1e3eC969F9D8fb8FcF01267a56eA2D603B914991","0x082744dD08Dc96929e476d7C65a29B6Bfd6b0755","0x5053C014eB017757e343ff4fc8741195aF76B40c","0xC708Fa57A4e9c821443f6251a4FF11DC446b6741","0x0baB3607beEDC157EccDFECbCAD8Dc038d72f8c5","0x55d398326f99059fF775485246999027B3197955","0x1e84bfb6dc6cf352572344b772df549c04fda869","0xFEC99f71DD6e58Be0711A251eaA44ce1c5B64c01","0x556a527E17732735cf7baBf582a7cF001Fc309C2","0x1E84BFB6dc6cf352572344B772DF549c04Fda869","0x78b617aFA309aF36Fc8606728026C8fd1FC78BBC","0x47974d4117280bb6f6b60182323177f6a1df61b2","0x494c83CaED27aeb836d7fd1482D080e1D35DD0f3","0xedbd18b82215e7e39b7080ad967669b00ff1b8b4","0xf8b8C14CDCCeD823CACCe592c82f526aEB197a30","0x8A3AE5f13Aff94A3E72F45951d2f191Befbc006c","0x253c0460cC962F48e2ff4Be8D9F790B47CE4d756","0x1b9DEc855E98d1c01426a3eD615dd25d2947290E","0x8A3AE5f13Aff94A3E72F45951d2f191Befbc006c","0xd692500383Eb72e271426E732Cdb5668948058d5","0xE5bA47fD94CB645ba4119222e34fB33F59C7CD90","0x7cF551258d6871b72EE1bD1624588a6245bF48c4","0x1dcDC54cFd22E0FF5586A505c827D55A6D8ceB1d","0xC496108Ed523AF656bb0F3E1Cb63E3daaCB987F4","0xF0C26f3c132FF29FfCd236DB51E18b935137E76c","0x0451BCC93E8bbAfd6849A7cFa747c484658094AD","0x9D655C9eD8D2291f0df80051b2D4d403Ef930acC","0xbC606aFE23c6c77Ab4a19138167053a6bd0C83c3","0x47Fd014706081068448b89Fc6bAca2730977216a","0x237ace23Ab2C36a004AA5e4fB134fe5c1cedF06c","0x13C2C08ebBf9589e47F4F62cC21fFfcD89F69e5B"] \ No newline at end of file +["0x171130a203df66c50B2Ec2BC0E385dF4F5F6eC20","0x556a527E17732735cf7baBf582a7cF001Fc309C2","0xC41Cd7cE260704b1Fb2AA630ec2d959C529A36BA","0xa18F57919851387Affc4482bF77c2A0609F4DE67","0x55d398326f99059fF775485246999027B3197955","0xB10EDe74D38b15751BACe7CdA02dd6d684126c30","0xda74cD3D68A3E54D955162110Ea40c04Bf7e17E6","0xC4Fd0a6328f39F1db9E9A0DFc32534C78E19Bf6f","0xb5002A946c0150A0EF30eEB034b099928490E67C","0x877839Cc5312743aAEc1F1DDa0c195d89Cd755D5","0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56","0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82","0x608756c184A0723077B0c10F97f4D054c9eE1C0F","0x1E84BFB6dc6cf352572344B772DF549c04Fda869","0x1e3eC969F9D8fb8FcF01267a56eA2D603B914991","0x082744dD08Dc96929e476d7C65a29B6Bfd6b0755","0x5053C014eB017757e343ff4fc8741195aF76B40c","0xC708Fa57A4e9c821443f6251a4FF11DC446b6741","0x0baB3607beEDC157EccDFECbCAD8Dc038d72f8c5","0x55d398326f99059fF775485246999027B3197955","0x1e84bfb6dc6cf352572344b772df549c04fda869","0xFEC99f71DD6e58Be0711A251eaA44ce1c5B64c01","0x556a527E17732735cf7baBf582a7cF001Fc309C2","0x1E84BFB6dc6cf352572344B772DF549c04Fda869","0x78b617aFA309aF36Fc8606728026C8fd1FC78BBC","0x47974d4117280bb6f6b60182323177f6a1df61b2","0x494c83CaED27aeb836d7fd1482D080e1D35DD0f3","0xedbd18b82215e7e39b7080ad967669b00ff1b8b4","0xf8b8C14CDCCeD823CACCe592c82f526aEB197a30","0x8A3AE5f13Aff94A3E72F45951d2f191Befbc006c","0x253c0460cC962F48e2ff4Be8D9F790B47CE4d756","0x1b9DEc855E98d1c01426a3eD615dd25d2947290E","0x8A3AE5f13Aff94A3E72F45951d2f191Befbc006c","0xd692500383Eb72e271426E732Cdb5668948058d5","0xE5bA47fD94CB645ba4119222e34fB33F59C7CD90","0x7cF551258d6871b72EE1bD1624588a6245bF48c4","0x1dcDC54cFd22E0FF5586A505c827D55A6D8ceB1d","0xC496108Ed523AF656bb0F3E1Cb63E3daaCB987F4","0xF0C26f3c132FF29FfCd236DB51E18b935137E76c","0x0451BCC93E8bbAfd6849A7cFa747c484658094AD","0x9D655C9eD8D2291f0df80051b2D4d403Ef930acC","0xbC606aFE23c6c77Ab4a19138167053a6bd0C83c3","0x47Fd014706081068448b89Fc6bAca2730977216a","0x237ace23Ab2C36a004AA5e4fB134fe5c1cedF06c","0x13C2C08ebBf9589e47F4F62cC21fFfcD89F69e5B","0x845d551fAE4Be2dD871Eb978beb509fD74261231","0x5fa26252c23e43De50D3368f624e47Fa8808488E","0xbF2F3084B0050A318bA04b9569dB34f84832183D","0x49AD9aC79a9C730b55f2Ee2DA92f2Bc38234fc36","0xdb93cefbc621Fa18bEe2B3fcdFC34860351a1532","0xc9Bb93672E4C10A9BcCCC570D1F1407db2bac1Ac","0xb5640A587dCDc5964A1A441455A41d6Fbb071719","0x7704d0EaD6F74E625d7371b079D8b2475bc852d4","0x98f20E497D2579FF3adb8F37d09f1F5fbFAb42Cb","0x02887cD6615BD7A005b5cB72f27EBbAd70884406","0x8E0c77B827963Cacf18ac170e95f67973d93ed1c","0x69C2fcAe7e30b429166BD616A322e32BeC036bCf","0xCaCbE4A581A7A0e5f4740f981E26299FE4712369","0x9A2478C4036548864d96a97Fbf93f6a3341fedac","0xe01B835630d63DF7Dd09E36B4aae694816e19bdb"] \ No newline at end of file diff --git a/README.md b/README.md index ac44473..663f921 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,30 @@ # 🚀 Ultimate FrontRunning Bot + ============================ This bot is designed to listen for transactions on PancakeSwap and automatically perform token buying and selling based on predefined conditions. The bot listens to the mempool for any pending transactions and acts upon them. It uses the Ethers.js library to interact with the EVM Blockchain. ## 🎯 Features + ----------- -- 💹 Real-time transaction monitoring on PancakeSwap. -- ✅ Whitelisting and blacklisting of tokens. -- 💰 Automated token buying and selling. -- 🔀 Dynamic slippage adjustment for sell orders. -- ⛔ Auto-blacklisting of unsellable tokens. -- 🛠️ Error and exception handling. -- 🔄 Auto-reconnection on WebSocket connection loss. -- 📝 Logging of transaction data and errors for review and debugging. +- 💹 Real-time transaction monitoring on PancakeSwap. +- ✅ Whitelisting and blacklisting of tokens. +- 💰 Automated token buying and selling. +- 🔀 Dynamic slippage adjustment for sell orders. +- ⛔ Auto-blacklisting of unsellable tokens. +- 🛠️ Error and exception handling. +- 🔄 Auto-reconnection on WebSocket connection loss. +- 📝 Logging of transaction data and errors for review and debugging. ## 👀 What is FrontRunning? + ----------- FrontRunning is a practice in which a bot makes a transaction based on prior knowledge of pending transactions in the mempool which are waiting to be mined. In essence, the bot 'jumps' the queue by paying a higher gas fee to get its transaction mined first. ## 📂 Project Structure + ----------- - root @@ -47,6 +51,7 @@ FrontRunning is a practice in which a bot makes a transaction based on prior kno ## 🛠️ How to Run the Bot + ----------- 1. Clone this repository to your local machine. @@ -60,6 +65,7 @@ FrontRunning is a practice in which a bot makes a transaction based on prior kno 6. Run `node bot.js` to start the bot. ## 📝 .env Configuration + ----------- Here's an example of what your `.env` file should look like, make sure you replace the `PRIVATE_KEY` and `WSS` node url: @@ -78,11 +84,13 @@ GAS_PERCENT=10 ``` ## ⚠️ Disclaimer + ----------- Please note that this bot is provided as-is, and I am not responsible for any losses you may incur while using it. The bot is not foolproof and does not directly detect scam or honeypot tokens. While it does include functionality for a blacklist and whitelist, these measures are not guaranteed to be 100% effective. Please use this bot responsibly and at your own risk. ## 💖 Donations + ----------- If you find this bot useful and would like to support its development, you can send donations to the following address: @@ -92,25 +100,41 @@ If you find this bot useful and would like to support its development, you can s Donations can be made in any of the following cryptocurrencies: ETH, BNB, MATIC, CRO, etc. Any amount is appreciated and will go a long way in helping support the further development of this bot. Thank you in advance for your generosity! ## 📚 Key Components + ----------------- -- `bot.js`: The main entry point to the application. It connects to the Ethereum network, listens for transactions, checks token lists, and triggers buying and selling actions. -- `buyToken.js`: Handles the purchasing of tokens on PancakeSwap. -- `sellToken.js`: Manages the selling of tokens on PancakeSwap. If a token cannot be sold after several attempts, it gets automatically added to the blacklist. +- `bot.js`: The main entry point to the application. It connects to the Ethereum network, listens for transactions, checks token lists, and triggers buying and selling actions. +- `buyToken.js`: Handles the purchasing of tokens on PancakeSwap. +- `sellToken.js`: Manages the selling of tokens on PancakeSwap. If a token cannot be sold after several attempts, it gets automatically added to the blacklist. +- `calculateGasPrice.js`: Calculates the gas price for buying and selling tokens based on the current gas price and the gas percentage set in the .env file. +- `whitelist.json`: Contains a list of tokens that the bot will buy and sell. Currently this is populated manually, but I am working on a way to automate this process. +- `blacklist.json`: Contains a list of tokens that the bot will ignore, this works with the whitelist. If a token is in the whitelist and blacklist, the whitelist takes precedence. If a token is in the blacklist, the bot will ignore it. Auto-blacklisting is also implemented for tokens that cannot be sold after several attempts. + +## 📦 Costants Configuration + +----------------- + +- `constants.js`: Contains all the constants used in the application. These include pulling in the .env variables like the contract addresses, gas price, slippage, and other values. +- `router.js`: Handles the routing through the PancakeSwap Router functions. +- `erc20.js`: Contains the ERC20 ABI for interacting with ERC20 tokens. +- `swapABI.json`: Contains the ABI for interacting with the PancakeSwap Router. +- `abi.json`: Contains the ABI for interacting with the PancakeSwap Factory. ## 🔄 Operation + ------------ The bot operates by: -1. Listening for pending transactions from the PancakeSwap Factory. -2. Checking if a transaction's value is higher than a set minimum. -3. Retrieving the token address from the transaction data. -4. Checking if the token is in the whitelist or blacklist. If it's in the whitelist, the bot proceeds with the transaction. If it's in the blacklist, the bot ignores the transaction. -5. If the token passes the checks, the bot calculates the gas price for buying and selling, buys the token, and then sells it. -6. If a token cannot be sold after several attempts, the bot increases the slippage for each try. If all attempts fail, the token is added to the blacklist. +1. Listening for pending transactions from the PancakeSwap Factory. +2. Checking if a transaction's value is higher than a set minimum. +3. Retrieving the token address from the transaction data. +4. Checking if the token is in the whitelist or blacklist. If it's in the whitelist, the bot proceeds with the transaction. If it's in the blacklist, the bot ignores the transaction. +5. If the token passes the checks, the bot calculates the gas price for buying and selling, buys the token, and then sells it. +6. If a token cannot be sold after several attempts, the bot increases the slippage for each try. If all attempts fail, the token is added to the blacklist. ## 🔧 Versioning + ------- We are using for versioning in this program follows the principles of Semantic Versioning (SemVer). Semantic Versioning is a versioning scheme that consists of three numbers separated by dots: MAJOR.MINOR.PATCH. @@ -123,7 +147,9 @@ We are using for versioning in this program follows the principles of Semantic V Following this versioning methodology helps provide clarity about the nature of changes in each release and allows users to understand the impact of upgrading to a new version. It also helps ensure compatibility and enables users to make informed decisions when incorporating new versions into their projects. ### 📌 Using Bump + ------- + - Using the package bump to handle versioning and releases - Install bump globally using npm: @@ -134,16 +160,22 @@ Following this versioning methodology helps provide clarity about the nature of ## 📝 TODO -------- -- Portfolio Tracking 📊: Develop a feature to track the bot's token portfolio, showing Profit and Loss. Implement a database for this functionality. -- Database Schema 🗄️: Develop a schema for a database to manage the bot's portfolio and other necessary aspects to track. -- Improved Error Handling 🐞: Enhance the bot's error handling and console logging for easier debugging and more comprehensive error coverage. -- Deployment Strategy 🚀: Create a strategy for deploying the bot remotely, setting the stage for frontend development. -- Frontend Web App 💻: Develop a frontend web application that can be used to manage the bot remotely via a desktop browser or mobile device. -- Multi-chain Functionality ⛓️: Expand the bot's capability to manage multiple EVM-based networks, moving beyond BSC to other chains like Ethereum, Polygon, etc. -- Performance Optimization ⚡: Monitor the bot's performance and identify areas for optimization to ensure it runs efficiently under different network conditions. -- Security Improvements 🔒: Constantly review and improve the bot's security, ensuring that sensitive information like account details remains secure. -- User Customization 🛠️: Allow users to customize bot settings, such as the minimum transaction value or the list of whitelisted/blacklisted tokens. +------ + +- Portfolio Tracking 📊: Develop a feature to track the bot's token portfolio, showing Profit and Loss. Implement a database for this functionality. +- Database Schema 🗄️: Develop a schema for a database to manage the bot's portfolio and other necessary aspects to track. +- Improved Error Handling 🐞: Enhance the bot's error handling and console logging for easier debugging and more comprehensive error coverage. +- Deployment Strategy 🚀: Create a strategy for deploying the bot remotely, setting the stage for frontend development. +- Frontend Web App 💻: Develop a frontend web application that can be used to manage the bot remotely via a desktop browser or mobile device. +- Backend API 📡: Develop a backend API to support the frontend web app, allowing users to manage the bot remotely. +- Telegram Integration 📱: Integrate the bot with Telegram to allow users to manage the bot remotely via the Telegram app. +- Discord Integration 🎮: Integrate the bot with Discord to allow users to manage the bot remotely via the Discord app. +- Twitter Integration 🐦: Integrate the bot with Twitter to allow users to manage the bot remotely via the Twitter app. +- Multi-chain Functionality ⛓️: Expand the bot's capability to manage multiple EVM-based networks, moving beyond BSC to other chains like Ethereum, Polygon, etc. +- Performance Optimization ⚡: Monitor the bot's performance and identify areas for optimization to ensure it runs efficiently under different network conditions. +- Security Improvements 🔒: Constantly review and improve the bot's security, ensuring that sensitive information like account details remains secure. +- User Customization 🛠️: Allow users to customize bot settings, such as the minimum transaction value or the list of whitelisted/blacklisted tokens. +- Fix Token Approval issue 🐞: Fix the issue where the bot is approving same token contract over and over. Remember to keep your Ethereum account and network details secure, as they are sensitive data. Trading involves risks and automated trading can result in a loss of funds, so use this bot responsibly. 🤖 diff --git a/TODO b/TODO index d933db0..c76ba38 100644 --- a/TODO +++ b/TODO @@ -1,12 +1,11 @@ -- Fix issue with approving same token over and over -- Fix error logging to be more clear and separate out different log types -- Portfolio Tracking 📊: Develop a feature to track the bot's token portfolio, showing Profit and Loss. Implement a database for this functionality. -- Database Schema 🗄️: Develop a schema for a database to manage the bot's portfolio and other necessary aspects to track. -- Improved Error Handling 🐞: Enhance the bot's error handling and console logging for easier debugging and more comprehensive error coverage. -- Deployment Strategy 🚀: Create a strategy for deploying the bot remotely, setting the stage for frontend development. -- Frontend Web App 💻: Develop a frontend web application that can be used to manage the bot remotely via a desktop browser or mobile device. -- Multi-chain Functionality ⛓️: Expand the bot's capability to manage multiple EVM-based networks, moving beyond BSC to other chains like Ethereum, Polygon, etc. -- Performance Optimization ⚡: Monitor the bot's performance and identify areas for optimization to ensure it runs efficiently under different network conditions. -- Security Improvements 🔒: Constantly review and improve the bot's security, ensuring that sensitive information like account details remains secure. -- User Customization 🛠️: Allow users to customize bot settings, such as the minimum transaction value or the list of whitelisted/blacklisted tokens. - +- Fix issue with approving same token over and over +- Fix error logging to be more clear and separate out different log types +- Portfolio Tracking 📊: Develop a feature to track the bot's token portfolio, showing Profit and Loss. Implement a database for this functionality. +- Database Schema 🗄️: Develop a schema for a database to manage the bot's portfolio and other necessary aspects to track. +- Improved Error Handling 🐞: Enhance the bot's error handling and console logging for easier debugging and more comprehensive error coverage. +- Deployment Strategy 🚀: Create a strategy for deploying the bot remotely, setting the stage for frontend development. +- Frontend Web App 💻: Develop a frontend web application that can be used to manage the bot remotely via a desktop browser or mobile device. +- Multi-chain Functionality ⛓️: Expand the bot's capability to manage multiple EVM-based networks, moving beyond BSC to other chains like Ethereum, Polygon, etc. +- Performance Optimization ⚡: Monitor the bot's performance and identify areas for optimization to ensure it runs efficiently under different network conditions. +- Security Improvements 🔒: Constantly review and improve the bot's security, ensuring that sensitive information like account details remains secure. +- User Customization 🛠️: Allow users to customize bot settings, such as the minimum transaction value or the list of whitelisted/blacklisted tokens. diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..6984633 --- /dev/null +++ b/changelog.md @@ -0,0 +1,38 @@ +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog], +and this project adheres to [Semantic Versioning]. + +## [Unreleased] + +- / + +## [0.0.2] - 2023-05-16 + +### Added + +- Approval function in the erc20.js file for the approval of the token +- Update sellToken.js file to include the approval function and double allowance if less then sell amount + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Security + +## [0.0.1] - 2023-05-16 + +- initial release + + +[keep a changelog]: https://keepachangelog.com/en/1.0.0/ +[semantic versioning]: https://semver.org/spec/v2.0.0.html + + +[unreleased]: https://github.com/Author/Repository/compare/v0.0.2...HEAD +[0.0.2]: https://github.com/Author/Repository/compare/v0.0.1...v0.0.2 +[0.0.1]: https://github.com/Author/Repository/releases/tag/v0.0.1 \ No newline at end of file diff --git a/folderstruct.tree b/folderstruct.tree index f2110ea..6d735aa 100644 --- a/folderstruct.tree +++ b/folderstruct.tree @@ -23,4 +23,8 @@ │ └── whitelist.json ├── package-lock.json ├── package.json +├── .gitignore +├── changelog.md +├── bump.json +├── TODO └── README.md \ No newline at end of file