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

axolotl-evm

v1.0.0

Published

SDK for interacting with Tokena bonding curve smart contracts on EVM chains

Readme

Axolotl

SDK for interacting with Tokena bonding curve smart contracts on EVM chains.

Create, trade, and manage bonding curve tokens with a single npm package. Works in Node.js, browsers, and React apps.

Install

npm install axolotl-evm

Peer dependency: ethers ^6.0.0 (you must install it separately)

npm install ethers

Quick Start — Node.js / Backend

import { Axolotl } from 'axolotl-evm';
import { Wallet, JsonRpcProvider } from 'ethers';

// Initialize SDK
const axolotl = new Axolotl({ chainKey: 'sepolia' });

// Connect a wallet
const provider = new JsonRpcProvider('https://ethereum-sepolia-rpc.publicnode.com');
const wallet = new Wallet(process.env.PRIVATE_KEY!, provider);

// Read token state
const state = await axolotl.getTokenState('0xYourToken...');
console.log(`Price: ${state.currentPriceEth} ETH`);
console.log(`Progress: ${(state.ethBalance / state.ethThreshold * 100).toFixed(1)}%`);

// Get a buy quote
const quote = await axolotl.quoteBuy('0xYourToken...', 0.5);
console.log(`You'll get ~${quote.tokensOut.toLocaleString()} tokens`);

// Execute a buy
const tx = await axolotl.buy(
  { tokenAddress: '0xYourToken...', ethAmount: '0.5' },
  wallet
);
console.log(`Bought! TX: ${tx.txHash}`);

// Check & claim fees
const pending = await axolotl.getPendingFees('0xYourToken...', wallet.address);
if (pending > 0) {
  const claim = await axolotl.claimFees('0xYourToken...', wallet);
  console.log(`Claimed ${pending} ETH! TX: ${claim.txHash}`);
}

Quick Start — React

import { AxolotlProvider, useAxolotlWallet, usePoolState, useTrade } from 'axolotl-evm/react';

function App() {
  return (
    <AxolotlProvider chainKey="sepolia">
      <TradingPanel tokenAddress="0xYourToken..." />
    </AxolotlProvider>
  );
}

function TradingPanel({ tokenAddress }: { tokenAddress: string }) {
  const { address, connect, getSigner } = useAxolotlWallet();
  const { state, isLoading } = usePoolState(tokenAddress);
  const { quoteBuy, buy, loading, error } = useTrade();

  const handleBuy = async () => {
    const signer = await getSigner();
    if (!signer) return;
    const result = await buy({ tokenAddress, ethAmount: '0.1' }, signer);
    if (result) alert(`Bought! TX: ${result.txHash}`);
  };

  if (isLoading) return <p>Loading...</p>;

  return (
    <div>
      <p>Price: {state?.currentPriceEth} ETH</p>
      <p>Reserve: {state?.ethBalance} / {state?.ethThreshold} ETH</p>
      {!address ? (
        <button onClick={connect}>Connect Wallet</button>
      ) : (
        <button onClick={handleBuy} disabled={loading}>
          {loading ? 'Buying...' : 'Buy 0.1 ETH'}
        </button>
      )}
      {error && <p style={{ color: 'red' }}>{error}</p>}
    </div>
  );
}

API Reference

new Axolotl(config)

| Option | Type | Description | |---|---|---| | chainKey | string | Default chain (e.g. "sepolia", "ethereum", "bsc") | | chains | Record<string, ChainConfig> | Custom chain configs to add or override | | factoryAddress | string | Override factory address for the default chain |

Core Methods

| Method | Description | |---|---| | getTokenState(addr) | Read full on-chain state (price, reserves, threshold, tax) | | getTokenBalance(token, wallet) | Get wallet's token balance | | createToken(params, signer) | Deploy a new bonding curve token | | getCreationFee() | Get the factory's creation fee | | getFactoryConfig() | Get all factory settings | | quoteBuy(token, ethAmount) | Estimate tokens out for an ETH amount | | quoteSell(token, tokenAmount, slippage) | Estimate ETH out for a token amount | | buy(params, signer) | Buy tokens | | sell(params, signer) | Sell tokens | | getPendingFees(token, wallet) | Check claimable fees | | claimFees(token, signer) | Claim accumulated fees | | getClaimHistory(token, wallet) | Scan historical claim events |

React Hooks (axolotl-evm/react)

| Hook | Description | |---|---| | useAxolotlWallet(targetChain?) | MetaMask connection + chain switching | | usePoolState(tokenAddr) | Auto-polling token state (10s interval) | | useTrade(chainKey?) | Buy/sell with loading & error state | | useClaimFees(tokens, wallet) | Multi-token fee management | | useAxolotl() | Access the raw SDK instance from context |


Supported Chains

| Chain | Key | Factory | |---|---|---| | Sepolia Testnet | sepolia | 0x109d869521d668F8b3e93610D7BC794981d28EA4 | | Ethereum | ethereum | Coming soon | | BNB Chain | bsc | Coming soon | | Base | base | Coming soon | | Arbitrum | arbitrum | Coming soon |

Custom Chains

const axolotl = new Axolotl({
  chainKey: 'mychain',
  chains: {
    mychain: {
      chainId: 31337,
      name: 'My Local Chain',
      shortName: 'LOCAL',
      rpcUrl: 'http://localhost:8545',
      explorerUrl: 'http://localhost:4000',
      nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 },
      factoryAddress: '0x...',
    },
  },
});

License

MIT