Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match function names from plutus-script-utils #1669

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ changes.

- Tested with `cardano-node 9.2.0` and `cardano-cli 9.4.1.0`.

- **BREAKING** Plutus Scripts changed due to renaming.

## [0.19.0] - 2024-09-13

- Tested with `cardano-node 9.1.1` and `cardano-cli 9.2.1.0`
Expand Down
13 changes: 6 additions & 7 deletions hydra-plutus-extras/src/Hydra/Plutus/Extras.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,33 @@ type ValidatorType = BuiltinData -> BuiltinData -> BuiltinData -> BuiltinUnit

-- | Wrap a typed validator to get the basic `ValidatorType` signature which can
-- be passed to `PlutusTx.compile`.
-- REVIEW: There might be better ways to name this than "wrap"
wrapValidator ::
mkUntypedValidator ::
(UnsafeFromData datum, UnsafeFromData redeemer, UnsafeFromData context) =>
(datum -> redeemer -> context -> Bool) ->
ValidatorType
wrapValidator f d r c =
mkUntypedValidator f d r c =
check $ f datum redeemer context
where
datum = unsafeFromBuiltinData d
redeemer = unsafeFromBuiltinData r
context = unsafeFromBuiltinData c
{-# INLINEABLE wrapValidator #-}
{-# INLINEABLE mkUntypedValidator #-}

-- | Signature of an untyped minting policy script.
type MintingPolicyType = BuiltinData -> BuiltinData -> BuiltinUnit

-- | Wrap a typed minting policy to get the basic `MintingPolicyType` signature
-- which can be passed to `PlutusTx.compile`.
wrapMintingPolicy ::
mkUntypedMintingPolicy ::
(UnsafeFromData redeemer, UnsafeFromData context) =>
(redeemer -> context -> Bool) ->
MintingPolicyType
wrapMintingPolicy f r c =
mkUntypedMintingPolicy f r c =
check $ f redeemer context
where
redeemer = unsafeFromBuiltinData r
context = unsafeFromBuiltinData c
{-# INLINEABLE wrapMintingPolicy #-}
{-# INLINEABLE mkUntypedMintingPolicy #-}

-- * Similar utilities as plutus-ledger

Expand Down
4 changes: 2 additions & 2 deletions hydra-plutus/scripts/mHead.plutus

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions hydra-plutus/scripts/vCommit.plutus
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "PlutusScriptV2",
"description": "hydra-vCommit-0.17.0-348-gd8c94a18c3",
"cborHex": "5906cc5906c9010000323233223322323232323323232322222533533300430050033232325333573466e1d2000002112200115333573466e1d200200211220021300c00b35573c0046aae74004dd50011991919191911919192999ab9a3370e90000010999109198008018011919192999ab9a3370e9000001099191919191919191919199999999999911111111111091999999999998008068060058050048040038030028020018011980e11919192999ab9a3370e900000109991091980080180118109aba10013016357426ae880044c08c088d55cf0011aab9d00137540026ae8402cd5d08051980e0091aba100933301675ca02a6ae84020ccc059d7280a9aba10073574200c6ae84014d5d08021980e3ae357420066ae84008ccc059d710009aba1001357426ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba20011301501435573c0046aae74004dd51aba10013232325333573466e1d2000002132122223003005375c6ae8400454ccd5cd19b87480080084c848888c004014c04cd5d08008a999ab9a3370e900200109909111180100298049aba100115333573466e1d20060021321222230040053232325333573466e1d2000002132122222223005008300c357420022a666ae68cdc3a400400426424444444600e01060186ae8400454ccd5cd19b87480100084cc8848888888cc018024020c030d5d08009bae357426ae8800454ccd5cd19b87480180084cc8848888888cc008024020dd71aba1001375c6ae84d5d10008a999ab9a3370e90040010999109111111198008048041bae357420026eb4d5d09aba200115333573466e1d200a00211222222200415333573466e1d200c0021122222220031301801735573c0046aae74004dd51aba10011301501435573c0046aae74004dd51aba135744002260240226aae78008d55ce8009baa0013223232325333573466e1d200000213232333322221233330010050040030023232325333573466e1d2000002133221233001003002300c35742002660140166ae84d5d10008980b80b1aab9e00235573a0026ea8d5d0801999805bae500a35742004646464a666ae68cdc3a4000004224440062a666ae68cdc3a4004004264244460020086eb8d5d08008a999ab9a3370e9002001099091118010021aba10011301701635573c0046aae74004dd51aba10013300775c6ae84d5d10009aba200135744002260240226aae78008d55ce8009baa001223232325333573466e1d2002002112200115333573466e1d20000021321223002003300535742002260240226aae78008d55ce8009baa00123232325333573466e1d200000213212230020033005357420022a666ae68cdc3a400400426466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba2001357440022602001e6aae78008d55ce8009baa00123232325333573466e1d20000021321223002003375c6ae8400454ccd5cd19b87480080084c8488c00400cdd71aba10011300f00e35573c0046aae74004dd5000899800bae75a4464460046eac004c05088cccd55cf800900a91919a80a9991091980080180118031aab9d001300535573c00260086ae8800cd5d08010070008a4c2601292103505435003223232325333573466e1d200000213233322212333001004003002375c6ae84008c018d5d08009bae357426ae88004d5d1000898048041aab9e00235573a0026ea8004c0048c8c8c94ccd5cd19b87480000084cc8848cc00400c008c018d5d08009bae357426ae880044c02001cd55cf0011aab9d0013754002464460046eb0004c03488cccd55cf8009007119a80698021aba100230033574400400e4646464a666ae68cdc3a4000004266442466002006004646464a666ae68cdc3a400000426eb8d5d0800898048041aab9e00235573a0026ea8d5d08009bad357426ae880044c018014d55cf0011aab9d001375400292103505431003232222350032223232533500713300a49010343303100300135300900622222222222200813300a49010343303200300235533535300900622222222222200a1300b491035054380022100222220033013225335001101022135002225333573466e3c0080204c0480044c01800cc048894cd4004403c884d4008894ccd5cd19b8f0020071301200113006003235001220022253350011008133573800400e464c66ae7000400848004c01c894cd40044010884d4008894ccd5cd19b8f00200c1333573466e1d2001001009008130060033006225335001100322135002225333573466e3c00802c4ccd5cd19b874800800402001c4c01800c488008488004488008488488cc00401000d22010b4879647261486561645631002323001001230022330020020011"
"description": "hydra-vCommit-0.19.0-43-g3848c86ad",
"cborHex": "5906cc5906c9010000323322323322323232323323232322222533533300430050033232325333573466e1d2000002112200115333573466e1d200200211220021300c00b35573c0046aae74004dd50011991919191911919192999ab9a3370e90000010999109198008018011919192999ab9a3370e9000001099191919191919191919199999999999911111111111091999999999998008068060058050048040038030028020018011980e11919192999ab9a3370e900000109991091980080180118109aba10013016357426ae880044c08c088d55cf0011aab9d00137540026ae8402cd5d08051980e0091aba100933301675ca02a6ae84020ccc059d7280a9aba10073574200c6ae84014d5d08021980e3ae357420066ae84008ccc059d710009aba1001357426ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba20011301501435573c0046aae74004dd51aba10013232325333573466e1d2000002132122223003005375c6ae8400454ccd5cd19b87480080084c848888c004014c04cd5d08008a999ab9a3370e900200109909111180100298049aba100115333573466e1d20060021321222230040053232325333573466e1d2000002132122222223005008300c357420022a666ae68cdc3a400400426424444444600e01060186ae8400454ccd5cd19b87480100084cc8848888888cc018024020c030d5d08009bae357426ae8800454ccd5cd19b87480180084cc8848888888cc008024020dd71aba1001375c6ae84d5d10008a999ab9a3370e90040010999109111111198008048041bae357420026eb4d5d09aba200115333573466e1d200a00211222222200415333573466e1d200c0021122222220031301801735573c0046aae74004dd51aba10011301501435573c0046aae74004dd51aba135744002260240226aae78008d55ce8009baa0013223232325333573466e1d200000213232333322221233330010050040030023232325333573466e1d2000002133221233001003002300c35742002660140166ae84d5d10008980b80b1aab9e00235573a0026ea8d5d0801999805bae500a35742004646464a666ae68cdc3a4000004224440062a666ae68cdc3a4004004264244460020086eb8d5d08008a999ab9a3370e9002001099091118010021aba10011301701635573c0046aae74004dd51aba10013300775c6ae84d5d10009aba200135744002260240226aae78008d55ce8009baa001223232325333573466e1d2002002112200115333573466e1d20000021321223002003300535742002260240226aae78008d55ce8009baa00123232325333573466e1d200000213212230020033005357420022a666ae68cdc3a400400426466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba2001357440022602001e6aae78008d55ce8009baa00123232325333573466e1d20000021321223002003375c6ae8400454ccd5cd19b87480080084c8488c00400cdd71aba10011300f00e35573c0046aae74004dd5000899800bae75a4464460046eac004c05088cccd55cf800900991919a8099991091980080180118031aab9d001300535573c00260086ae8800cd5d08010070008a4c2601292103505435003223232325333573466e1d200000213233322212333001004003002375c6ae84008c018d5d08009bae357426ae88004d5d1000898048041aab9e00235573a0026ea8004c0048c8c8c94ccd5cd19b87480000084cc8848cc00400c008c018d5d08009bae357426ae880044c02001cd55cf0011aab9d0013754002464460046eb0004c03488cccd55cf8009006119a80598021aba100230033574400400e4646464a666ae68cdc3a4000004266442466002006004646464a666ae68cdc3a400000426eb8d5d0800898048041aab9e00235573a0026ea8d5d08009bad357426ae880044c018014d55cf0011aab9d001375400292103505431003232222350032223232533500713300a49010343303100300135300900622222222222200813300a49010343303200300235533535300900622222222222200a1300b491035054380022100222220033013225335001101322135002225333573466e3c0080204c0480044c01800cc048894cd40044048884d4008894ccd5cd19b8f002007130120011300600323500122002225335001100b1335738004014464c66ae7000400848004c01c894cd4004401c884d4008894ccd5cd19b8f00200a1333573466e1d200100100c00b130060033006225335001100622135002225333573466e3c0080244ccd5cd19b874800800402c0284c01800c488008488488cc00401000d22010b4879647261486561645631001220021220012323001001230022330020020011"
}
Loading
Loading