[new-plugin] test-rust-cli v1.0.0#5
Closed
mig-pre wants to merge 1 commit into
Closed
Conversation
E2E test: Rust CLI querying ETH price via onchainos token price-info. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Phase 4: Summary + Pre-flight for
|
Collaborator
Author
|
Recreating as branch directly on okx/plugin-store |
skylavis-sky
added a commit
to skylavis-sky/plugin-store
that referenced
this pull request
Apr 12, 2026
….md scenario hints - config: add clear_credentials() that removes ~/.config/polymarket/creds.json - buy/sell: detect NOT AUTHORIZED / UNAUTHORIZED from CLOB, auto-clear cached creds and bail with "run again to re-derive" (stale credential recovery okx#9) - buy: accepting_orders guard in resolve_market_token — bails early with clear error for closed/resolved markets before any wallet calls (#2) - SKILL.md: six targeted one-liners for common deviation scenarios: URL slug extraction (#1), short-lived market warning (#3), amount-vs-shares clarification (okx#5), no-Polymarket-deposit note (okx#10), cancel open-orders-only note (okx#11), price=probability clarification (okx#12) - SKILL.md: credential rotation section updated to mention auto-clear Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7 tasks
SamSee-314
pushed a commit
that referenced
this pull request
Apr 27, 2026
Bug fixes (all observed in 10h production log, onchainos 2.2.2, EOA mode, Polygon 137): #1 PATH: onchainos_bin() now tries ~/.local/bin/onchainos before bare "onchainos". Non-interactive shells (Claude Code Bash) never source ~/.zshrc so the binary was "os error 2" on every call. POLYMARKET_ONCHAINOS_BIN env var for test injection. #2 NegRisk redeem: removed hard-block ("not supported for neg_risk markets"). Plugin now calls NegRiskAdapter.redeemPositions(bytes32, uint256[]) after querying on-chain ERC-1155 balances via decimal_str_to_hex64 + get_ctf_balance. #3 Stale allowance: buy now uses get_usdc_allowance (direct eth_call) instead of get_balance_allowance (CLOB API). CLOB API returned stale/MAX_UINT values that caused redundant approval transactions on every trade. #4 MAX_UINT approval: approve_usdc now approves u128::MAX unconditionally instead of the specific order amount. Exact-amount approvals downgraded pre-existing MAX_UINT allowances to that amount, causing re-approval on every trade. #5 Partly resolved by #3: eliminating redundant approves removes ~95% of TEE sign-tx failures. Root TEE issue on genuine first-time approvals is upstream. #6 Timeout: approval wait raised 30s → 90s (POLYMARKET_APPROVE_TIMEOUT_SECS env var). Polygon at 5-10s/block + congestion routinely exceeded 30s. Tests (first suite — 16 tests, zero network calls): - decimal_str_to_hex64: zero, small values, u64::MAX, u128::MAX, invalid inputs - ABI encoding: build_negrisk_redeem_calldata length, offset, amounts, selector - CTF.redeemPositions selector correctness - approve_timeout_secs: default 90s, env override, invalid env fallback - onchainos_bin: env override, bare-name fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin Submission
Description
E2E test: Rust CLI querying ETH price via onchainos. Default run queries ETH price.
OnchainOS commands
onchainos token price-info --address 0xC02...Cc2 --chain ethereumChecklist
🤖 Generated with Claude Code