I am doing some tutorial and in this chapter we are suppose to reproduce the Script scripting language
I am struggling to understand one of the exercises, here it is:
Create a ScriptSig that can unlock this ScriptPubKey: 767695935687
and the answer is 0x52 so that :
>>> from script import Script >>> script_pubkey = Script([0x76, 0x76, 0x95, 0x93, 0x56, 0x87]) >>> script_sig = Script([0x52]) >>> combined_script = script_sig + script_pubkey >>> print(combined_script.evaluate(0))
OP_2 or 52 will satisfy the equation x² + x – 6 = 0.
I guess I get the whole part execution except when the OP_6 is pushed on the stack, how does it become negative ?