user3953: Suppose I have one contract, Contract 1, that is parameterized by type
Contract1Params{
   tokenName :: BuiltinByteString
}

and I have a minting policy that will only mint a token with tokenName tn to the address of Contract 1 parameterized by c1p where tokenName c1p is tn.
So I need to get the address of parameterized contract from the token name of the token that is attempting to be minted from within the minting policy. Not sure how to do this with on chain code. Any ideas?

user1231: Your minting policy should have a parameter related to the address of the contract.
mkPolicy :: Address -> () -> ScriptContext -> Bool

In your off chain code, you send that parameter to your minting policy with something like this:
let val = Value.singleton (mySymbol $ scrAddress cp1) tn 1

Where:

mySymbol is the CurrencySymbol of your minting policy
scrAddress is the Address of your validator script
cp1 is the Parameter of your validator script


3953: <p>Suppose I have one contract, Contract 1, that is parameterized by type</p>
<pre><code>Contract1Params{
   tokenName :: BuiltinByteString
}
</code></pre>
<p>and I have a minting policy that will only mint a token with <code>tokenName</code> <em><strong>tn</strong></em> to the address of Contract 1 parameterized by <code>c1p</code> where <code>tokenName c1p</code> is <em><strong>tn</strong></em>.</p>
<p>So I need to get the address of parameterized contract from the token name of the token that is attempting to be minted from within the minting policy. Not sure how to do this with on chain code. Any ideas?</p>
 1231: <p>Your minting policy should have a parameter related to the address of the contract.</p>
<pre><code>mkPolicy :: Address -&gt; () -&gt; ScriptContext -&gt; Bool
</code></pre>
<p>In your off chain code, you send that parameter to your minting policy with something like this:</p>
<pre><code>let val = Value.singleton (mySymbol $ scrAddress cp1) tn 1
</code></pre>
<p>Where:</p>
<ul>
<li>mySymbol is the CurrencySymbol of your minting policy</li>
<li>scrAddress is the Address of your validator script</li>
<li>cp1 is the Parameter of your validator script</li>
</ul>
