Skip to content

Commit

Permalink
Propose constitution with guard rail script
Browse files Browse the repository at this point in the history
Add default plutus V3 script: plutusV3NonSpendingScript
  • Loading branch information
Jimbo4350 authored and mgmeier committed May 8, 2024
1 parent 4b9062f commit 236e39a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 0 additions & 1 deletion bench/cardano-topology/cardano-topology.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ license: Apache-2.0
license-files: LICENSE
NOTICE
build-type: Simple
extra-source-files: README.md
data-files: data/bench-torus-52.json
data/bench-torus-dense-52.json
data/ci-test-nomadcwqa.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ import GHC.Stack (HasCallStack, callStack)
import Lens.Micro
import System.FilePath ((</>))

import Testnet.Components.Configuration
import Testnet.Components.Query
import Testnet.Defaults
import qualified Testnet.Process.Cli as P
import qualified Testnet.Process.Run as H
import qualified Testnet.Property.Utils as H
Expand Down Expand Up @@ -175,6 +177,16 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n

-- Create constitution proposal

guardRailScriptFp <- H.note $ work </> "guard-rail-script.plutusV3"
H.writeFile guardRailScriptFp $ Text.unpack plutusV3NonSpendingScript
-- TODO: Update help text for policyid. The script hash is not
-- only useful for minting scripts
constitutionScriptHash <- filter (/= '\n') <$>
H.execCli' execConfig
[ convertToEraString cEra, "transaction"
, "policyid"
, "--script-file", guardRailScriptFp
]
void $ H.execCli' execConfig
[ "conway", "governance", "action", "create-constitution"
, "--testnet"
Expand All @@ -184,6 +196,7 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n
, "--anchor-data-hash", proposalAnchorDataHash
, "--constitution-url", "https://tinyurl.com/2pahcy6z"
, "--constitution-hash", constitutionHash
, "--constitution-script-hash", constitutionScriptHash
, "--out-file", constitutionActionFp
]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "PlutusScriptV3",
"description": "",
"cborHex": "4746010100228001"
}

0 comments on commit 236e39a

Please sign in to comment.