<p>No.</p>

<p>BIP-16 says that client executes script and if it matches P2SH - removes top item from the stack and executes it as script. That's all. No inner loops and checks.</p>

CC BY-SA 3.0
2014-07-16T15:04:02.580Z
2014-07-16T15:04:02.580Z
amaclin
<p>I have read the following: </p>

<p><a href="https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki" rel="nofollow">https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki</a></p>

<p><a href="https://darkwallet.is/bip16-17" rel="nofollow">https://darkwallet.is/bip16-17</a></p>

<p>However, I would like to know, can one specify a pay-to-script hash that includes another pay-to-script hash? </p>

<p>E.G. </p>

<p>Script for payer: 
DUP HASH160  EQUALVERIFY CHECKSIG</p>

<p>scriptA: 
DUP HASH160  EQUALVERIFY CHECKSIG</p>

<p>Can one include a CHECKSIG operation for another script inside a script referred to by a pay-to-script hash? </p>

<p>I'm probably not communicating this clearly, but I would basically like to know whether I can "daisy-chain" pay-to-script hashes together. 
Let me know if I should add more examples, or what changes I should make to this. </p>

CC BY-SA 3.0
2014-07-17T20:58:10.020Z
As @amaclin said - no, but perhaps if you say why'd you need that, someone might propose an alternate solution. E.g. it's possible to daisychain a set of transactions...
kolinko
<script><p2sh>
Scripts within Scripts
Nathan Basanese
# Scripts within Scripts

(Asked by: username_0 on 2014-07-15)

I have read the following:

<https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki>

<https://darkwallet.is/bip16-17>

However, I would like to know, can one specify a pay-to-script hash that includes another pay-to-script hash?

E.G.

Script for payer:
DUP HASH160 EQUALVERIFY CHECKSIG

scriptA:
DUP HASH160 EQUALVERIFY CHECKSIG

Can one include a CHECKSIG operation for another script inside a script referred to by a pay-to-script hash?

I'm probably not communicating this clearly, but I would basically like to know whether I can "daisy-chain" pay-to-script hashes together.
Let me know if I should add more examples, or what changes I should make to this.

**Tags:** script, p2sh

> **Comments:**
> **username_1**: As @username_2 said - no, but perhaps if you say why'd you need that, someone might propose an alternate solution. E.g. it's possible to daisychain a set of transactions...  

---

## 1 answers

### Answer by username_2 on 2014-07-16. Score: 3

No.

BIP-16 says that client executes script and if it matches P2SH - removes top item from the stack and executes it as script. That's all. No inner loops and checks.


---

