The library

Every bot and app behind this project, packaged to be read and run. No account, MIT licensed.

Block 04 · Ecosystem

The Library

The code behind everything on this page, packaged so someone who is not us can read it and run it. MIT licensed, no account. Builders only; everyone else can skip this.

Open the 14 bundles
bots, apps, tools · read in the browser or take the zip

The Bots

Everything that runs on its own. Cron triggers, signed transactions, no human at the wheel.

Buyback & Burn Bot The bot that has run every ten minutes since launch. 3 files · 1,311 lines · 16 KB
What you need to run it — and what else works
  • A wallet with a little gas in itours one BSC wallet, topped up from the tax itselfalso the token was launched on four.meme and trades on PancakeSwap V2; the swap calls are the only PancakeSwap-specific part
  • Somewhere that runs code on a scheduleours a Cloudflare Worker on a 10-minute cronalso a VPS with crontab, GitHub Actions, Fly.io, Railway, a Raspberry Pi, or node on your own machine
  • Somewhere to keep a small run logours one Cloudflare KV namespacealso Redis, SQLite, Postgres, or a JSON file on disk — it writes one entry per cycle
  • A BSC RPC endpointours the public endpoints, with failoveralso NodeReal, Ankr, QuickNode or your own node if you want the headroom
  • One secret at runtime: PRIVATE_KEYours wrangler secret putalso a .env file, your host's secret store — anything but the source code
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/buyback-bot.txt
Dev Sweep Bot The hourly one that empties the tax wallet. 3 files · 337 lines · 7 KB
What you need to run it — and what else works
  • A wallet that receives the taxours the same wallet the buyback bot spends fromalso any wallet — it only needs to be the one your token routes its fee to
  • Somewhere that runs code hourlyours a Cloudflare Worker on a cron triggeralso crontab, systemd timer, GitHub Actions, or any scheduler you already run
  • Somewhere to keep a cursorours one KV namespace, shared with the buyback botalso a file, a Redis key, a single database row — it stores very little
  • One secret at runtime: PRIVATE_KEYours wrangler secret putalso a .env file or your host's secret store
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/dev-sweep-bot.txt
Liquidity Add & LP Burn Adds liquidity, then burns the LP token it just received. 2 files · 388 lines · 7 KB
What you need to run it — and what else works
  • A wallet holding both sides of the pairours BNB and the token, in one walletalso any PancakeSwap V2 pair, and any BSC DEX sharing that router interface — the router is one constant
  • A machine that can run Node 18+ours run by hand, when we decide to addalso put it on a cron if you want it automatic; nothing in it needs a human
  • Slippage set for a fee-on-transfer tokenours ≥1500 bpsalso none — a normal 1% simply reverts. This is the single thing that breaks naive add-liquidity scripts
  • One secret at runtime: PRIVATE_KEYours a local .env filealso your shell environment, a secret manager, a hardware signer
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/liquidity-bot.txt
Telegram Bot Buy alerts, burn alerts, price, whale tracking, captcha. 12 files · 4,151 lines · 59 KB
What you need to run it — and what else works
  • A bot tokenours one from @BotFather, two minutes of workalso none — this is Telegram's only door
  • Somewhere to receive a webhook and run a cronours a single Cloudflare Worker doing bothalso any HTTPS endpoint: a small VPS, Deno Deploy, Vercel, Fly.io. Long-polling works too, at the cost of a process that never sleeps
  • Somewhere to keep stateours one Cloudflare KV namespacealso Redis, SQLite, Postgres — it stores the block cursor, the watchlist and the captcha queue
  • A BSC RPC endpoint that allows eth_getLogsours a keyed endpoint, with free ones as fallbackalso NodeReal, Ankr, QuickNode. Note that bsc-dataseed refuses log queries outright
  • One secret at runtime: BOT_TOKENours wrangler secret putalso any secret store your host offers
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/telegram-bot.txt
NFT Auto-Mint Bot Watches the pair and mints to the buyer, unasked. 2 files · 579 lines · 11 KB
What you need to run it — and what else works
  • A deployed ERC-721 it is allowed to mint fromours the contract in the NFT Buy Drops bundlealso any ERC-721 with a mint function and a minter role
  • A wallet with gasours the bot pays the mint, so the buyer pays nothingalso you could make the buyer claim and pay — but then it is a claim page, not a drop
  • Somewhere that runs code on a scheduleours a Cloudflare Worker cronalso crontab, GitHub Actions, any always-on process
  • Somewhere to keep the block cursorours one KV namespacealso a file or a database row. Whatever it is, it must be durable: this is what stops a restart double-minting
  • One secret at runtime: PRIVATE_KEYours wrangler secret putalso a .env file or your host's secret store
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/nft-mint-bot.txt
Prize Pool & Payout Bot Filled a prize pool from trading tax, then paid 39 wallets out. 5 files · 1,399 lines · 25 KB
What you need to run it — and what else works
  • A wallet holding the poolours a dedicated wallet, funded by a slice of the taxalso a multisig if the pool is large enough to be worth arguing about
  • Somewhere the entries and scores liveours the Supabase project from the Worldcup bundlealso any Postgres, or any store you can read a winners list out of
  • A machine that can run Node 18+ours run by hand, watched, one round at a timealso none worth having. This one sends money to strangers — do not put it on a cron
  • Secrets at runtime: PRIVATE_KEY, database URL and keyours a local .env filealso a secret manager. Never the source
  • A dry run firstours --dry-run, every single timealso there is no alternative. Read the script before you copy it
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/prize-pool-bot.txt

The Projects

The things people click. Each one shipped, each one still live or archived on this domain.

Pool Scanner Reads any BNB Chain pool. No backend at all. 6 files · 4,796 lines · 96 KB
What you need to run it — and what else works
  • A static hostours Cloudflare Pagesalso GitHub Pages, Netlify, Vercel, S3, nginx, or python -m http.server on your laptop
  • Public RPC endpointsours six, with failover, all freealso your own node if you expect traffic. Note the requests leave from the visitor's browser, not your server — which is why this costs nothing to run
  • Nothing elseours no backend, no database, no API key, no build stepalso that is the whole point of it
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/pool-scanner.txt
NFT Buy Drops The contract, the metadata server and the collection page. 10 files · 1,283 lines · 26 KB
What you need to run it — and what else works
  • A wallet with gas for the deploymentours one transaction on BSC, a few centsalso any EVM chain — the contract is plain Solidity with no chain-specific parts
  • Somewhere to serve the metadataours a small Cloudflare Workeralso static JSON files on any host. It is one file per token id and nothing else
  • Somewhere to host the imagesours our own domain, over plain HTTPSalso IPFS or Arweave — but link them by https gateway. Several marketplaces will not resolve an ipfs:// URL
  • Your marketplace metadata set BEFORE you renounceours set, checked, then renouncedalso none. After renouncing it is permanent, and no marketplace can help you
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/nft-drop.txt
Worldcup Tipping Game A full tournament game that paid out on-chain. 45 files · 11,234 lines · 0.2 MB
What you need to run it — and what else works
  • A Postgres with row-level security and authours Supabase, free tier, all the way throughalso any Postgres plus an auth layer. The schema is plain SQL; the RLS policies are the part worth reading
  • Somewhere that pulls fixtures on a scheduleours a Cloudflare Worker cronalso any scheduler. It fetches, compares and writes — nothing exotic
  • A fixtures and results feedours football-data.org, free tieralso any sports API, or type the results in by hand for a small tournament
  • A wallet, only if you pay out on-chainours one wallet, one payout script, 39 transactionsalso skip it entirely and the game still works — the prize pool is optional scaffolding
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/worldcup-tipgame.txt
Burn & Add Liq — Browser Game One HTML file. Jump, burn, dodge the dumps. 2 files · 1,198 lines · 20 KB
What you need to run it — and what else works
  • A static hostours Cloudflare Pagesalso anything that can serve one HTML file. Open it from disk and it plays
  • A score table, only if you want the boardours one Supabase table; the SQL is in the bundlealso any database with an HTTP API, or leave it out — the game runs fine and keeps scores locally
  • To know what a public score table meansours anyone holding the browser key can post a scorealso put the insert behind your own endpoint, or add an upper bound, if the board is meant to be competitive
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/browser-game.txt
brainScreener Thirteen self-tests. No accounts, no tracking, no backend. 52 files · 9,595 lines · 0.2 MB
What you need to run it — and what else works
  • A static hostours Cloudflare Pagesalso any of them. There is no build step and no framework
  • Nothing elseours no database, no accounts, no analytics, no cookiesalso the answers never leave the browser, which is a design decision rather than a shortcut
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/brainscreener.txt
Agent Tools — MCP & llms.txt What an AI agent sees when it asks this project a question. 4 files · 1,800 lines · 43 KB
What you need to run it — and what else works
  • A machine that can run Node 18+ours the MCP server over stdio, locallyalso point any MCP client at it — Claude Desktop, Claude Code, Cursor, or your own
  • Somewhere to serve the HTTP toolsours the Pages worker already serving the sitealso any HTTPS endpoint, or skip it and run the MCP server only
  • No keys at allours every tool reads public chain dataalso there is nothing to secure here, which is why it can be pointed at an agent without a second thought
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/agent-tools.txt
The Agent Service — x402, Broker & Census An agent that sells something, and gets paid without a human in the loop. 35 files · 8,657 lines · 0.2 MB
What you need to run it — and what else works
  • A wallet to be paid intoours one BSC wallet, separate from the botsalso any address — it is only ever a recipient, and the worker never holds its key
  • Somewhere that runs code on a scheduleours a Cloudflare Worker, 15-minute cronalso anything with a timer — the cron drives the watch sweep, the daily census and the canary
  • Somewhere to keep watches and the censusours one KV namespacealso Redis, SQLite, Postgres — it stores one record per watch and one blob per census tick
  • A payment facilitator, or noneours the public Dexter facilitator for the standard routealso the direct-transfer route needs no facilitator at all, which is why both are offered
  • A BSC RPC endpointours the public endpoints, with failoveralso any node — note that some public RPCs cannot serve eth_getTransactionReceipt, which payment verification needs
  • Two secrets at runtime: X402_WALLET and the admin trigger secretours wrangler secret putalso the ownership proofs in the catalogue are signed offline and pasted in as constants — the private key never reaches the worker
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/agent-service.txt
The Census — reading a whole registry Every agent id on BNB Chain, and every job they were ever paid for. 7 files · 3,866 lines · 79 KB
What you need to run it — and what else works
  • Node 18+ and timeours about three hours for the registry, twenty minutes for the jobsalso both resume, so it can be run in pieces — the state file is the progress
  • RPC endpointsours eleven public BSC nodes in rotation, 25 calls per batchalso any node list. Breadth matters more than speed: each one rate-limits separately, and 40 per batch is refused where 25 goes through
  • No keysours every call is a readalso nothing here can move anything, which is why it can be pointed at a stranger’s contract without a second thought
↓ Download .zip Plain text ↗
Hand the whole thing to an AI curl -sL https://brainonbnb.com/code/chain-census.txt
For agents and scripts: index.txt manifest.json