Coder Social home page Coder Social logo

bsc-sniper's Introduction

Requires node.js https://nodejs.org/en/download/

Setup:

  1. Run npm install
  2. Add your values into the config.json file (see below)

To execute one or multiple buys:

  1. Run the script npm run buy
  2. Once it has loaded, press enter to execute a buy

To wait for liquidity pair creation and auto-buy

  1. Run the script npm run snipe
  2. It will wait until liquidity pair creation event and immediately execute a single buy when that happens.

config.json values YOU MUST ADD THESE:

Copy config.example.json file in this folder and rename to just config.json. Then fill in the values for your wallet and transaction.

{
  "tokenAddress": "", // Token address to fetchBuy - YOU MUST ADD THIS
  "walletAddress": "", // Your BEP20 public address - YOU MUST ADD THIS
  "mnemonic": "", // Your wallet private mnemonic seed phrase - YOU MUST ADD THIS
  "bnbAmount": ".01", // Amount of BNB to spend
  "gasGwei": "10", // Gas price
  "gasLimit": 300000, // Gas limit
  "tokenConfig": "BNB" // Blockchain token config to use. See Advanced usage. Also displays this value when sniping
}

config.bnb.values ADVANCED USAGE FOR OTHER ETH FORK BLOCKCHAINS:

Copy this file and rename to config.<token>.json. Then setting the "tokenConfig" property to that value in config.json will allow you to fetchBuy a different chain.

{
  "wbnbAddress": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", // Token address for WBNB. Do not change unless you know what you're doing.
  "routerAddress": "0x10ed43c718714eb63d5aa57b78b54704e256024e", // Router address for PCS. Do not change unless you know what you're doing.
  "factoryAddress": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73", // Factory address for PCS, used to detect pair creation. Do not change unless you know what you're doing.
  "websocketUrl": "wss://bsc-ws-node.nariox.org:443", // Url for BSC websocket. Do not change unless you know what you're doing.,
  "scanUrl": "https://bscscan.com/", // Url for BSCscan for transaction url in terminal
  "buyFunction": "swapExactETHForTokens" // Function to call to perform the token swap
}

bsc-sniper's People

Contributors

billy-the-ape avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.