Skip to content

Commit

Permalink
Add collateral balancing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Sep 9, 2024
1 parent 348576e commit 942f1f9
Showing 1 changed file with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,47 @@ hprop_plutus_v3 = integrationWorkspace "all-plutus-script-purposes" $ \tempAbsBa
[ "transaction", "submit"
, "--tx-file", spendScriptUTxOTx
]
H.success

waitForBlocks epochStateView 1
txinCollateral2 <- findLargestUtxoForPaymentKey epochStateView sbe wallet0
txin2 <- findLargestUtxoForPaymentKey epochStateView sbe wallet1

H.noteM_ $ execCli' execConfig
[ "query", "utxo", "--whole-utxo" ]

void $ execCli' execConfig
[ anyEraToString anyEra, "transaction", "build"
, "--change-address", Text.unpack $ paymentKeyInfoAddr wallet1
, "--tx-in-collateral", Text.unpack $ renderTxIn txinCollateral2
, "--tx-in", Text.unpack $ renderTxIn txin2
-- , "--tx-in-script-file", plutusScript
-- , "--tx-in-datum-value", "0"
-- , "--tx-in-redeemer-value", "0"
, "--mint", mintValue
, "--mint-script-file", plutusScript
, "--mint-redeemer-value", "0"
-- , "--certificate-file", scriptStakeRegistrationCertificate
-- , "--certificate-script-file", plutusScript
-- , "--certificate-redeemer-value", "0"
, "--tx-out", utxoAddr <> "+1000000"
, "--out-file", spendScriptUTxOTxBody
]

H.noteM_ $ execCli' execConfig
[ "debug", "transaction", "view", "--tx-file", spendScriptUTxOTxBody ]

void $ execCli' execConfig
[ "transaction", "sign"
, "--tx-body-file", spendScriptUTxOTxBody
, "--signing-key-file", utxoSKeyFile
, "--signing-key-file", utxoSKeyFile2
, "--out-file", spendScriptUTxOTx
]

void $ execCli' execConfig
[ "transaction", "submit"
, "--tx-file", spendScriptUTxOTx
]

H.failure

0 comments on commit 942f1f9

Please sign in to comment.