add locks in datums, add documentation, ClosedTerm on scripts
Also added more lifting instances
This commit is contained in:
parent
d064e14c8b
commit
94383b33ca
5 changed files with 147 additions and 36 deletions
|
|
@ -23,11 +23,11 @@ import Plutus.V1.Ledger.Value (CurrencySymbol)
|
|||
helper.
|
||||
-}
|
||||
makeEffect ::
|
||||
forall (datum :: PType) (s :: S).
|
||||
forall (datum :: PType).
|
||||
PIsData datum =>
|
||||
CurrencySymbol ->
|
||||
(Term s datum -> Term s PTxOutRef -> Term s (PAsData PTxInfo) -> Term s POpaque) ->
|
||||
Term s PValidator
|
||||
(forall (s :: S). Term s datum -> Term s PTxOutRef -> Term s (PAsData PTxInfo) -> Term s POpaque) ->
|
||||
ClosedTerm PValidator
|
||||
makeEffect gatCs' f =
|
||||
plam $ \datum _redeemer ctx' -> P.do
|
||||
ctx <- pletFields @'["txInfo", "purpose"] ctx'
|
||||
|
|
@ -40,7 +40,7 @@ makeEffect gatCs' f =
|
|||
txOutRef' <- plet (pfield @"_0" # txOutRef)
|
||||
|
||||
txInfo <- pletFields @'["mint"] txInfo'
|
||||
let mint :: Term s PValue
|
||||
let mint :: Term _ PValue
|
||||
mint = txInfo.mint
|
||||
|
||||
gatCs <- plet $ pconstant gatCs'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue