feat(polymarket): v0.6.2 — neg_risk redemption support for proxy/deposit wallets#62
Open
skylavis-sky wants to merge 2 commits intomainfrom
Open
feat(polymarket): v0.6.2 — neg_risk redemption support for proxy/deposit wallets#62skylavis-sky wants to merge 2 commits intomainfrom
skylavis-sky wants to merge 2 commits intomainfrom
Conversation
…aml, plugin.json, SKILL.md)
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.
Summary
neg_risk redeem via POLY_PROXY wallet — Bug:
redeembailed with "not yet supported" for neg_risk markets when tokens were held in proxy wallet. Root cause:negrisk_redeem_via_proxy()was not implemented. Fix: addednegrisk_redeem_via_proxy()inonchainos.rsthat ABI-encodesNegRiskAdapter.redeemPositionsand routes throughPROXY_FACTORY.neg_risk redeem via DEPOSIT_WALLET — Bug: deposit wallet mode was not handled for neg_risk markets. Root cause: wallet routing in
redeem_one()fell through to EOA for deposit wallet mode. Fix: addednegrisk_redeem_via_deposit_wallet()that batches the redemption call through the relayer wallet batch endpoint.Version bump to 0.6.2 — Bumped
Cargo.toml,Cargo.lock,plugin.yaml,.claude-plugin/plugin.json, and allSKILL.mdversion references from 0.6.1 → 0.6.2.Files Changed
src/commands/redeem.rsnegrisk_redeem_via_proxy/negrisk_redeem_via_deposit_walletsrc/onchainos.rsnegrisk_redeem_via_proxy()(routes through PROXY_FACTORY) andnegrisk_redeem_via_deposit_wallet()(routes through relayer wallet batch)Cargo.tomlCargo.lockplugin.yaml.claude-plugin/plugin.jsonSKILL.mdCHANGELOG.mdLive Verification
Tested redeem across all 3 wallet modes on Polygon (chain 137) using BTC 5-minute Up/Down markets (standard binary,
neg_risk: false).Test 1 — Deposit wallet redeem (
11:35PM–11:40PM ET, BTC went Up)Tx: https://polygonscan.com/tx/0x646243127ec6b73b7d46f381f7b93bfd4d60c441410581467c4bba11f599bb48
Test 2 — EOA + proxy wallet redeem (
11:45PM–11:50PM ET, BTC went Down)EOA tx: https://polygonscan.com/tx/0xec528428f874a47f9a9dbbbc43a8825ebc6017630835857835a3d5092cdfde3c
Proxy tx: https://polygonscan.com/tx/0x94c08d846496d94db8365d93225bdecaea6f794ff302c90ad46ed1ce58a45815
Checklist
skills/polymarket-plugin/filescargo build --release)