Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ By default the supervisor uses ignored `config/bot-testnet.json` and `config/tes

Rebuild disposable live configs from `ICKB_TESTNET_BOT_PRIVATE_KEY` and `ICKB_TESTNET_TESTER_PRIVATE_KEY` with `pnpm live:config-from-env -- --force` when they are missing or stale; `ICKB_TESTNET_RPC_URL` is optional. The supervisor does not patch, verify, rebuild, relaunch, or invoke an LLM; external loops and operators consume `summary.json` between runs.

`pnpm live:preflight -- --config config/bot-testnet.json --role bot` prints public balance evidence for funding checks. Use `key.recommendedAddress` as the funding address, then rerun preflight and check `balances.CKB.total`, `balances.CKB.available`, `balances.CKB.reserve`, `balances.CKB.spendable`, and `capital.minimumCkbCapital`; raw available CKB is not the same as bot-spendable CKB. For machine-readable JSON without package-manager output, run `node scripts/ickb-live-preflight.mjs --config config/bot-testnet.json --role bot` directly.
`pnpm live:preflight -- --config config/bot-testnet.json --role bot` prints public balance evidence for funding checks. Use `key.recommendedAddress` as the funding address, then rerun preflight and check `balances.CKB.available`, `balances.CKB.reserve`, `balances.CKB.spendable`, `balances.CKB.projectedAvailable`, `balances.CKB.total`, and `capital.minimumCkbCapital`; `available` and `spendable` are actual plain-cell values, while `projectedAvailable` and `total` are projected accounting values. For machine-readable JSON without package-manager output, run `node scripts/ickb-live-preflight.mjs --config config/bot-testnet.json --role bot` directly.

For repeated bounded invocations, keep loop-owned options before `--` and supervisor options after it:

Expand Down
2 changes: 1 addition & 1 deletion apps/supervisor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To get a public funding address and verify balances without printing config cont
pnpm live:preflight -- --config config/bot-testnet.json --role bot
```

Use `key.recommendedAddress` as the funding address. After funding, rerun the same preflight command and check `balances.CKB.total`, `balances.CKB.available`, `balances.CKB.reserve`, `balances.CKB.spendable`, and `capital.minimumCkbCapital`. If you need machine-readable JSON for piping, run `node scripts/ickb-live-preflight.mjs --config config/bot-testnet.json --role bot` directly so package-manager output is not mixed into stdout.
Use `key.recommendedAddress` as the funding address. After funding, rerun the same preflight command and check `balances.CKB.available`, `balances.CKB.reserve`, `balances.CKB.spendable`, `balances.CKB.projectedAvailable`, `balances.CKB.total`, and `capital.minimumCkbCapital`. `available` and `spendable` are actual plain-cell values, while `projectedAvailable` and `total` can include projected sources such as ready withdrawals. If you need machine-readable JSON for piping, run `node scripts/ickb-live-preflight.mjs --config config/bot-testnet.json --role bot` directly so package-manager output is not mixed into stdout.

## Artifacts

Expand Down
1 change: 1 addition & 0 deletions scripts/ickb-live-preflight.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export async function buildPreflightReport({
balances: {
CKB: {
available: nodeUtils.formatCkb(plainCkb),
projectedAvailable: nodeUtils.formatCkb(projection.ckbAvailable),
reserve: nodeUtils.formatCkb(ckbReserve),
spendable: nodeUtils.formatCkb(spendableCkb),
unavailable: nodeUtils.formatCkb(projection.ckbPending),
Expand Down
2 changes: 2 additions & 0 deletions scripts/ickb-live-preflight.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ test("preflight reports CKB reserve and spendable balance separately", async ()

assert.deepEqual(report.balances.CKB, {
available: "150000000000",
projectedAvailable: "190000000000",
reserve: "100000000000",
spendable: "50000000000",
unavailable: "25000000000",
Expand Down Expand Up @@ -186,6 +187,7 @@ test("preflight reports tester reserve and spendable balance separately", async

assert.deepEqual(report.balances.CKB, {
available: "250000000000",
projectedAvailable: "280000000000",
reserve: "200000000000",
spendable: "50000000000",
unavailable: "25000000000",
Expand Down
Loading