Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ponzu.app/llms.txt

Use this file to discover all available pages before exploring further.

Installation

npm install @ponzu_app/sdk viem

@ponzu_app/sdk on NPM

Full package, changelog, and API docs.

Setup

import { createWalletClient, createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { privateKeyToAccount } from 'viem/accounts'

const account = privateKeyToAccount('0xYOUR_PRIVATE_KEY')
const wallet  = createWalletClient({ account, chain: mainnet, transport: http() })
const client  = createPublicClient({ chain: mainnet, transport: http() })
Replace mainnet with sepolia for testnet.

Deploy a Token

import { deploy } from '@ponzu_app/sdk'
import { parseEther } from 'viem'

const result = await deploy(
  {
    owner:          account.address,
    tokenName:      'My Token',
    tokenSymbol:    'MYTKN',
    metadata:       'ipfs://Qm...',
    imageURI:       'ipfs://Qm...',
    targetEthRaise: parseEther('5'),
  },
  wallet,
  client,
  'mainnet',
)
Parameters:
ParameterTypeDescription
ownerAddressWallet that receives creator fees and treasury
tokenNamestringERC-20 token name
tokenSymbolstringERC-20 token symbol
metadatastringIPFS, Arweave, or HTTPS URL to project metadata JSON
imageURIstringIPFS, Arweave, or HTTPS URL to token image
targetEthRaisebigintTarget presale raise in wei. Min: 3 ETH mainnet, 0.1 ETH Sepolia
Cost: 0.005 ETH creation fee + optional dev buy. Returns:
result.addresses.token          // ERC-20 token
result.addresses.presale        // Presale contract
result.addresses.farm           // LP staking farm
result.addresses.distributor    // Fee distribution
result.addresses.launcher       // DEX pool creator
result.addresses.ponzuBottle    // Presale position NFT
result.addresses.liquidityCard  // Farm position NFT
result.addresses.project        // Registry coordinator
result.addresses.operator       // Access control

Buy Presale

import { buy } from '@ponzu_app/sdk'
import { parseEther } from 'viem'

const tx = await buy(
  {
    presaleAddress: '0x...',
    ethAmount:      parseEther('0.5'),
    referrer:       '0x...',  // optional, earns 1% referral fee
  },
  wallet,
  client,
  'mainnet',
)
Returns a PonzuBottle NFT representing the presale position.

Refund

import { refund } from '@ponzu_app/sdk'

const tx = await refund(
  {
    presaleAddress: '0x...',
    bottleId:       1n,
  },
  wallet,
  client,
  'mainnet',
)
Returns 90% of ETH. The 10% token penalty redistributes pro-rata to remaining holders. Only before launch.

Claim Tokens

import { claim } from '@ponzu_app/sdk'

const tx = await claim(
  {
    presaleAddress: '0x...',
    bottleId:       1n,
  },
  wallet,
  client,
  'mainnet',
)
One claim per PonzuBottle. Tokens vest linearly over 10 days (or 10 weeks). Claiming early forfeits unvested tokens to the Distributor.

Swap

import { swap } from '@ponzu_app/sdk'
import { parseEther } from 'viem'

const tx = await swap(
  {
    tokenAddress: '0x...',
    amountIn:     parseEther('0.1'),
    direction:    'ethToToken',  // or 'tokenToEth'
  },
  wallet,
  client,
  'mainnet',
)
1% swap fee. 20% during first hour after launch, decaying linearly to 1%.

Network Configuration

import { getAddresses } from '@ponzu_app/sdk'

const addresses = getAddresses('mainnet')
// or
const addresses = getAddresses('sepolia')

// addresses.ponzuRecipe, .ponzuSwap, .ponzuRouter, .zapEth, .weth, etc.

MCP Server (AI Agent Integration)

For AI agents (Claude Desktop, Cursor, Claude Code):
{
  "mcpServers": {
    "ponzu": {
      "command": "npx",
      "args": ["-y", "@ponzu_app/mcp"],
      "env": {
        "PONZU_PRIVATE_KEY": "0x...",
        "PONZU_NETWORK": "mainnet"
      }
    }
  }
}
17 tools:
CategoryTools
Deploydeploy_token
Presalebuy_presale, refund_presale, claim_tokens, get_presale_info
Swapswap_eth_to_token, swap_token_to_eth, get_price
Farmstake_lp, unstake_lp, claim_farm_rewards
Readget_token_info, get_bottle_info, get_card_info, get_addresses
Utilityget_balance, approve_token
Set PONZU_NETWORK to sepolia for testnet.

@ponzu_app/mcp on NPM

Full MCP server package and configuration docs.

Raw Contract Interaction

For direct contract access without the SDK, see the ABI Reference. Factory contract (PonzuRecipe): 0x1155484c5fE614538d83c444f9a6dB662E6a7153