<p>Just found my mistake. Just need to have the multiple policies in diferent files..</p>

CC BY-SA 4.0
2022-10-02T12:34:47.053Z
2022-10-02T12:34:47.053Z
Cristovao Morgado
<p>I'm trying to mint a utility token and based on this quantity the investor will get different NFT bonus.</p>
<pre><code>----------
mint :: MintParams -&gt; Contract w FreeSchema Text ()
mint mp = do 
        let yacada          = Value.singleton yacadaSymbol yacadaName (calculateYacada $ mpAdaAmount mp)  
            yacadaNft       = Value.singleton yacadaNFTSymbol  &quot;NFT&quot; 1 --(giveReferalNFTN
            adas            = Ada.lovelaceValueOf $ mpAdaAmount mp            
            lookups         = Constraints.mintingPolicy policy &lt;&gt; Constraints.mintingPolicy levelPolicy
            destinations    = paymentTo mp
            payment         = Constraints.mustPayToPubKey (treasury destinations) adas
            mintYacada      = Constraints.mustMintValue yacada &lt;&gt; Constraints.mustMintValue yacadaNFT
            tx              = mintYacada
                                                             
        ledgerTx &lt;- submitTxConstraintsWith @Void lookups tx
        void $ awaitTxConfirmed $ getCardanoTxId ledgerTx
        logInfo @String $ printf &quot;------------------------------------------------------&quot;
        logInfo @String $ printf &quot;We forged y:%s NFT:%s&quot; (show yacada)  (show yacadaNft)
        logInfo @String $ printf &quot;------------------------------------------------------&quot;

----------
</code></pre>
<p>The thing is that when I see the token in the wallet they both have the same policy :</p>
<p>(
Wallet 2:
{32d66bc1df769f6af0d37ccd9e3510ebf38b5e4c7235a2b2e4e9d08c, &quot;NFT&quot;}: 1
{32d66bc1df769f6af0d37ccd9e3510ebf38b5e4c7235a2b2e4e9d08c, &quot;YACADA_TOKEN&quot;}: 2000
{, &quot;&quot;}: 99697225
Wallet 1:
{32d66bc1df769f6af0d37ccd9e3510ebf38b5e4c7235a2b2e4e9d08c, &quot;NFT&quot;}: 1
{32d66bc1df769f6af0d37ccd9e3510ebf38b5e4c7235a2b2e4e9d08c, &quot;YACADA_TOKEN&quot;}: 1000
{, &quot;&quot;}: 99697137</p>
<p>Any ideas?
I have this &quot;test code&quot; on github if any needs it.</p>

<nft><mintingpolicy>
Multiple minting on one TX
# Multiple minting on one TX

(Asked by: username_0 on 2022-10-01)

I'm trying to mint a utility token and based on this quantity the investor will get different NFT bonus.
----------
mint :: MintParams -> Contract w FreeSchema Text ()
mint mp = do 
        let yacada          = Value.singleton yacadaSymbol yacadaName (calculateYacada $ mpAdaAmount mp)  
            yacadaNft       = Value.singleton yacadaNFTSymbol  "NFT" 1 --(giveReferalNFTN
            adas            = Ada.lovelaceValueOf $ mpAdaAmount mp            
            lookups         = Constraints.mintingPolicy policy <> Constraints.mintingPolicy levelPolicy
            destinations    = paymentTo mp
            payment         = Constraints.mustPayToPubKey (treasury destinations) adas
            mintYacada      = Constraints.mustMintValue yacada <> Constraints.mustMintValue yacadaNFT
            tx              = mintYacada
                                                             
        ledgerTx <- submitTxConstraintsWith @Void lookups tx
        void $ awaitTxConfirmed $ getCardanoTxId ledgerTx
        logInfo @String $ printf "------------------------------------------------------"
        logInfo @String $ printf "We forged y:%s NFT:%s" (show yacada)  (show yacadaNft)
        logInfo @String $ printf "------------------------------------------------------"

----------

The thing is that when I see the token in the wallet they both have the same policy :
(
Wallet 2:
{32d66bc1df769f6af0d37ccd9e3510ebf38b5e4c7235a2b2e4e9d08c, "NFT"}: 1
{32d66bc1df769f6af0d37ccd9e3510ebf38b5e4c7235a2b2e4e9d08c, "YACADA_TOKEN"}: 2000
{, ""}: 99697225
Wallet 1:
{32d66bc1df769f6af0d37ccd9e3510ebf38b5e4c7235a2b2e4e9d08c, "NFT"}: 1
{32d66bc1df769f6af0d37ccd9e3510ebf38b5e4c7235a2b2e4e9d08c, "YACADA_TOKEN"}: 1000
{, ""}: 99697137
Any ideas?
I have this "test code" on github if any needs it.

**Tags:** nft, mintingpolicy

---

## 1 answers

### Answer by username_0 on 2022-10-02. Score: 0 | Accepted answer

Just found my mistake. Just need to have the multiple policies in diferent files..


---

