Comments (6)
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.
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.
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.
@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.
@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.
@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)
- Missing links mentioned in the document. HOT 3
- mistake in Exercise3 Solution + some improvement. HOT 1
- Solution described in e3SampleSolution.md does not appear to work HOT 12
- Providing a Docker Solution of Exercise 1.
- Fix location to AlonzoWhite configuration files HOT 1
- Add examples of automated test coverage to the solutions HOT 4
- Alonzo white sync error HOT 4
- Alonzo blue sync error HOT 1
- Exercice 3. Lock funds forever in the plutus script HOT 5
- Missing build transaction at Plutus_transactions_tutorial,md HOT 3
- Plutus scripts are not stable under exports of Haskell file HOT 4
- Align cabal source references with 1.29.0 HOT 1
- Show working code for emulator trace and playground usage HOT 5
- Command failed: transaction build Error: The following scripts have execution failures: the script for transaction input 0 (in the order of the TxIds) HOT 4
- File Name too long HOT 1
- Alonzo-testnet current capabilities
- Error: Caused by: [ (builtin unBData) (con data #06) ] when trying to convert Integer to `PlutusTx.Builtins.BuiltinString` HOT 1
- cabal: unrecognized 'build' option `-w' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alonzo-testnet.