Marlowe Pioneer | |||
All w0708a_setup w0708c_notify w0708d_notify w0800_fan_out w0801_escrow w0802_cbg w0802f_cbg w0802s_cbg w0802t_cbg w1202_notify |
w0802_cbg
220220924
Issue, as posted on discord under the title “Coupon Bond Guaranteed”Has anybody tried to implement the example “Coupon Bond Guaranteed” on the testnet ? (how to get this example contract: open blockly in the marlowe playground -> open example -> choose “Coupon Bond Guaranteed” as “blockly”) I’ve tried to implement it using marlowe-cli and cardano-cli on the 1567 testnet, and I kept on failing on the step where the last installment is paid, which is script 402 in following list:
The error I kept running into: TxBodyScriptExecutionError [(ScriptWitnessIndexTxIn 0,ScriptErrorEvaluationFailed (CekError An error has occurred: User error: The provided Plutus code called ‘error’.) [“R”,“PT5”])] The problem in step 402 is that 2 separate payments are made to the lender: the principal+instalment AND the minimum_ada (the latter is the amount used to fund the contract). After lots of experimentation I managed to change the contract such that it succeeds, but I don’t know if this is a desired modification. The included screenshot explains best what I did to get it to work (note: the screenshot only shows the relevant part of the contract). For ref: cardano-cli 1.34.1 | marlowe-cli 0.0.4.4 | MAGIC=1567 End of message posted on discord Transcript of both runs
Note: the amounts (principal, installment, fund_amount) for the above have been changed, ie. the amounts in the above diagram do not reflect the transcripts. Update: add another roleLater on in the weekend I discovered that the original contract can be successfully run when introducing another party/role, eg ‘patron’ that funds the contract.
|