Skip to content

Commit

Permalink
Import schnorkell plutus
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Nov 20, 2024
1 parent 25f9f72 commit 0e843b1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
21 changes: 21 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,24 @@ program-options
constraints:
quickcheck-instances==0.3.31,
data-default==0.7.1.3

source-repository-package
type: git
location: https://github.com/locallycompact/cardano-base
tag: 1a800a0c1392935256aebabf6c1fdefe5e8b34ae
--sha256: sha256-LXYzVyWHWBS361NR4pL/Jbilnv48z6ZozltaL2/ym2s=
subdir:
cardano-crypto-class

source-repository-package
type: git
location: https://github.com/locallycompact/plutus
tag: 61835ade3aa31bf0dc5b1c9f614b9f1c903698e8
--sha256: sha256-oiFR4fLBF22SDPBuyWRulclXZAAb1j8lx6UCWn3rBS0=
subdir:
plutus-core
plutus-ledger-api
plutus-tx-plugin
plutus-tx

allow-newer: cardano-crypto-class
5 changes: 5 additions & 0 deletions hydra-cluster/src/Hydra/Cluster/Scenarios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import Hydra.API.HTTPServer (
TransactionSubmitted (..),
)
import Hydra.Cardano.Api (
txSpendingUTxO,
Coin (..),
File (File),
Key (SigningKey),
Expand Down Expand Up @@ -442,6 +443,10 @@ singlePartyCommitsScriptBlueprint tracer workDir node hydraScriptsTxId =

waitFor hydraTracer 10 [n1] $
output "GetUTxOResponse" ["headId" .= headId, "utxo" .= (scriptUTxO <> scriptUTxO')]

let tx' = txSpendingUTxO scriptUTxO

send n1 $ input "NewTx" ["transaction" .= tx']
where
prepareScriptPayload = do
let script = dummyValidatorScript
Expand Down
6 changes: 4 additions & 2 deletions hydra-plutus/src/Hydra/Contract/Dummy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ module Hydra.Contract.Dummy where

import Hydra.Cardano.Api (PlutusScriptVersion (PlutusScriptV3))
import Hydra.Plutus.Extras (ValidatorType, scriptValidatorHash, wrapValidator)
import Hydra.Prelude
import Hydra.Prelude hiding ((==))

import PlutusLedgerApi.V3 (BuiltinData, ScriptContext, ScriptHash, SerialisedScript, serialiseCompiledCode, toOpaque)
import PlutusTx (CompiledCode, compile)
import PlutusTx.Prelude (Eq(..))
import PlutusTx.Builtins (schnorrkel)

dummyValidator :: BuiltinData -> BuiltinData -> ScriptContext -> Bool
dummyValidator _ _ _ = True
dummyValidator _ _ _ = "" == schnorrkel ""

compiledDummyValidator :: CompiledCode ValidatorType
compiledDummyValidator =
Expand Down

0 comments on commit 0e843b1

Please sign in to comment.