Giter Club home page Giter Club logo

Comments (6)

DanTup avatar DanTup commented on May 30, 2024 1

Why is the script called "always succeed" and described as always succeeding if the random number must be known to withdraw funds?

I had misunderstood that the validation of the Datum/hash was script-specific, but it turns out to be validated for all transactions. Perhaps this could be clearer in the docs (here or here)?

Where is the source code for the script?

Knowing the above, I guess the source is this simple validator that always succeeds.

from alonzo-testnet.

CarlosLopezDeLara avatar CarlosLopezDeLara commented on May 30, 2024 1

Why must the random number be passed as both --tx-in-datum-value and --tx-in-redeemer-value?
In this particular script the redeemer is not relevant, however the cli is enforcing the use of both to build the transaction. You could use any value on the redeemer and it would still succeed. Using the same as in datum is an arbitrary decision.

How do execution units relate to the fee passed with --fee? Should they match? Should --fee be execution units + some additional fee for the transaction?

This is correct for now --fee be execution units + some additional fee for the transaction? Soon this calculations will be done automatically.

Why is the script called "always succeed" and described as always succeeding if the random number must be known to withdraw funds?

Because that is the datum is the only validation performed. No other logic involved. For this exercise the datum was relevant so that each pioneer could try to redeem, if it didn't involve datum, everyone would be able to redeem other's participants ada easily, potentially leaving them without the ability to test the redeeming transaction.

Where is the source code for the script?

It is a slightly modified version of: https://github.com/input-output-hk/plutus/blob/ffa40bb7c91a575272f3b20b4628432396789360/plutus-ledger-api/src/Plutus/V1/Ledger/Examples.hs#L22

On exercise 4 we will provide source code of the script, and you will have to compile it

from alonzo-testnet.

kevinhammond avatar kevinhammond commented on May 30, 2024 1

Hi Dan - this should really be in the tutorial material rather than the exercise itself - we will make sure it is covered there. We'll also cover it in the solution

from alonzo-testnet.

DanTup avatar DanTup commented on May 30, 2024

@CarlosLopezDeLara thank you for the answers! It may be useful to add some of that info to the Exercise 3 docs for future readers too.

from alonzo-testnet.

DanTup avatar DanTup commented on May 30, 2024

@kevinhammond is that material published already? I've struggled to find much in the way of Plutus docs - a lot of the results in search engines searching for this are now 404s (I raised this at input-output-hk/cardano-documentation#25).

from alonzo-testnet.

catch-21 avatar catch-21 commented on May 30, 2024

@DanTup For the time being Plutus docs can be found at https://plutus.readthedocs.io/en/latest/index.html

from alonzo-testnet.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.