fix(#328): wire commitments module into lending contract with public exports#528
Open
danieloche635-bit wants to merge 1 commit into
Open
Conversation
…ith export endpoints
|
@danieloche635-bit is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey @danieloche635-bit! 👋 It looks like this PR isn't linked to any issue. If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g.,
|
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
Wires the existing conditional borrow commitments module into the LendingContract, exposing the commitment lifecycle endpoints and making commitment types publicly accessible.
Changes
Integration
mod commitments;module declaration to lending contract lib.rspub use commitments::{...}to publicly export commitment types (CommitmentStatus, PriceTrigger, TriggerCombiner, BorrowCommitment, CommitmentError)#[cfg(test)] mod commitments_test;to include the commitment test suiteNew Contract Endpoints
create_borrow_commitment(owner, triggers, combiner, borrow_asset, collateral_asset, borrow_amount, collateral_amount, min_fill_bps, expiry)- Create a conditional borrow commitment with oracle price triggerscancel_borrow_commitment(owner, commitment_id)- Cancel a pending commitment (owner only)execute_borrow_commitment(commitment_id)- Execute a commitment if triggers are met (anyone can call)get_borrow_commitment(commitment_id)- View a commitment by IDAcceptance Criteria
Files Changed
stellar-lend/contracts/lending/src/lib.rs- Module integration and endpoint wiring