npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bebop-xyz-swap

v1.0.0

Published

A decentralized exchange (DEX) bot for automated token swaps on Bebop

Readme

Bebop Swap

A decentralized exchange (DEX) bot for automated token swaps on Bebop.

Sources:

Features

  • Automated token swaps on Bebop
  • Support for multiple networks (Ethereum, Arbitrum, Base, Blast, Optimism, Polygon POS & Taiko)
  • Support for WETH to Token swaps
  • Support for Token to Token swaps
  • Configurable slippage tolerance
  • Gas optimization

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • MetaMask or other Web3 wallet
  • Network access (Ethereum, Arbitrum, etc.)

Installation

  1. Clone the repository:
git clone https://github.com/shakilkhan1801/bebop-xyz-swap.git
cd bebop-xyz-swap
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory and add your configuration:
PRIVATE_KEY=your_wallet_private_key
INFURA_URL=your_infura_url

Network Configuration

Bebop Contract Addresses

Note: All contract addresses are sourced from Bebop's official documentation. For API integration details, refer to the Bebop Router API Playground.

  1. PMM RFQ Settlement Smart Contract:

    • Address: 0xbbbbbBB520d69a9775E85b458C58c648259FAD5F
    • Same address on all supported networks
  2. JAM Smart Contract: | Network | Settlement | Balance Manager | |---------|------------|-----------------| | Ethereum, Arbitrum, Polygon, BNB Chain, Blast, Mode, Optimism, Base, Scroll, Taiko | 0xbEbEbEb035351f58602E0C1C8B59ECBfF5d5f47b | 0xfE96910cF84318d1B8a5e2a6962774711467C0be | | zkSync | 0x574d1fcF950eb48b11de5DF22A007703cbD2b129 | 0x10D7a281c39713B34751Fcc0830ea2AE56D64B2C |

Configuration Steps

  1. Network Selection:

    • Open config.js
    • Set the desired network:
      const chainId = 1; // 1 for Ethereum, 137 for Polygon, etc.
      const chainName = "ethereum"; // ethereum, polygon, arbitrum, etc.
  2. Contract Addresses:

    • Update BEBOP_ADDRESS with the correct PMM RFQ Settlement address
    • Update SPENDER_ADDRESS in approval.js based on your selected network
  3. Token Addresses:

    • In tokensAddressesSell, add the token address you want to sell
    • In tokensAddressBuy, add the token address you want to buy
    • Example:
      const tokensAddressesSell = ["0x..."]; // Token to sell
      const tokensAddressBuy = ["0x..."]; // Token to buy

Wallet Setup

  1. MetaMask Installation:

    • Install MetaMask browser extension from metamask.io
    • Create a new wallet or import existing one
    • Make sure you have some ETH (or network's native token) for gas fees
  2. Getting Private Key:

    • Open MetaMask
    • Click on three dots (⋮) next to your account
    • Go to "Account Details"
    • Click "Export Private Key"
    • Enter your MetaMask password
    • Copy the private key and paste it in your .env file
  3. Infura Setup:

    • Go to infura.io
    • Create a free account
    • Create a new project
    • Copy the project's HTTP endpoint
    • Paste it in your .env file as INFURA_URL
  4. Token Approvals:

    • Before swapping, you need to approve tokens for Bebop
    • Run the approval script first:
    node approval.js
    • This will set the approval amount for Bebop to spend your tokens
    • The approval amount (e.g., 1000000) is the maximum amount you can swap
    • If you want to swap more tokens later, you'll need to run the approval script again with a higher amount
    • After running the approval script, you'll see a transaction in MetaMask
    • Click "Confirm" in MetaMask to complete the approval
    • Once approved, you can run the swap script multiple times up to the approved amount

Usage

WETH to Token Swap

node weth-to-token/index.js

Token to Token Swap

node Token-to-Token/index.js

Configuration

You can configure the following parameters in your .env file:

  • PRIVATE_KEY: Your wallet's private key
  • INFURA_URL: Your Infura project URL
  • SLIPPAGE_TOLERANCE: Maximum allowed slippage (default: 0.5%)
  • GAS_LIMIT: Maximum gas limit for transactions

Security

⚠️ Important Security Notes:

  1. Never commit your .env file or expose your private keys
  2. Always test with small amounts first
  3. Be aware of potential front-running risks
  4. Monitor gas prices before executing swaps
  5. Never share your private key with anyone
  6. Use a dedicated wallet for testing
  7. Always verify contract addresses before swapping

Contributing

We welcome contributions! Please see our CONTRIBUTING.md file for guidelines.

License

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

Support

If you encounter any issues or have questions, please:

  1. Check the Issues page
  2. Create a new issue if your problem isn't already listed
  3. Join our community discussions

Disclaimer

This software is for educational purposes only. Use at your own risk. The authors are not responsible for any financial losses incurred while using this bot.