scalus icon indicating copy to clipboard operation
scalus copied to clipboard

Remove default from Spend Step witness and fix WrongOutputType.explain

Open dragospe opened this issue 6 months ago • 1 comments

The Spend step has a default pubkey witness, which makes it easy to forget to provide a real witness when spending a script utxo.

Also, the error explain for WrongOutputType with how we use it in this function.

I suggest something like

    case class WrongOutputType(
        expectedType: WitnessKind,
        utxo: TransactionUnspentOutput
    ) extends StepError {
        override def explain: String =
            s"The UTxO you provided has the wrong type. We require a `$expectedType`. " +
                s"UTxO: $utxo"
    }

instead.

dragospe avatar Oct 15 '25 10:10 dragospe

#163 updates the message

dragospe avatar Nov 05 '25 11:11 dragospe