OP_HASH160
0x14
<hash160 of alice's secret>
OP_EQUAL
OP_TOALTSTACK
OP_HASH160
0x14
<hash160 of oracle signature when alice wins>
OP_EQUAL
OP_TOALTSTACK
OP_HASH160
0x14
<hash160 of bob's secret>
OP_EQUAL
OP_TOALTSTACK
OP_HASH160
0x14
<hash160 of oracle signature when bob wins>
OP_EQUAL
OP_TOALTSTACK
OP_HASH160
0x14
<hash160 of alice's secret>
OP_EQUAL
OP_TOALTSTACK
OP_HASH160
0x14
<hash160 of bob's secret>
OP_EQUAL
OP_FROMALTSTACK
OP_BOOLAND
OP_FROMALTSTACK
OP_FROMALTSTACK
OP_BOOLAND
OP_BOOLOR
OP_FROMALTSTACK
OP_FROMALTSTACK
OP_BOOLAND
OP_BOOLOR
OP_HASH160 20 <hash160 of serialized p2sh script> OP_EQUAL
The above scriptPubKey translates to a P2SH address, which can be used for funding the bet.
1 0x00 1 0x00 1 0x00 1 0x00
<length of oracle signature>
<signature returned by oracle>
<length of alice's secret>
<alice's secret>
OP_PUSHDATA1
<length of serialized script>
<serialized script>
1 0x00 1 0x00
<length of oracle signature>
<signature returned by oracle>
<length of bob's secret>
<bob's secret>
1 0x00 1 0x00
OP_PUSHDATA1
<length of serialized script>
<serialized script>
<length of alice's secret>
<alice's secret>
<length of bob's secret>
<bob's secret>
1 0x00 1 0x00 1 0x00 1 0x00
OP_PUSHDATA1
<length of serialized script>
<serialized script>