Post
Topic
Board Development & Technical Discussion
Re: Covenant opcode proposal OP_CONSTRAINDESTINATION (an alternative to OP_CTV)
by
fresheneesz
on 15/07/2021, 18:35:07 UTC
> the scriptsig is not only in the main transaction hash but also inside the presignature

What do you mean by "the presignature"? In any case, I realized what I was missing. Right the OP_CTV call appears in the script which is what is put into ScriptSig.

>  is the redeem script the one limiting the destinations, but according to your reply it's the outputs hash in the presignature

Yes, that's right, its the commitment to the outputs that constrains the eventual destination of the coins.

> usually in a smart contract you want to make conditions that the output hashes match those coming from, for example, an exchange

What do you mean "match" here? Are you talking about transaction inputs here? Both OP_CTV and OP_CD should be able to ensure the transaction sends the coins to one of a particular set of destinations. What kind of complex conditions can't you do with bitcoin?