Identifying AnyHedge contracts on the network
Watch on YouTube (opens in a new tab)- Speaker
- GeukensMathieu
- Space
- Published
- Length
Transcript
There was a Paytaca use case, and they wanted to check that their contract interacts with an AnyHedge contract, so that it sends its money to an AnyHedge locking script. But the difficulty is that this is a script hash address, so you don't see the full script when sending to the address. So you pretty much need the whole script in advance and then hash it to see that you're actually sending to an AnyHedge address.
What is hashed is script consists of two parts. One is kind of the fixed AnyHedge code, which is mainly the opcodes, the logic, and then there's the unique parameters, which includes the public keys and the lock time, so when the contract starts and when it ends. Because the main part of the logic, all these opcodes, are the same, you would only need an identifier that marks that all the opcode logic is the same, so the bulk of the script is the same, and then you only need to provide the unique parameters.


