Skip to content

ngubased/hoodpump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🟡 HoodPump Integration Examples

HoodPump

One transaction: ERC20 + Uniswap V4 pool + LP + Agent NFT. That's a launch on HoodPump, the token launchpad running on Robinhood Chain. This repo shows you exactly how to plug your own app, bot, or backend into it: no middlemen, no proprietary SDK, just a public API and a factory contract you call directly.

If you're building a launch UI, a Telegram/Discord launch bot, a trading terminal, or anything that wants to originate or read HoodPump launches, this is the reference implementation. Fork it, rip out what you don't need, ship it.

How a launch actually works

A launch is two steps glued together:

  1. Off-chain (HTTP): POST your logo + project metadata to the HoodPump API. It pins everything to IPFS and hands back a signed voucher that authorizes minting the project's Agent NFT.
  2. On-chain (one tx): call HoodPumpFactory.deploy() with that voucher. In a single transaction the factory deploys your ERC20, opens a Uniswap V4 pool, seeds a one-sided LP position, mints the Agent NFT to you, and (if you want) runs an immediate dev buy.
 your app
    │
    │ 1. POST /api/launch/prepare  (logo, name, symbol, description, links)
    ▼
 HoodPump API ──▶ pins to IPFS ──▶ signs Agent NFT voucher
    │
    │ 2. { projectCid, agentCid, agentSignature }
    ▼
 your app
    │
    │ 3. factory.deploy(DeployParams)   ← one on-chain tx, real ETH gas
    ▼
 HoodPumpFactory  ──▶  ERC20 + V4 pool + LP + Agent NFT, all live

Whoever holds the Agent NFT earns the project's share of LP trading fees, forever, or until they transfer the NFT. That's the whole creator-rewards model in one sentence.

What's in this repo

abis/
  HoodPumpFactory.json   deploy(), read views, TokenDeployed event
  HoodPumpLocker.json    reward-token whitelist checks
  ERC20.json             minimal approve/balanceOf/decimals/symbol
src/
  config.js              chain, deployed addresses, API base: one source of truth
examples/
  1-prepare-metadata.js     step 1: pin logo + metadata, get the Agent NFT voucher
  2-launch-token.js         step 2: the actual deploy() transaction, start to finish
  3-read-launches.js        read-only: browse launches through the factory
  4-check-reward-token.js   read-only: is a token whitelisted for reward payouts?
  5-fetch-analytics.js      read-only: trending / top market cap / volume feeds

No factory source code here on purpose. The contracts are already verified on the block explorer if you want to read them. This repo is the client side: how to call them correctly.

Quick start

git clone <this-repo>
cd hoodpump-integration-examples
npm install
cp .env.example .env
# edit .env: set PRIVATE_KEY to a hot wallet funded with a small amount of ETH
# Read-only, no wallet needed: see it work first
node examples/3-read-launches.js

# The real thing: launch a token end to end
node examples/2-launch-token.js \
  --logo ./logo.png --name "My Token" --symbol "MTK" \
  --paired WETH --tokenType meme --devBuy 0.01

That's it. Your token is live, tradeable, and has an LP the moment the transaction confirms.

Prerequisites

  • Node.js 18+
  • A wallet with a small amount of ETH on Robinhood Chain (chain id 4663), covering gas plus the on-chain deploymentFee (currently ~0.000001 ETH; read it live from the contract, don't hardcode it, see 2-launch-token.js)
  • A logo file (PNG/JPG)

Deployed addresses (Robinhood Chain, id 4663)

Contract Address
HoodPumpFactory 0x120975D920179dA71D00c2A3f9FA6f0ccF2A94cc
Agents (project NFT) 0x967F96eD9aEcB0b9EF3f34532d931702F39Cf24B
HoodPumpLocker 0xAfE87E46d83B8c726B206Ea7EeAcd9A52452DBdB
WETH 0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73
USDG 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168

RPC: https://rpc.mainnet.chain.robinhood.com · Explorer: https://robinhoodchain.blockscout.com

These live in src/config.js, one file, edit once, everything picks it up.

Gotchas that will revert your tx if you skip them

  • startingTick and fee must be exact members of getValidTicks(pairedToken, tokenType) / getAllowedFees(tokenType). Read them live, don't guess, see 2-launch-token.js.
  • deploymentFee changes over time. Always read it from the contract right before you send deploy(), and add it to whatever ETH you're sending for a dev buy.
  • Reward tokens must be pre-whitelisted. Setting hasRewards: true with a rewardToken that isn't whitelisted on the locker reverts with RewardTokenNotWhitelisted. Check first with 4-check-reward-token.js. If you need a new one whitelisted, ask the HoodPump team, there's no self-service path.
  • The Agent NFT voucher is single-use and tied to its exact metadata. You can't reuse an agentSignature from a previous /api/launch/prepare call with different name/symbol. Always call prepare fresh right before you deploy.

Support

Questions, found a bug in these examples, or want a reward token whitelisted? Reach out to the HoodPump team on X: @HoodPumps


Built different. Ship your launch. 🟢