Repository navigation
feat: agent skill with a working Sepolia v2 demo - #498
Conversation
Git-Session-Id: b095cf1f-fa2b-459a-88b4-e662964f9fb3
|
What changed: 5 files, +902/-0 in Review guideKey files
Suggested verification
Auto-posted by |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #498 +/- ##
==========================================
+ Coverage 71.03% 71.05% +0.02%
==========================================
Files 14 14
Lines 4302 4302
==========================================
+ Hits 3056 3057 +1
+ Misses 1246 1245 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
[Critical impact] The reviewed changes appear safe to merge. SummaryAdds an agent CLI and a Sepolia v2 demo that defaults to quoting and dry-run.
Reviews (2) · Last reviewed commit: "fix: preserve swap limits and report app..." · Reviewed by Greptile |
Git-Session-Id: b095cf1f-fa2b-459a-88b4-e662964f9fb3
|
Fixed all five findings in
41 tests and both typechecks pass. Replayed the complete v2 fork demo again (status 1, 113656 gas) and a v2 approval (confirmed receipt with hash). Public Sepolia execution remains outstanding in #497; the fork receipts do not satisfy it. Current-head CI is running. |
|
@greptileai review |
The previous Sepolia demo selected v3, which the wrapper explicitly refuses. The existing v2 client already quotes and swaps native ETH to USDC on Sepolia, so D3 does not need to wait for the separate v3/v4 address and ABI work.
Restores the agent CLI and extends its safety tests from closed #478, and replaces the blocked demo with a v2 native-ETH path. The script defaults to quote/dry-run, refuses a non-Sepolia endpoint, requires an explicit broadcast opt-in, and checks the mined receipt. Documentation names the library-configured deployment, explains the differing WETH addresses, and distinguishes local fork evidence from the outstanding public-testnet receipt.
Also fixes the restored wrapper’s double v4 slippage and unconditional approval-success reporting. v4 now preserves the supplied minimum; v2/v3 minima are explicitly estimates because the library requotes. Approval results distinguish submitted hashes from successful receipts, and v3 testnet approvals are refused consistently. Human-readable token amounts retain exact base-unit precision.
Validation: 41 offline tests pass;
make typecheckpasses with the Poetry lockfile; the wrapper passes a separate mypy check; Ruff, ShellCheck, and skill validation pass. A complete local Sepolia-fork replay mined with status 1, used 113,656 gas, and received 45,103,109 USDC base units for 0.001 ETH. The default run and wrong-chain refusal both leave the account nonce unchanged. The earlier v3 invocation reproduces the deterministic safety refusal. Ten new regression cases failed before the review fixes; the v4 case decodes the actual library-generated calldata (9801 before vs 9900 required). Fork swap and v2 approval both succeed after the fixes.The public Sepolia transaction is still outstanding and is tracked in #497; merging this PR alone does not close D3. No library or workflow changes.