I changed transition function in Lecture 7 and added constraint for minting Constraints.mustMintValue:
transition ts s r = case (stateValue s, stateData s, r) of
(v, _, SetPrice p) | p >= 0 -> Just ( Constraints.mustBeSignedBy (tsSeller ts) <>
Constraints.mustMintValue (assetClassValue (tsToken ts) 100)
, State p v
)
When I start emulator trace monad I am getting error in log:
Slot 00007: *** CONTRACT LOG: "SMCContractError (ConstraintResolutionError (MintingPolicyNotFound aa))"
I tried also with a different currencyPolicy than "aa", the real one that I got from Lecture 5 - Free.hs but I am getting the same result.
What is the proper way to do minting from State Machine?
let lookups = Constraints.mintingPolicy (policy oref)
.