Conversation
Adds a read-only `quickstart` command that inspects wallet state on the target chain and returns a concrete next step, mirroring the onboarding surface already present on hyperliquid / pancakeswap-v3. Behaviour: three-way parallel fetch (native gas via eth_getBalance, stablecoin balance via balanceOf, Pendle positions via the dashboard API), then classifies the wallet into one of five states — `active`, `ready`, `needs_gas`, `needs_funds`, `no_funds` — each with a ready-to-run `next_command` and stepwise `onboarding_steps`. Chain-aware: picks the correct USDC address and native gas symbol (ETH/BNB) from the global `--chain` flag. Supports Ethereum (1), Arbitrum (42161, default), Base (8453), and BSC (56). Scope: purely additive. New file `src/commands/quickstart.rs` plus one `pub mod` line in `commands/mod.rs` and one enum variant + one dispatch arm in `main.rs`. No existing command code touched. Docs: SUMMARY.md headings promoted to H2 while the Quick Start section now leads with the new command. SKILL.md gets a dedicated `quickstart` section documenting fields and states. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔨 Phase 2: Build Verification — ✅ PASSED
Build succeeded. Compiled artifact uploaded as workflow artifact. Source integrity: commit SHA `` is the content fingerprint. |
Phase 4: Summary + Pre-flight for
|
📋 Phase 3: AI Code Review Report — Score: 88/100
1. Plugin Overview
Summary: This plugin integrates with Pendle Finance, a yield-tokenization protocol, allowing users to buy/sell Principal Tokens (PT) and Yield Tokens (YT), add/remove AMM liquidity, and mint/redeem PT+YT pairs across Ethereum, Arbitrum, BSC, and Base. It uses the Pendle Hosted SDK for calldata generation and onchainos CLI for transaction signing/broadcast. Target Users: DeFi users wanting to engage with Pendle's yield markets (fixed yield via PT, floating yield speculation via YT, liquidity provision) through AI agents. 2. Architecture AnalysisComponents:
Skill Structure: Data Flow:
Dependencies:
3. Auto-Detected Permissionsonchainos Commands Used
Wallet Operations
External APIs / URLs
Chains Operated OnEthereum (1), Arbitrum (42161), BSC (56), Base (8453) Overall Permission SummaryPlugin performs read operations (market data, balances) and high-risk write operations (ERC-20 approvals, PT/YT swaps, liquidity provision) through onchainos wallet contract-call. All on-chain writes route through onchainos (TEE signing). Plugin validates SDK-returned calldata against a router whitelist and blocks dangerous ERC-20 selectors (transfer, approve, setApprovalForAll). Approvals use exact transaction amounts (not unlimited). 4. onchainos API ComplianceDoes this plugin use onchainos CLI for all on-chain write operations?Yes — all on-chain writes (approvals and Pendle router calls) are submitted via On-Chain Write Operations (MUST use onchainos)
Data Queries (allowed to use external sources)
External APIs / Libraries Detected
Verdict: ✅ Fully CompliantPlugin correctly delegates all signing/broadcasting to onchainos. External HTTP calls are limited to data queries (Pendle API) and read-only RPC (balance/receipt checks) — both acceptable. 5. Security AssessmentStatic Rule Scan (C01-C09, H01-H09, M01-M08, L01-L02)
All other static rules (C02-C09, H01-H04, H06-H09, M01-M02, M04-M06, L01-L02): No matches. LLM Judge Analysis (L-PINJ, L-MALI, L-MEMA, L-IINJ, L-AEXE, L-FINA, L-FISO)
Toxic Flow Detection (TF001-TF006)No toxic flows detected.
Prompt Injection ScanChecked for: instruction override, identity manipulation, hidden behavior, confirmation bypass, base64 payloads, invisible chars. SKILL.md is clean. Result: ✅ Clean Dangerous Operations CheckPlugin broadcasts transactions (ERC-20 approvals, Pendle swaps/liquidity). Confirmation gate enforced by Note on
Result: ✅ Safe Data Exfiltration Risk
Result: ✅ No Risk Overall Security Rating: 🟢 Low Risk6. Source Code SecurityLanguage & Build ConfigRust, entry point Dependency AnalysisStandard, maintained Rust ecosystem crates:
All widely-used, no known critical vulnerabilities. No suspicious or unmaintained deps. Code Safety Audit
Notable security features:
Does SKILL.md accurately describe what the source code does?Yes. SKILL.md documents preview/confirm flow, --force behavior, balance checks, approval handling, and calldata validation — all consistent with source code. Verdict: ✅ Source Safe7. Code ReviewQuality Score: 88/100
Strengths
Issues Found
8. Recommendations
All recommendations are minor; none block merge. 9. Reviewer SummaryOne-line verdict: Well-engineered Pendle Finance DeFi plugin with strong defensive controls (calldata validation, router whitelist, exact-amount approvals, preview-first flow, explicit data trust boundary) — fully compliant with onchainos API contract. Merge recommendation: ✅ Ready to merge Generated by Claude AI via Anthropic API — review the full report before approving. |
Summary
Adds a read-only
quickstartcommand that mirrors the onboarding surface already shipped onhyperliquidandpancakeswap-v3. Runningpendle-plugin quickstartinspects wallet state on the target chain and returns a concrete next step, so agents can drive users from "nothing" → "first Pendle trade" without guessing.Behaviour
Three-way parallel fetch:
eth_getBalancebalanceOf(USDC per chain)Classified into five states, each with a ready-to-run
next_commandand stepwiseonboarding_steps:activeget-positionsreadylist-markets --active-onlyneeds_gasneeds_fundsno_fundsChain-aware: global
--chainflag picks the correct USDC address and native gas symbol (ETH/BNB). Supported: Ethereum (1), Arbitrum (42161, default), Base (8453), BSC (56).Scope / risk
Purely additive. Zero changes to existing commands,
api.rs,onchainos.rs, orconfig.rs. All new logic (native balance helper, position counter, state classifier) lives insidesrc/commands/quickstart.rsas file-private functions.Touched files:
src/commands/quickstart.rs— new filesrc/commands/mod.rs— onepub modlinesrc/main.rs— one enum variant + one dispatch armSUMMARY.md— H2 headings + Quick Start now leads withpendle-plugin quickstartSKILL.md— newquickstartcommand section; version bumpCHANGELOG.md/plugin.yaml/Cargo.toml/.claude-plugin/plugin.json— version 0.2.7 → 0.2.8Test plan
cargo buildclean--versionreports0.2.8pendle-plugin --helpshowsquickstartalongside existing commands; no existing command help changedstatus: readywith correct ETH + USDC balancesgas_symbol: BNBwith BSC USDC address in onboarding stepsapi_callswhitelist inplugin.yamlunchanged (all RPC + Pendle API domains already listed)unwrap_or(0)regressions introduced; quickstart tolerates transient RPC/API failures by treating them as zero-balance (classifies asno_funds), a safe user-visible default🤖 Generated with Claude Code