Skip to content

refactor: use SDK-native types for CLI parsing, centralize client initialization & output helpers#13

Open
suhailkakar wants to merge 6 commits intomainfrom
refactoring
Open

refactor: use SDK-native types for CLI parsing, centralize client initialization & output helpers#13
suhailkakar wants to merge 6 commits intomainfrom
refactoring

Conversation

@suhailkakar
Copy link
Member

@suhailkakar suhailkakar commented Feb 25, 2026

Note

Medium Risk
Broad refactor across many commands changes CLI argument types and request construction, which can subtly break parsing or behavior even though functionality is largely unchanged.

Overview
Refactors CLI argument parsing to use SDK-native types (Address, B256, U256) across commands, removing manual parse_address/parse_condition_id helpers and centralizing common conversions via the new enum_from! macro and ascending_flag() helper.

Improves runtime wiring and config flexibility by lazy-initializing shared SDK clients in main.rs, centralizing error rendering via output::print_error, sharing the Polygon USDC address via USDC_ADDRESS_STR, and allowing RPC endpoint override via POLYMARKET_RPC_URL.

Reorganizes output + wallet handling by splitting the huge output/clob.rs into focused output/clob/* modules and deduplicating private-key hex normalization via wallet::signer_key_hex (used by wallet and setup).

Written by Cursor Bugbot for commit 313860a. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@suhailkakar suhailkakar changed the title [wip] refactoring refactor: use SDK-native types for CLI parsing, centralize client initialization & output helpers Feb 25, 2026
use tabled::settings::{Modify, Style, Width};

/// Display string for missing/null values in table output.
pub const NONE: &str = "—";

Choose a reason for hiding this comment

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

might be confusing calling this NONE, maybe something like EMPTY is better

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.

2 participants