0

Can anyone explain in detail why this script, https://github.com/james-iohk/Alonzo-testnet/blob/update-cabal-1.29.0/resources/plutus-sources/plutus-alwayssucceeds/src/Cardano/PlutusExample/AlwaysSucceeds.hs, results in the following output?

Writing output to: 
alwayssucceeds.plutus
"Log output"
[]
"Ex Budget"
ExBudget {exBudgetCPU = ExCPU 297830, exBudgetMemory = ExMemory 1100}

Thanks, Myles

1 Answer 1

1

The output seems to be generated by this Haskell script (plutus-alwayssucceeds.hs) sitting in the parent folder of the script you linked. "plutus-alwayssucceeds.hs" is defined as the entry point of the executable defined in cabal file here.

When you run command like cabal build, cabal will build "plutus-alwayssucceeds.hs" as an executable, which, when executed, will print out the log pasted in the question above. Notice that the actual plutus script (alwayssucceeds.plutus) is generated by function "writePlutusScript" here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.