Skip to content

refactor: use sdk-native types, improve error handling & modularize output#13

Merged
suhailkakar merged 13 commits intomainfrom
refactoring
Mar 10, 2026
Merged

refactor: use sdk-native types, improve error handling & modularize output#13
suhailkakar merged 13 commits intomainfrom
refactoring

Conversation

@suhailkakar
Copy link
Member

@suhailkakar suhailkakar commented Feb 25, 2026

Note

Medium Risk
Broad refactor touching CLI parsing types and config/key resolution paths; behavior should be equivalent but could introduce breaking CLI arg parsing or new error surfaces if the SDK type parsing differs from the old string validators.

Overview
Switches many CLI arguments from raw String parsing to SDK-native types (Address, B256, U256), removing local parse_address/parse_condition_id helpers and simplifying request building across commands.

Improves runtime configurability and error handling: POLYMARKET_RPC_URL now overrides the default Polygon RPC, and config::load_config/resolve_key/resolve_signature_type return structured Result errors instead of silently failing; related callers were updated accordingly.

Refactors UX/output plumbing by centralizing error printing (output::print_error), lazily initializing API clients in main, and splitting the large CLOB output module into smaller output/clob/* modules; also normalizes wallet/setup key serialization and reuses shared USDC constants.

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

@suhailkakar suhailkakar changed the title [wip] refactoring refactor: use SDK-native types for CLI parsing, centralize client initialization & output helpers Feb 25, 2026
@suhailkakar suhailkakar changed the title refactor: use SDK-native types for CLI parsing, centralize client initialization & output helpers refactor: use sdk-native types, improve error handling & modularize output Mar 9, 2026
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 merged commit e1c021f into main Mar 10, 2026
5 checks 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.

2 participants