Skip to content

Refactor bot runtime and withdrawal selection#34

Merged
phroi merged 2 commits into
masterfrom
review/sdk-conversion-runtime-pr3
May 12, 2026
Merged

Refactor bot runtime and withdrawal selection#34
phroi merged 2 commits into
masterfrom
review/sdk-conversion-runtime-pr3

Conversation

@phroi
Copy link
Copy Markdown
Member

@phroi phroi commented May 12, 2026

Why

  • Finish the third iCKB Stack follow-up on top of Move app runtime flows onto SDK boundaries #33 by moving shared bot mechanics out of the app layer.
  • Keep bot policy focused on balances, output slots, and thresholds while SDK owns ready-withdrawal selection.

Changes

  • Reuse @ickb/node-utils for public client creation, signer lock ordering, loop sleep, JSON logging, and timeout handling.
  • Remove bot-local logging/runtime helper copies and wire the bot to @ickb/node-utils.
  • Delegate ready-withdrawal rebalance and cleanup selection to SDK selectors, preserving bot-specific policy at the app layer.
  • Trim bot tests that duplicated SDK selector coverage while retaining bot policy and transaction behavior coverage.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the bot application by migrating several utility functions and logic to shared packages. Specifically, it introduces the @ickb/node-utils dependency to handle logging, error management, and environment parsing, while delegating deposit selection and cleanup logic to the @ickb/sdk. Additionally, the PR replaces manual cell collection with the collectCompleteScan utility and removes redundant local implementations and tests. I have no feedback to provide.

@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 12, 2026

LGTM

Phroi %187

@phroi phroi merged commit e92c0bb into master May 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant