feat: pending-proposal views, decimals-aware submit_intent guard, fill-history log - #324
Open
ink-mami wants to merge 1 commit into
Conversation
…ubmit_intent guard, and fill-history log Closes: stellar-vortex-protocol#251 Closes: stellar-vortex-protocol#252 Closes: stellar-vortex-protocol#244 - get_pending_admin/get_pending_dst_token_add/get_pending_dst_token_remove mirror get_pending_fee_recipient, and the DataKey/Error variants they (and the pre-existing propose/accept flows) rely on are now declared. - submit_intent rejects a min_dst_amount implausible for dst_token's own decimals() precision (Error::ImplausibleDstAmount). - fill_intent appends each partial fill to a bounded on-chain (solver, amount, timestamp) log, exposed via get_intent_fill_history. Issue stellar-vortex-protocol#243 (bid-window events) is not included: it explicitly depends on issue stellar-vortex-protocol#6 (bid_intent/settle_bids) landing first, which is not yet implemented in this codebase.
|
@ink-mami 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.
Summary
get_pending_admin,get_pending_dst_token_add,get_pending_dst_token_removeview functions, mirroring the existingget_pending_fee_recipientshape (DataKey/Errorvariants these — and the pre-existingpropose_admin_transfer/accept_admin_transfer/execute_add_dst_token/execute_remove_dst_tokenflows — rely on are now declared).submit_intentnow queriesdst_token's owndecimals()and rejects amin_dst_amountimplausible for that precision (Error::ImplausibleDstAmount), guarding against decimal-magnitude fat-finger mistakes. Heuristic and trade-offs documented in README.fill_intentnow appends each partial fill to a bounded on-chain(solver, amount, timestamp)log (MAX_FILL_HISTORY = 20, FIFO eviction), exposed viaget_intent_fill_history.Closes: #251
Closes: #252
Closes: #244
closes #243
Validation performed
cargo fmt/clippy/test).intent_settlement/src/lib.rsonmainalready fails to compile independent of this PR — severalDataKey/Errorvariants (e.g.BidWindowEnabled,UserIntents,Config,MinBondMultiplier,AmountTooLarge,InvalidConfig,CancelCooldownNotExpired, and others) are referenced but never declared in their enums. This PR declares only the specific variants needed for the pending-proposal views/timelock flow (PendingAdmin,PendingDstTokenAdd,PendingDstTokenRemove,TimelockNotElapsed,NoPendingAdminTransfer,NoPendingDstTokenChange) using the discriminant values already documented in README's Error Reference table. The remaining gaps are unrelated to [High] Add missingget_pending_admin/get_pending_dst_token_add/get_pending_dst_token_removeviews #251/[High] Add decimals-aware sanity bounds tosubmit_intent#252/[High] Add an on-chain partial-fill history log/view #244 and appear to be the scope of issue docs: fill in missing rustdoc on public entrypoints #19 ("DataKey enum reconciliation") — left untouched here since fixing them is out of scope for this PR, but CI will still fail onmainuntil that's addressed.