stacks-network / sbtc-developer-release

sBTC primitives, signer components, helper tools
https://sbtc.tech
MIT License
1.98k stars 23 forks source link

[stacks-signer] Construct a stx transaction for the consensus "no" case #374

Open jferrant opened 11 months ago

jferrant commented 11 months ago

Description

Create a function that constructs a stx transaction for the consensus "no" case. This should be a clarity contract call signed by threshold number of signers.

Context

When a deposit/withdrawal is voted yes, no further work is required by signers beyond broadcasting the resulting BTC transaction. The node will pick these BTC transactions up and mint/burn accordingly. However, in the no case (and quorum failure case), the signers must submit a WSTS signed STX transaction with the corresponding denied BTC txid so the node can clear these from the list of pending transactions.

Expected Approach

Utilize the stx transaction construction function but make it a clarity function call to "submit_no(txid)" where txid is eitehr the BTC txid for the deposit that is being rejected or the STX txid of the withdrawal being rejected.

Acceptance Criteria