<p>I had a similar issue where I needed to break up the validator logic to keep under the maxTx size limits.  I was able to do this by testing for the presence of threadtokens so that each of validators could &quot;communicate&quot; with each other.   I also implemented some performance improvements that reduce the overhead as well.</p>
<p>The project is called The Open Source Cardano Lottery and you can checkout the source code here:</p>
<p><a href="https://github.com/lley154/cardano-lottery" rel="nofollow noreferrer">https://github.com/lley154/cardano-lottery</a></p>

CC BY-SA 4.0
2022-05-06T23:54:09.267Z
2022-05-06T23:54:09.267Z
lley154
<p>I know I'm not answering your exact question, but I think I can help you achieve your goal of &quot;abstracting the script logic from the validator and only validate what's necessary for a specific transaction.&quot; Plutus pioneer program cohort #3 week 1's code is a good example of this</p>
<p><a href="https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs</a></p>
<p>You'll see that Lars used a custom data type for his redeemer, that allowed him to have different logic for whether the validator script was called with the intention of bidding or closing the auction.</p>

CC BY-SA 4.0
2022-05-03T09:14:45.633Z
Thanks for your answer. I see value on what Lars did, but my purpose was to reduce the script size. If I put all the possible conditions into one script, it could reach the transaction limit, so I prefer to have multiple minting policies that are only called when one of the conditions is met.
Mateus
CC BY-SA 4.0
2022-05-03T01:39:57.350Z
2022-05-03T01:39:57.350Z
Kyle Murphy
<p>I want to use the minting policy to abstract the script logic away from the validator and only validate what's necessary for a specific transaction. Right now, I'm able to do this by minting a token I call ticket and creating the validator in such a way that it makes sure this tokens is being minted.</p>
<p>Since my purpose is not to mint a token, this ends up increasing the transaction size without any added value so I wonder if it's possible to include the minting policy in the transaction, verify that somehow in the validator, but not mint or burn any tokens.</p>

<plutus><transaction><minting>
Can you include a minting policy in a transaction without minting or burning any tokens?
# Can you include a minting policy in a transaction without minting or burning any tokens?

(Asked by: username_0 on 2022-05-02)

I want to use the minting policy to abstract the script logic away from the validator and only validate what's necessary for a specific transaction. Right now, I'm able to do this by minting a token I call ticket and creating the validator in such a way that it makes sure this tokens is being minted.

Since my purpose is not to mint a token, this ends up increasing the transaction size without any added value so I wonder if it's possible to include the minting policy in the transaction, verify that somehow in the validator, but not mint or burn any tokens.

**Tags:** plutus, transaction, minting

---

## 2 answers

### Answer by username_1 on 2022-05-06. Score: 1

I had a similar issue where I needed to break up the validator logic to keep under the maxTx size limits. I was able to do this by testing for the presence of threadtokens so that each of validators could "communicate" with each other. I also implemented some performance improvements that reduce the overhead as well.

The project is called The Open Source Cardano Lottery and you can checkout the source code here:

<https://github.com/lley154/cardano-lottery>


---

### Answer by username_2 on 2022-05-03. Score: 0

I know I'm not answering your exact question, but I think I can help you achieve your goal of "abstracting the script logic from the validator and only validate what's necessary for a specific transaction." Plutus pioneer program cohort #3 week 1's code is a good example of this

<https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs>

You'll see that Lars used a custom data type for his redeemer, that allowed him to have different logic for whether the validator script was called with the intention of bidding or closing the auction.

> **Comments:**
> **username_0**: Thanks for your answer. I see value on what Lars did, but my purpose was to reduce the script size. If I put all the possible conditions into one script, it could reach the transaction limit, so I prefer to have multiple minting policies that are only called when one of the conditions is met.  

---

