[SO-273] Sponsor Cash-Secured Put PTBs in Gas-Station Templates#275
Merged
Conversation
PR #270 added frontend put PTB builders (put_bucket / session_put_bucket) but protocol_templates() was never updated, so those PTBs matched no sponsored template. - Wallet: put_write, put_buy, put_exercise, put_redeem. - DeepBook: put_exercise_with_bm_withdraw. - Session: session_put_write, session_put_buy, session_put_exercise, session_put_redeem (no put burn_expired — the frontend builds none). - Generalized execute_write_flow / session_write_flow over the option module so calls and puts share one definition; tests for each shape. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
SO-273
PR #270 added frontend put PTB builders targeting the new
put_bucket/session_put_bucketMove modules, butprotocol_templates()in the gas-station service (rust-backend/crates/sui-tx/src/tx/template.rs) was never updated — so those PTBs matched no sponsored template and failed to sponsor.Added the missing put templates, mirroring their call twins:
put_write,put_buy(put_bucket::execute_write),put_exercise,put_redeem.put_exercise_with_bm_withdraw— settle + withdraw the option coin out of the BM, thenput_bucket::exercise.session_put_write,session_put_buy(session_put_bucket::execute_write_with_session),session_put_exercise,session_put_redeem.Generalized the existing
execute_write_flow/session_write_flowclosures over the option module so calls and puts share one definition; added a smallsingle_callhelper for the exercise/redeem shapes.Notes
burn_expired(wallet or session), so none is added — templates match exactly what the frontend emits.put_wallet_flows_match, plus put cases folded into the bm-withdraw and session-flow tests).cargo test -p sui-txgreen (23 passing).🤖 Generated with Claude Code