Skip to content

Commit

Permalink
SCP-4225 implement marlowe cli DSL for execute command
Browse files Browse the repository at this point in the history
  • Loading branch information
ladamesny committed Aug 8, 2022
1 parent 940a370 commit bbd1a23
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions marlowe-cli/src/Language/Marlowe/CLI/Run.hs
Expand Up @@ -403,6 +403,21 @@ runTransaction connection marloweInBundle marloweOutFile inputs outputs changeAd
pure
$ getTxId body

runTransactionImpl :: MonadError CliError m
=> MonadIO m
=> LocalNodeConnectInfo CardanoMode -- ^ The connection info for the local node.
-> Maybe (FilePath, TxIn, TxIn) -- ^ The JSON file with the Marlowe initial state and initial contract, along with the script eUTxO being spent and the collateral, unless the transaction opens the contract.
-> FilePath -- ^ The JSON file with the Marlowe inputs, final state, and final contract.
-> [TxIn] -- ^ The transaction inputs.
-> [(AddressAny, Maybe Datum, Api.Value)] -- ^ The transaction outputs.
-> AddressAny -- ^ The change address.
-> [FilePath] -- ^ The files for required signing keys.
-> Maybe FilePath -- ^ The file containing JSON metadata, if any.
-> FilePath -- ^ The output file for the transaction body.
-> Maybe Int -- ^ Number of seconds to wait for the transaction to be confirmed, if it is to be confirmed.
-> Bool -- ^ Whether to print statistics about the transaction.
-> Bool -- ^ Assertion that the transaction is invalid.
-> m () -- ^ Action to build the transaction body.

-- | Adjust the lovelace in an output to confirm to the minimum ADA requirement.
adjustMinimumUTxO :: MonadError CliError m
Expand Down
4 changes: 4 additions & 0 deletions marlowe-cli/src/Language/Marlowe/CLI/Test/Types.hs
Expand Up @@ -161,6 +161,10 @@ data ScriptOperation =
, soMinimumTime :: POSIXTime
, soMaximumTime :: POSIXTime
}
| Execute
{
soTransaction :: TransactionNickname
}
| Fail
{
soFailureMessage :: String
Expand Down

0 comments on commit bbd1a23

Please sign in to comment.