I have the following simple minting script:
{-# INLINABLE unrestricted #-}
unrestricted :: () -> ScriptContext -> Bool
unrestricted () _ = True
unrestricted_policy :: MintingPolicy
unrestricted_policy
= mkMintingPolicyScript
$ $$(PlutusTx.compile [|| mkUntypedMintingPolicy unrestricted ||])
unrestricted_policy_sym :: CurrencySymbol
unrestricted_policy_sym = scriptCurrencySymbol unrestricted_policy
annd the following off-chain code:
contract0 :: Contract () Empty Text ()
contract0 = do
Contract.logInfo @String "unrestricted starting..."
let val = Value.singleton unrestricted_policy_sym (TokenName "ABC") 1
let lookups = C.mintingPolicy unrestricted_policy
let tx = C.mustMintValue val
ledgerTx <- submitTxConstraintsWith @Void lookups tx
void $ awaitTxConfirmed $ getCardanoTxId ledgerTx
Contract.logInfo @String "unrestricted done!"
Any ideas why it's failing?
When I run in the emulator I get the following error:
Slot 00001: *** CONTRACT STOPPED WITH ERROR: "\"ConstraintResolutionContractError (MintingPolicyNotFound 3e112e7d22026ab6ad0e1c77c950cbb8fd5c8568bc5a63950e11bda1)\""