botAgentHub / README.md
anand0x's picture
feat: init hf deploy
274aa98 unverified
|
Raw
History Blame Contribute Delete
3.88 kB
metadata
title: botAgentHub
emoji: 🤖
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false

BOT Agent Hub

BOT Agent Hub is an on-chain-native agent infrastructure primitive for BOT Chain:

  • AgentRegistry.sol as canonical source of truth
  • Public directory and agent detail pages
  • Wallet-based registration flow
  • Event indexer that serves fast list queries

Monorepo Layout

  • apps/web - Next.js app (/, /agents, /agents/[id], /register, /me, /docs)
  • apps/indexer - Node.js + viem + Postgres event listener/API
  • packages/contracts - Foundry smart contracts/tests
  • packages/shared - Shared chain and type definitions

Deployments

Network Address Block Tx
Bohr Testnet (968) 0xe8B222746c5AA98B9cB3f3aa3aB565d2BD525074 11897190 0x7cd2…87e5
BOT Mainnet (677)

Networks

Network Chain ID RPC Symbol Status
Local Anvil 677 http://127.0.0.1:8545 BOT Dev loop
BOT Chain Testnet (Bohr) 968 https://rpc.bohr.life tBOT V1 target
BOT Chain Mainnet 677 https://rpc.botchain.ai BOT Gated — see warning

⚠️ Mainnet Warning: Mainnet's public RPC has eth_getLogs disabled. The indexer's getLogs backfill will fail against rpc.botchain.ai. Use a third-party RPC or a WebSocket subscription before promoting to mainnet. Source: BOT Chain Developer Docs.

Quick Start (Bohr Testnet - Default)

1. Configure Prerequisites

  1. Claim tBOT from the faucet at the Bohr Faucet Claim Page using a test wallet.
  2. Add BOT Chain Testnet to MetaMask:

2. Install Dependencies

pnpm install

3. Deploy Registry Contract to Bohr Testnet

cd packages/contracts
DEPLOYER_PRIVATE_KEY=0x... forge script script/DeployAgentRegistry.s.sol:DeployAgentRegistry \
  --rpc-url https://rpc.bohr.life \
  --broadcast

Record the deployed contract address and start block.

4. Setup Environment Files

Create your environment configurations by copying templates:

  • Root / indexer: .env.example.env (Set AGENT_REGISTRY_ADDRESS and START_BLOCK)
  • Web: apps/web/.env.local.exampleapps/web/.env.local (Set NEXT_PUBLIC_AGENT_REGISTRY_ADDRESS)

5. Start Indexer

pnpm indexer:dev

6. Start Web App

pnpm web:dev

Local Development (Anvil Inner Loop)

For rapid iteration without testnet transactions, run the local dev loop:

  1. Start Anvil local node:
    anvil --chain-id 677 --port 8545
    
  2. Deploy contract to Anvil:
    cd packages/contracts
    DEPLOYER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 forge script script/DeployAgentRegistry.s.sol:DeployAgentRegistry --rpc-url http://127.0.0.1:8545 --broadcast
    
  3. Configure Environment Variables: In your root .env and apps/web/.env.local files, update:
    • BOT_NETWORK=local / NEXT_PUBLIC_BOT_NETWORK=local
    • AGENT_REGISTRY_ADDRESS=0x5FbDB2315678afecb367f032d93F642f64180aa3
  4. Start local Postgres DB container:
    docker run --name bot-postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=bot_agent_hub -p 5432:5432 -d postgres
    
  5. Start services:
    pnpm indexer:dev
    pnpm web:dev
    

Deployment

  • Deploy contract from packages/contracts.
  • Set deployed address in indexer/web env vars.
  • Deploy apps/web to Vercel.
  • Deploy apps/indexer to Railway/Fly (see apps/indexer/Dockerfile).

Safety

Alpha software. No custody of private keys. Use at your own risk.