Conversation
There was a problem hiding this comment.
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
dashas a build feature/variant (Makefile + contract reproducible build metadata). - Extend
network::Chainwith 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.
frolvanya
commented
Apr 8, 2026
|
|
||
| #[cfg(feature = "dash")] | ||
| { | ||
| let _response: crate::mpc_verifier::VerifyForeignTransactionResponse = |
Author
There was a problem hiding this comment.
we need to parse response properly, I left it as todo for now
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.
near (testnet) -> dash (mainnet)
init https://testnet.nearblocks.io/txns/9F68S4QH2UCs2mrEJRbDXbNpKDhJMbvj66bbnhBXnfmm
sign https://testnet.nearblocks.io/txns/7PWrPwe1bxtt4ABZEsKfVzWAnu7vZ3tKqWEu1eGA5YC
fin https://insight.dash.org/insight/tx/5dc37febd3c22489f4e8b3c782a6cc59d1c1b5f14138091d69759231aad79769
I've tested on dash mainnet, because I couldn't find a working faucet on testnet