Skip to content

Conversation

@ikripaka
Copy link
Collaborator

@ikripaka ikripaka commented Dec 5, 2025

  • Implement a trait for coin selection, which is automatically derived for relevant types.
  • Implement value retrieval for taker funds to handle UTXO storage (while the maker fund saves the info, the taker fund retrieves it).
  • Add an option for manually adjusting input UTXOs.

By now cli command for taker fund is simplified to this view:

~/Documents/Work_dl/simplicity-dex-copy git:[feature/coinselection]
cargo run -- taker fund \
  --collateral-amount-deposit 1000 \
  --maker-order-event-id 33b861985a1bfe9b4ed4ec8ef2b4221446292a617f6f162a1c30c8c398e68c3f

In logs you can also see which of utxos were chosen for transaction:

2025-12-05T15:19:26.422276Z  INFO process: Chosen utxos: Utxos {
    filler_token_utxo: OutPoint {
        txid: 22207dc06e14bb20a68b52f2f317e2564bf99caa8e6749bc7589e3e7a199c6d0,
        vout: 5,
    },
    collateral_token_utxo: OutPoint {
        txid: 22207dc06e14bb20a68b52f2f317e2564bf99caa8e6749bc7589e3e7a199c6d0,
        vout: 8,
    },
}
......

[Taker] Tx fund sending result: fd2b8c6382cb058bff845df89ee388d955f8575715d2459de225617f69907a8e, reply event id: 099aa3f8b93eaf906dd992165777fdefffd2b1beb206a074d8f05f93f96ccef9

data for taker fund command is also available to retrieve manually from command:

cargo run -- helpers add-outs-to-sqlite-cache --tx-id 22207dc06e14bb20a68b52f2f317e2564bf99caa8e6749bc7589e3e7a199c6d0

@ikripaka ikripaka marked this pull request as draft December 5, 2025 09:35
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.

2 participants