feat(ctf): add Gnosis Safe wallet support for CTF operations#215
Open
Haut wants to merge 2 commits intoPolymarket:mainfrom
Open
feat(ctf): add Gnosis Safe wallet support for CTF operations#215Haut wants to merge 2 commits intoPolymarket:mainfrom
Haut wants to merge 2 commits intoPolymarket:mainfrom
Conversation
Add methods to execute CTF operations through a Gnosis Safe wallet, enabling users with Safe-based wallets to split, merge, and redeem positions. New public methods: - split_position_via_safe - merge_positions_via_safe - redeem_positions_via_safe - redeem_neg_risk_via_safe Each method accepts an optional Safe address parameter - if None, derives the Safe address from the signer's EOA using CREATE2. Implementation details: - IGnosisSafe interface for nonce() and execTransaction() - SafeTx EIP-712 struct using Alloy's sol! macro - Correct signature v-value normalization (y-parity 0/1 → v 27/28) - Minimal EIP-712 domain (chainId + verifyingContract only) Includes 17 unit tests covering EIP-712 type hashes, calldata encoding, signature format, and address derivation.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #215 +/- ##
==========================================
- Coverage 85.36% 83.74% -1.62%
==========================================
Files 32 32
Lines 5103 5456 +353
==========================================
+ Hits 4356 4569 +213
- Misses 747 887 +140
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Good! can't wait for this merge |
Contributor
|
any ETA for this? :) |
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.
Recreation of #172 with comments implemented
Add methods to execute CTF operations through a Gnosis Safe wallet, enabling users with Safe-based wallets to split, merge, and redeem positions.
New public methods:
Each method accepts an optional Safe address parameter - if None, derives the Safe address from the signer's EOA using CREATE2.
Implementation details:
Includes 17 unit tests covering EIP-712 type hashes, calldata encoding, signature format, and address derivation.