Skip to content

Commit

Permalink
updated 'Signed'
Browse files Browse the repository at this point in the history
  • Loading branch information
brunjlar committed May 4, 2021
1 parent 34f21a1 commit 1c57956
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/week05/src/Week05/Signed.hs
Expand Up @@ -39,8 +39,8 @@ mkPolicy pkh ctx = txSignedBy (scriptContextTxInfo ctx) pkh
policy :: PubKeyHash -> Scripts.MonetaryPolicy
policy pkh = mkMonetaryPolicyScript $
$$(PlutusTx.compile [|| Scripts.wrapMonetaryPolicy . mkPolicy ||])
`PlutusTx.applyCode`
PlutusTx.liftCode pkh
`PlutusTx.applyCode`
PlutusTx.liftCode pkh

curSymbol :: PubKeyHash -> CurrencySymbol
curSymbol = scriptCurrencySymbol . policy
Expand All @@ -54,7 +54,7 @@ type SignedSchema =
BlockchainActions
.\/ Endpoint "mint" MintParams

mint :: (HasBlockchainActions s, AsContractError e) => MintParams -> Contract w s e ()
mint :: MintParams -> Contract w SignedSchema Text ()
mint mp = do
pkh <- pubKeyHash <$> Contract.ownPubKey
let val = Value.singleton (curSymbol pkh) (mpTokenName mp) (mpAmount mp)
Expand Down

0 comments on commit 1c57956

Please sign in to comment.