Giter VIP home page Giter VIP logo

solana-pump-fun's Introduction

Solana Pump Fun

Notice: This project was inspired by https://github.com/Allen-Taylor/pump_fun_py and modified for use in typescript with some extra additions. Also modified the code to send the associated token account creation in a single transaction with the buy or sell for increased speed.

Solana Pump Fun is an open-source package designed to facilitate the execution and simulation of buy and sell transactions for pump.fun on the Solana blockchain. This tool is useful for developers and enthusiasts looking to understand transaction mechanics and resource consumption on Solana.

Features

  • Simulates buy and sell transactions for pump.fun on the Solana blockchain.
  • Executes buy and sell transactions for pump.fun on the Solana blockchain.
  • Provides detailed logs of transaction steps and resource consumption.
  • Easy to use and integrate into existing projects.

Prerequisites

Ensure you have the following installed:

Installation

To install the package, clone the repository and install the dependencies:

git clone https://github.com/bilix-software/solana-pump-fun.git
cd solana-pump-fun
npm install

Configuration

Before running the simulation, you need to set up your private key and specify the token mint. Open the example.ts file and replace the placeholder values with your actual private key and token mint address.

Example Configuration

In example.ts, set your private key, token mint address, and transaction mode:

const privateKey = 'your_private_key'; // Replace with your actual private key
const mintAddress = 'your_token_mint_address'; // Replace with actual token mint address
const txMode = TransactionMode.Simulation; // Set to Simulation to test, Execution to perform

Usage

To run the example simulation scripts, use Node.js to execute the example.js file or compile and run the example.ts file. This will simulate buy and sell transactions and output detailed logs.

Running the Simulation

  1. Ensure your example.ts file is correctly configured.
  2. Compile the TypeScript files:
npx tsc
  1. Run the compiled JavaScript file:
node example.js

Simulate Transactions

If you prefer to run the transactions in simulation mode (without actual transactions on the blockchain), ensure the txMode is set to TransactionMode.Simulation. This mode will help you understand the transaction process without incurring any cost.

Example Output

Below is an example of the output generated when running the simulation:

Example Output

Project Structure

  • src/: Contains the source code for the package.
  • example.js: Example script to demonstrate how to use the package.
  • example.ts: TypeScript version of the example script.
  • package.json: Project metadata and dependencies.
  • tsconfig.json: TypeScript configuration file.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your improvements.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

solana-pump-fun's People

Contributors

bilix-software 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.