<p>It validates whether the minted value matches <code>ownCurrencySymbol</code> which in turn is a hash of the validator/minting policy.</p>
<p>The <code>checkMintedSymbol</code> function might be redundant as you cannot mint arbitrary currency without providing matching validator/minting policy.</p>
<p>Edit based on comments: it isn't redundant if there are multiple minting policies in the transaction and it ensures only one kind of currency is being minted.</p>

CC BY-SA 4.0
2021-09-28T23:03:37.013Z
It's not exactly redundant. It is saying you are only minting one kind (typically you can mint with other policies in the same tx, so in a way this is over-constrained), and it is also saying it doesn't care about the token name (as long as it's all the same) or the amount minted.
Mitchell Turner
CC BY-SA 4.0
2021-09-29T11:41:41.680Z
Oh, that makes sense now since the validator sees all the mints of the tx not only its "own".
sorki
CC BY-SA 4.0
2021-09-28T18:53:02.640Z
2021-09-29T11:44:25.107Z
2021-09-29T11:44:25.107Z
sorki
<p>What exactly this function is validating?</p>
<pre><code>checkMintedSymbol :: Bool
checkMintedSymbol = case flattenValue (txInfoMint info) of
    [(cs', _, _)] -&gt; cs' == ownCurrencySymbol ctx
    _             -&gt; False


info :: TxInfo
info = scriptContextTxInfo ctx 
</code></pre>
<p>ctx is a <code>ScriptContext</code></p>

CC BY-SA 4.0
2021-09-28T19:11:37.483Z
At first glance, it appears to be some kind of redundancy. But I think it's used to ensure that the `CurrencySymbol` of the token (or `Value`) being minted is the same as the `CurrencySymbol` associated with the Validator/Minting Policy
Aoaddeola
<plutus><native-assets>
checkMintedSymbol
# checkMintedSymbol

(Asked by: username_0 on 2021-09-28)

What exactly this function is validating?
checkMintedSymbol :: Bool
checkMintedSymbol = case flattenValue (txInfoMint info) of
    [(cs', _, _)] -> cs' == ownCurrencySymbol ctx
    _             -> False


info :: TxInfo
info = scriptContextTxInfo ctx 

ctx is a ScriptContext

**Tags:** plutus, native-assets
> **Comments:**
> **username_1**: At first glance, it appears to be some kind of redundancy. But I think it's used to ensure that the `CurrencySymbol` of the token (or `Value`) being minted is the same as the `CurrencySymbol` associated with the Validator/Minting Policy  

---

## 1 answers

### Answer by username_2 on 2021-09-28. Score: 2 | Accepted answer

It validates whether the minted value matches `ownCurrencySymbol` which in turn is a hash of the validator/minting policy.

The `checkMintedSymbol` function might be redundant as you cannot mint arbitrary currency without providing matching validator/minting policy.

Edit based on comments: it isn't redundant if there are multiple minting policies in the transaction and it ensures only one kind of currency is being minted.

> **Comments:**
> **username_3**: It's not exactly redundant. It is saying you are only minting one kind (typically you can mint with other policies in the same tx, so in a way this is over-constrained), and it is also saying it doesn't care about the token name (as long as it's all the same) or the amount minted.  
> **username_2**: Oh, that makes sense now since the validator sees all the mints of the tx not only its "own".  

---

