Feat/task issues - #150
Open
cyberpunk30 wants to merge 2 commits into
Open
Conversation
…ocol#37 stellar-vortex-protocol#34 — src_chain allowlist - Add AllowedSrcChain(String) and SrcChainAllowlistEnabled DataKey variants - Add Error::SrcChainNotAllowed (22) - Add add_allowed_src_chain / remove_allowed_src_chain / is_src_chain_allowed / set_src_chain_allowlist_enabled / is_src_chain_allowlist_enabled admin fns - Enforce in submit_intent behind the feature flag (off by default) - Tests: disabled-by-default, allows-any-when-off, blocks-unlisted, allows-listed, removal-blocks, re-disable restores open submission stellar-vortex-protocol#35 — rescue_tokens - Add Error::RescueProtectedToken (23) - Add rescue_tokens(token, to, amount) admin entrypoint - Blocks bond_token (collateral protection); allows all other SEP-41 tokens - Tests: happy-path move, bond_token blocked, zero-amount fails, admin auth required stellar-vortex-protocol#36 — pause scope - Gate register_solver, deregister_solver, withdraw_bond behind require_not_paused - Expand pause() rustdoc explaining the decision (solver collateral backstop) - cancel_intent remains open during a pause (user escape hatch) - README Security Model section documents the rationale - Tests: pause blocks each bond fn, unpause restores all three, cancel works while paused stellar-vortex-protocol#37 — dst_allowlist default documented - Add dst_allowlist_enabled_defaults_to_false CI sentinel test - README Security Model documents the default and pre-launch action required - Same section covers src_chain_allowlist_enabled (also off by default) Closes stellar-vortex-protocol#34, Closes stellar-vortex-protocol#35, Closes stellar-vortex-protocol#36, Closes stellar-vortex-protocol#37
- Use non-try submit_intent in src_chain_unlisted_accepted_after_disabling_enforcement to silence unused-must-use lint (-D warnings) - Run cargo fmt --all to normalise test.rs whitespace
|
@cyberpunk30 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Title: feat: src-chain allowlist, rescue tokens, pause scope, allowlist
defaults (#34 #35 #36 #37)
────────────────────────────────────────────────────────────────────────
Description:
Summary
Implements all four open issues in a single cohesive change. Each issue
is self-contained but they share the same allowlist pattern and security
model, so landing them together keeps the contract internally
consistent.
────────────────────────────────────────────────────────────────────────
Changes
Closes #34 — Validate src_chain against an admin-maintained allowlist
keys
add_allowed_src_chain, remove_allowed_src_chain, is_src_chain_allowed,
set_src_chain_allowlist_enabled, is_src_chain_allowlist_enabled
enforcement is on
allows-listed, removal-blocks, re-disable restores open submission
Closes #35 — rescue_tokens for non-bond tokens accidentally sent to the
contract
tokens are recoverable
admin auth enforced
Closes #36 — Gate register_solver / deregister_solver / withdraw_bond
behind pause()
shed collateral during a live incident
after unpause, cancel still works while paused
Closes #37 — Document DstAllowlistEnabled off-by-default decision
catch any future change to the default before it reaches mainnet
pre-launch admin action (add_allowed_dst_token +
set_dst_allowlist_enabled(true))
in Validate src_chain against an admin-maintained set of supported chains #34)
────────────────────────────────────────────────────────────────────────
Testing
cargo fmt --all -- --check ✅
cargo clippy --all-targets -- -D warnings ✅
cargo test ✅ 71 passed, 0 failed
cargo build --target wasm32-unknown-unknown --release ✅
────────────────────────────────────────────────────────────────────────
Pre-launch checklist (mainnet)
then set_dst_allowlist_enabled(true)
(e.g. "ethereum", "base", "polygon"), then
set_src_chain_allowlist_enabled(true)