|
| 1 | +# Base Sepolia Public Agent Network Rehearsal |
| 2 | + |
| 3 | +Status: operator runbook and non-secret plan for issue #164. |
| 4 | + |
| 5 | +This is a Base Sepolia public testnet rehearsal path. It is not production, not mainnet readiness, not an audit result, and not approval for uncapped value-bearing use. |
| 6 | + |
| 7 | +## Configured Deployer |
| 8 | + |
| 9 | +The current public testnet deployer address is: |
| 10 | + |
| 11 | +```text |
| 12 | +0x69F55917209C446bf9d31D2903e01966B75a8cDe |
| 13 | +``` |
| 14 | + |
| 15 | +Explorer: |
| 16 | + |
| 17 | +```text |
| 18 | +https://sepolia.basescan.org/address/0x69F55917209C446bf9d31D2903e01966B75a8cDe |
| 19 | +``` |
| 20 | + |
| 21 | +Only the public address belongs in Git. Never include private keys, RPC URLs, explorer API keys, `.env` content, seed phrases, or wallet secrets in docs, GitHub issues, PR comments, screenshots, or committed artifacts. |
| 22 | + |
| 23 | +## What The Rehearsal Deploys |
| 24 | + |
| 25 | +`script/DeployPublicAgentNetworkBaseSepolia.s.sol` deploys and smoke-exercises: |
| 26 | + |
| 27 | +- `BaseOnchainAgentMemory` |
| 28 | +- `AgentClassRegistry` |
| 29 | +- `ToolRegistry` |
| 30 | +- `AgentProfileRegistry` |
| 31 | +- `AgentLaunchBondEscrow` |
| 32 | +- `AgentMemoryFuelVault` |
| 33 | +- `AgentLineageRegistry` |
| 34 | +- `AgentReceiptAnchor` |
| 35 | +- `AgentShellFactory` |
| 36 | +- `AgentFactory` |
| 37 | +- `SwarmPolicyRegistry` |
| 38 | +- `SwarmRegistry` |
| 39 | +- `SwarmBudgetVault` |
| 40 | +- `SwarmFactory` |
| 41 | +- `PublicNetworkBaseSepoliaToken` test token |
| 42 | + |
| 43 | +The script then emits public-safe evidence for class/tool registration, launch bond policy, memory fuel policy, one deployer-owned task-scout agent launch, one receipt anchor, one research swarm, and the swarm budget deposit/line/reserve/release/spend path. |
| 44 | + |
| 45 | +## Plan-Only Command |
| 46 | + |
| 47 | +This writes the committed non-secret plan artifact and does not require a private key: |
| 48 | + |
| 49 | +```powershell |
| 50 | +npm run public-agent-network:base-sepolia:plan -- --deployer-address 0x69F55917209C446bf9d31D2903e01966B75a8cDe --json |
| 51 | +``` |
| 52 | + |
| 53 | +Default output: |
| 54 | + |
| 55 | +```text |
| 56 | +fixtures/deployments/public-agent-network-base-sepolia-plan.json |
| 57 | +``` |
| 58 | + |
| 59 | +## Required Local Environment For Dry Run Or Broadcast |
| 60 | + |
| 61 | +```powershell |
| 62 | +$env:BASE_SEPOLIA_RPC_URL="<base-sepolia-rpc-url>" |
| 63 | +$env:BASE_SEPOLIA_DEPLOYER_KEY_HEX="<0x-prefixed-32-byte-testnet-key>" |
| 64 | +$env:BASE_SEPOLIA_PUBLIC_AGENT_DEPLOYER_ADDRESS="0x69F55917209C446bf9d31D2903e01966B75a8cDe" |
| 65 | +``` |
| 66 | + |
| 67 | +Optional source-verification key: |
| 68 | + |
| 69 | +```powershell |
| 70 | +$env:BASE_SEPOLIA_BASESCAN_API_KEY="<basescan-api-key>" |
| 71 | +``` |
| 72 | + |
| 73 | +The Foundry script derives the address from `BASE_SEPOLIA_DEPLOYER_KEY_HEX` and rejects the run if it does not equal `BASE_SEPOLIA_PUBLIC_AGENT_DEPLOYER_ADDRESS`. |
| 74 | + |
| 75 | +## Dry Run |
| 76 | + |
| 77 | +Run this before any broadcast: |
| 78 | + |
| 79 | +```powershell |
| 80 | +npm run public-agent-network:base-sepolia -- --json |
| 81 | +``` |
| 82 | + |
| 83 | +Default dry-run artifact: |
| 84 | + |
| 85 | +```text |
| 86 | +fixtures/deployments/public-agent-network-base-sepolia.latest.json |
| 87 | +``` |
| 88 | + |
| 89 | +## Broadcast |
| 90 | + |
| 91 | +Broadcast only after the deployer is funded on Base Sepolia and the operator accepts testnet gas spend: |
| 92 | + |
| 93 | +```powershell |
| 94 | +npm run public-agent-network:base-sepolia:broadcast -- --json |
| 95 | +``` |
| 96 | + |
| 97 | +After broadcast, keep the Foundry `broadcast/` folder ignored. Copy only non-secret facts into the deployment artifact or dated evidence doc: |
| 98 | + |
| 99 | +- deployer address; |
| 100 | +- contract names and addresses; |
| 101 | +- deploy and smoke transaction hashes; |
| 102 | +- deployment and smoke blocks; |
| 103 | +- readback report paths; |
| 104 | +- source-verification status per contract. |
| 105 | + |
| 106 | +## Bounded Readback |
| 107 | + |
| 108 | +Read back only explicit addresses and a bounded block range: |
| 109 | + |
| 110 | +```powershell |
| 111 | +npm run public-agent-network:base-sepolia:readback -- --rpc-url $env:BASE_SEPOLIA_RPC_URL --deployment-artifact fixtures/deployments/public-agent-network-base-sepolia.latest.json --from-block <deployBlock> --to-block <latestBlock> |
| 112 | +``` |
| 113 | + |
| 114 | +Default outputs: |
| 115 | + |
| 116 | +```text |
| 117 | +fixtures/deployments/public-agent-network-base-sepolia-readback.latest.json |
| 118 | +fixtures/deployments/public-agent-network-base-sepolia-readback.latest.md |
| 119 | +``` |
| 120 | + |
| 121 | +The readback script requires Base Sepolia chain id `84532`, rejects broad scans, writes no RPC URLs or secrets, and fails unless it observes all required event groups: |
| 122 | + |
| 123 | +- registry; |
| 124 | +- launch; |
| 125 | +- fuel; |
| 126 | +- bond; |
| 127 | +- swarm. |
| 128 | + |
| 129 | +## Source Verification |
| 130 | + |
| 131 | +Use the explorer key from local env only: |
| 132 | + |
| 133 | +```powershell |
| 134 | +forge verify-contract --watch --chain-id 84532 <address> <fully-qualified-contract> --etherscan-api-key $env:BASE_SEPOLIA_BASESCAN_API_KEY |
| 135 | +``` |
| 136 | + |
| 137 | +Use the Foundry broadcast metadata for constructor arguments. Record `submitted`, `verified`, or `pending` for every deployed contract in the final evidence. |
| 138 | + |
| 139 | +## Acceptance Checklist |
| 140 | + |
| 141 | +- `npm run public-agent-network:base-sepolia:plan -- --deployer-address 0x69F55917209C446bf9d31D2903e01966B75a8cDe --json` writes the non-secret plan. |
| 142 | +- Dry run rejects the wrong chain id and mismatched deployer key/address. |
| 143 | +- Broadcast emits public-agent registry, launch, fuel, bond, receipt, and swarm events. |
| 144 | +- Readback observes required event groups over an explicit bounded block range. |
| 145 | +- Source verification is submitted or explicitly marked pending per contract. |
| 146 | +- No private keys, RPC URLs, explorer API keys, or `.env` files are committed. |
| 147 | +- Docs continue to state that this is Base Sepolia testnet evidence only. |
0 commit comments