Skip to content

feat: dash support#29

Draft
frolvanya wants to merge 8 commits intoomni-mainfrom
feat/dash
Draft

feat: dash support#29
frolvanya wants to merge 8 commits intoomni-mainfrom
feat/dash

Conversation

@frolvanya
Copy link
Copy Markdown

@frolvanya frolvanya commented Apr 2, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new dash feature/variant to the satoshi-bridge contract, introducing DASH address support and switching DASH transaction verification from the BTC light client to NEAR MPC verify_foreign_transaction.

Changes:

  • Add dash as a build feature/variant (Makefile + contract reproducible build metadata).
  • Extend network::Chain with Dash mainnet/testnet and implement address prefix handling.
  • Add DASH-specific transaction/PSBT utilities and an MPC-based verification module; wire verification callbacks to support both light-client (non-dash) and MPC (dash).

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Makefile Adds dash to build/lint/test feature matrix.
contracts/satoshi-bridge/Cargo.toml Adds reproducible-build variant for dash and a dash feature flag.
contracts/satoshi-bridge/src/lib.rs Adds dash_utils + mpc_verifier modules and switches re-exports under dash feature.
contracts/satoshi-bridge/src/network.rs Adds DashMainnet/DashTestnet and corresponding address prefix/SegWit HRP handling + tests.
contracts/satoshi-bridge/src/mpc_verifier.rs New module to call MPC verify_foreign_transaction for DASH tx verification.
contracts/satoshi-bridge/src/btc_light_client/mod.rs Introduces shared assert_verification_succeeded() to handle light-client vs MPC verification results.
contracts/satoshi-bridge/src/btc_light_client/{deposit,withdraw,active_utxo_management}.rs Switches verification promise construction to MPC under dash and uses shared callback assertion.
contracts/satoshi-bridge/src/dash_utils/* New DASH-specific transaction wrapper, PSBT wrapper, contract-method shims, and chain-specific types.
contracts/satoshi-bridge/src/utils.rs Adds MAX size constant for MPC verification result under dash.
contracts/satoshi-bridge/src/unit/mod.rs Updates unit test chain selection to include dash.
Cargo.lock Large dependency graph changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


#[cfg(feature = "dash")]
{
let _response: crate::mpc_verifier::VerifyForeignTransactionResponse =
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to parse response properly, I left it as todo for now

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