Skip to content

main -> dev#351

Merged
ryzen-xp merged 11 commits intodevfrom
main
Mar 29, 2026
Merged

main -> dev#351
ryzen-xp merged 11 commits intodevfrom
main

Conversation

@ryzen-xp
Copy link
Copy Markdown
Contributor

@ryzen-xp ryzen-xp commented Mar 29, 2026

Summary by CodeRabbit

  • New Features

    • Escrow vaults now support direct token withdrawals by vault owners
    • SDK now includes a transaction builder for constructing and submitting Soroban contract transactions, supporting registration, address management, and resolution operations
  • Bug Fixes

    • Auction contract now prevents bidders from placing bids that would outbid their own previous positions

Hassan-oladipupo and others added 11 commits March 26, 2026 17:24
Remove the first redundant ScheduledPayment read and its associated
debug log block. Also remove the orphaned read_vault_state call after
token transfer. execute_scheduled now reads ScheduledPayment exactly once.
feat(zk-sdk): add StellarTxBuilder for Soroban register and resolve f…
 feat: add withdraw function to escrow
…ayment-from-storage-twice

chore(escrow): execute_scheduled reads payment from storage twice
chore(auction): place_bid allows self-outbid
@ryzen-xp ryzen-xp merged commit a0af306 into dev Mar 29, 2026
4 of 12 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c18b5b1c-91a8-441e-baaa-7d37d40f6263

📥 Commits

Reviewing files that changed from the base of the PR and between 1762037 and e8dc7f5.

⛔ Files ignored due to path filters (1)
  • sdk/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • gateway-contract/contracts/auction_contract/src/errors.rs
  • gateway-contract/contracts/auction_contract/src/lib.rs
  • gateway-contract/contracts/auction_contract/src/test.rs
  • gateway-contract/contracts/auction_contract/test_snapshots/test/test_create_auction_past_end_time_fails.1.json
  • gateway-contract/contracts/auction_contract/test_snapshots/test/test_outbid_self_fails.1.json
  • gateway-contract/contracts/escrow_contract/src/lib.rs
  • gateway-contract/contracts/escrow_contract/src/test.rs
  • sdk/src/__tests__/tx.test.ts
  • sdk/src/tx.ts

📝 Walkthrough

Walkthrough

This PR adds self-bid rejection to the auction contract, introduces a withdrawal mechanism for the escrow contract, and implements a new StellarTxBuilder SDK class for constructing and submitting Stellar Soroban transactions, with corresponding tests and ledger snapshots.

Changes

Cohort / File(s) Summary
Auction Self-Bid Prevention
gateway-contract/contracts/auction_contract/src/errors.rs, gateway-contract/contracts/auction_contract/src/lib.rs, gateway-contract/contracts/auction_contract/src/test.rs, gateway-contract/contracts/auction_contract/test_snapshots/test/*
Added AuctionError::SelfBid = 10 error variant; place_bid now validates bidder is not the current highest bidder before processing; new test test_outbid_self_fails verifies rejection of self-outbids; ledger snapshots captured for test scenarios.
Escrow Withdrawal Feature
gateway-contract/contracts/escrow_contract/src/lib.rs, gateway-contract/contracts/escrow_contract/src/test.rs
Added public withdraw(env, commitment, amount) method to enable vault owners to withdraw funds; removed debug logging from execute_scheduled; added tests for successful withdrawal and insufficient balance scenarios.
SDK StellarTxBuilder
sdk/src/tx.ts, sdk/src/__tests__/tx.test.ts
Implemented StellarTxBuilder class with async builder methods (buildRegister, buildRegisterResolver, buildAddStellarAddress, buildResolve) and submitTransaction for constructing and submitting Stellar Soroban contract transactions; added integration test verifying XDR round-trip consistency.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related issues

Possibly related PRs

Suggested labels

Passed

Poem

🐰 A bidder tried to outbid their own stake,
But the contract said "no," for goodness' sake!
Escrow folk withdraw with measured grace,
And Stellar's builder keeps transactions in place! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants