<p>The currency symbol is the hash of a minting policy script. This includes data like the paymentpubkey hash that can burn and mint. If someone wanted to use the same currency symbol as you, they would need the keys to the address that can mint or burn. Without those keys, they wouldn't be able to sign minting or burning transactions. Keep those keys safe.</p>
<p>I believe in the previous week (week 5), there was a lecture on a more realistic minting policy that specifies a paymentpubkey hash to allow minting.</p>

CC BY-SA 4.0
2022-03-03T09:07:47.637Z
2022-03-05T08:03:47.790Z
2022-03-05T08:03:47.790Z
christobear
<p>All the available on-chain validator programs that limit certain redeemer actions to transactions containing an NFT use</p>
<pre><code>hasToken :: TxOut -&gt; Bool
hasToken txOut = assetClassValueOf (txOutValue txOut) (AssetClass{unAssetClass = (&quot;something&quot;, TokenName &quot;somename&quot;)}) == 1
</code></pre>
<p>Including Plutus Pioneer week 6</p>
<p>Is there anything preventing a malicious user from minting a token with a currency symbol &quot;something&quot; and TokenName &quot;somename&quot; and then just performing the transaction? (edited)</p>
<p>How can on-chain validators make sure that the redeemer action can only be completed by a transaction containing a Cardano Native Token or NFT with the given CurrencySymbol, TokenName AND PolicyId so that we can make sure that the asset was not minted by a malicious party.</p>

<plutus><nft><native-assets>
Properly (safely) verify that transaction contains an Cardano Native Token or NFT
# Properly (safely) verify that transaction contains an Cardano Native Token or NFT

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

All the available on-chain validator programs that limit certain redeemer actions to transactions containing an NFT use
hasToken :: TxOut -> Bool
hasToken txOut = assetClassValueOf (txOutValue txOut) (AssetClass{unAssetClass = ("something", TokenName "somename")}) == 1

Including Plutus Pioneer week 6
Is there anything preventing a malicious user from minting a token with a currency symbol "something" and TokenName "somename" and then just performing the transaction? (edited)
How can on-chain validators make sure that the redeemer action can only be completed by a transaction containing a Cardano Native Token or NFT with the given CurrencySymbol, TokenName AND PolicyId so that we can make sure that the asset was not minted by a malicious party.

**Tags:** plutus, nft, native-assets

---

## 1 answers

### Answer by username_1 on 2022-03-03. Score: 1 | Accepted answer

The currency symbol is the hash of a minting policy script. This includes data like the paymentpubkey hash that can burn and mint. If someone wanted to use the same currency symbol as you, they would need the keys to the address that can mint or burn. Without those keys, they wouldn't be able to sign minting or burning transactions. Keep those keys safe.

I believe in the previous week (week 5), there was a lecture on a more realistic minting policy that specifies a paymentpubkey hash to allow minting.


---

