I have the following minting script:
{-# INLINABLE verify_mint #-}
script :: () -> V2.ScriptContext -> Bool
script () _ = (3::Integer) == 2+1
and the following off-chain code to mint a token:
trace :: Trace.EmulatorTrace ()
trace = do
Extras.logInfo @Haskell.String "Starting..."
handle <- Trace.activateContractWallet Test.w1 contract
Trace.callEndpoint @"mint" handle ()
Functor.void $ Trace.waitNSlots 5
contract :: Contract () Schema Text ()
contract = do
Contract.logInfo @Haskell.String "Waiting..."
Contract.selectList [ mint ] >> contract
mint :: Promise () Schema Text ()
mint = Contract.endpoint @"mint" $ \() -> do
let constraint = Constraints.mustMintCurrency (Scripts.mintingPolicyHash policy) "ABC" 1
tx <- Contract.submitTxConstraintsWith @TScripts.Any (Constraints.plutusV2MintingPolicy policy) constraint
Functor.void $ Contract.awaitTxConfirmed (Ledger.getCardanoTxId tx)
Contract.logInfo @Haskell.String "Minted!"
However when I run writeToScript
as follows:
let cmd = Scripts UnappliedValidators
let config = ScriptsConfig "keystore-stats" cmd
Haskell.print =<< writeScriptsTo config "x" trace Default.def
I get the following result:
(Sum {getSum = 0},ExBudget {exBudgetCPU = ExCPU 0, exBudgetMemory = ExMemory 0})
How can this be? Shouldn't minting require some resources?