Skip to content
Draft
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: 1 addition & 1 deletion bench/plutus-scripts-bench/plutus-scripts-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>=10.19
, cardano-api ^>=10.20
, plutus-ledger-api ^>=1.53
, plutus-tx ^>=1.53
, plutus-tx-plugin ^>=1.53
Expand Down
2 changes: 1 addition & 1 deletion bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ library
, attoparsec-aeson
, base16-bytestring
, bytestring
, cardano-api ^>= 10.19
, cardano-api ^>= 10.20
, cardano-binary
, cardano-cli ^>= 10.13
, cardano-crypto-class
Expand Down
20 changes: 20 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,23 @@ if impl (ghc >= 9.12)
-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.



source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api.git
tag: 32310d48b17daa6f2942dff63372389987812f58
--sha256: sha256-Kl/nUvzQ+O0LjIGECpd5AS5GnMuXIpDp1hH5Kz1irsc=
subdir: cardano-api





source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-cli.git
tag: de2b268e656e64c5ef211a2a8607043e311ba2a2
--sha256: sha256-bCPtVGFxqvM/ihkdKjXp39AHMo1yd04kwTujMLJ1fMo=
subdir: cardano-cli
2 changes: 1 addition & 1 deletion cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ library
, async
, base16-bytestring
, bytestring
, cardano-api ^>= 10.19
, cardano-api ^>= 10.20
, cardano-crypto-class ^>=2.2.3.2
, cardano-crypto-wrapper
, cardano-git-rev ^>=0.2.2
Expand Down
2 changes: 1 addition & 1 deletion cardano-submit-api/cardano-submit-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ library
, aeson
, async
, bytestring
, cardano-api ^>= 10.19
, cardano-api ^>= 10.20
, cardano-binary
, cardano-cli ^>= 10.13
, cardano-crypto-class ^>=2.2.3.2
Expand Down
2 changes: 1 addition & 1 deletion cardano-testnet/cardano-testnet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ library
, annotated-exception
, ansi-terminal
, bytestring
, cardano-api ^>= 10.19
, cardano-api ^>= 10.20
, cardano-cli:{cardano-cli, cardano-cli-test-lib} ^>= 10.13
, cardano-crypto-class ^>=2.2.3.2
, cardano-crypto-wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import qualified Hedgehog.Extras as H
-- Voting NO
-- Proposing NO
-- Execute me with:
-- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/Spec.hs.Spec.Ledger Events.Plutus.Scripts/"@
-- @DISABLE_RETRIES=1 cabal run cardano-testnet-test -- -p "/PlutusV3 purposes/"@
hprop_plutus_purposes_v3 :: Property
hprop_plutus_purposes_v3 = integrationWorkspace "all-plutus-script-purposes" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
Expand Down Expand Up @@ -190,11 +190,12 @@ hprop_plutus_purposes_v3 = integrationWorkspace "all-plutus-script-purposes" $ \
]

H.success

-- TODO: Left off here. The transaction has a v3 script but you are reading a v2 script!
-- The hash is also different inside the transaction!

-- |
-- Execute me with:
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/PlutusV2 Create transaction with two script certs/"'@
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/PlutusV2 transaction with two script certs/"'@
hprop_tx_two_script_certs_v2 :: Property
hprop_tx_two_script_certs_v2 = integrationWorkspace "tx-2-script-certs" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
Expand Down Expand Up @@ -229,7 +230,7 @@ hprop_tx_two_script_certs_v2 = integrationWorkspace "tx-2-script-certs" $ \tempA
txin <- T.unpack . renderTxIn <$> findLargestUtxoForPaymentKey epochStateView sbe wallet0

plutusScript <- H.note $ work </> "always-succeeds-script.plutusV2"
H.writeFile plutusScript $ T.unpack plutusV2StakeScript
H.writeFile plutusScript $ T.unpack plutusV3Script

scriptStakeRegistrationCertificate
<- H.note $ work </> "script-stake-registration-certificate"
Expand Down Expand Up @@ -257,7 +258,9 @@ hprop_tx_two_script_certs_v2 = integrationWorkspace "tx-2-script-certs" $ \tempA
let txbody = work </> "two-certs-tx-body"
tx = work </> "two-certs-tx"
txout = mconcat [ utxoAddr, "+", show @Int 2_000_000 ]


s <- execCli' execConfig [anyEraToString anyEra, "transaction", "policyid", "--script-file", plutusScript]
H.note_ $ "Script hash: " <> s
let txBuildArgs =
[ anyEraToString anyEra, "transaction", "build"
, "--change-address", T.unpack $ paymentKeyInfoAddr wallet0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co
createStakeKeyRegistrationCertificate
tempAbsPath (AnyShelleyBasedEra sbe) (verificationKey stakeKeys) keyDeposit stakeCertFp


stakeCertTxBodyFp <- H.note $ work </> "stake.registration.txbody"
stakeCertTxSignedFp <- H.note $ work </> "stake.registration.tx"

Expand All @@ -153,14 +154,20 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co
, "--signing-key-file", signingKeyFp stakeKeys
, "--out-file", stakeCertTxSignedFp
]
-- TODO: Left off here. No certificate was in transaction!
stakeCertTx <- execCli' execConfig
["debug", "transaction"
, "view", "--output-json", "--tx-body-file", stakeCertTxBodyFp
]

H.note_ $ "Stake registration transaction: " <> stakeCertTx
void $ execCli' execConfig
[ eraName, "transaction", "submit"
, "--tx-file", stakeCertTxSignedFp
]

-- make sure that stake registration cert gets into a block
_ <- waitForBlocks epochStateView 1
_ <- waitForBlocks epochStateView 15

minGovActDeposit <- getMinGovActionDeposit epochStateView ceo

Expand All @@ -187,6 +194,20 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co
txbodyFp <- H.note $ work </> "tx.body"
txin1' <- findLargestUtxoForPaymentKey epochStateView sbe wallet0



void $ execCli' execConfig
[ eraName, "stake-address", "key-hash"
, "--stake-verification-key-file", verificationKeyFp stakeKeys
, "--out-file", gov </> "stake-hash.addr"
]

stakeKeyHash <- H.readFile $ gov </> "stake-hash.addr"

H.note_ $ "Stake key hash:" <> stakeKeyHash



-- Create temporary HTTP server with files required by the call to `cardano-cli`
-- In this case, the server emulates an IPFS gateway
serveFilesWhile
Expand Down
Loading