Questions tagged [plutustx]
The plutustx tag has no usage guidance.
40
questions
13
votes
1
answer
324
views
How do I build a debug configuration of a Plutus project?
When I try to set a breakpoint in a small Plutus project such as this, I always get the following error:
:b Week05.Homework1.mkPolicy
cannot set breakpoint on Week05.Homework1.mkPolicy: module Week05....
7
votes
1
answer
302
views
How does `submitTxConstraintsWith` make usage of the ScriptLookups?
submitTxConstraintsWith :: ScriptLookups a -> TxConstraints (RedeemerType a) (DatumType a) -> Contract w s e Tx
How does submitTxConstraintsWith make usage of the ScriptLookups?
I always see it ...
5
votes
1
answer
421
views
What does @ prefix means?
like this:
auctionInstance = Scripts.validator @Auctioning
and Hello-world app from https://playground.plutus.iohkdev.io/tutorial/tutorials/plutus-playground.html#running-the-hello-world-app
hello = ...
4
votes
1
answer
148
views
How to calculate fees for Plutus Smart Contract?
How can someone calculate fee for executing Plutus smart contract given that they know CPU and Memory Units required for executing Plutus Script?
4
votes
2
answers
172
views
(Lecture #6 It #2 - Core.Hs) : Explaining lookups use of both typedValidatorLookups and otherScript?
Can somebody explain these lines and why (both) Constraints.typedValidatorLookups... and
Constraints.otherScript... are used? Still struggling to get my head around lookups, so maybe that is why I'm ...
4
votes
1
answer
249
views
Writing basic validator scripts
I need someone to explain to me line by line. The code is from plutu tutorials. https://docs.cardano.org/projects/plutus/en/latest/plutus/tutorials/basic-validators.html
All the code in that page I ...
3
votes
2
answers
530
views
What exactly is the script context in Plutus context?
I believe the best way to answer this question would be to give examples of the type of information that the script context could contain.
3
votes
1
answer
789
views
What are the benefits of using Plutarch?
Is Plutarch a good replacement for Plutus Tx?
https://github.com/Plutonomicon/plutarch/blob/master/docs/GUIDE.md
3
votes
1
answer
219
views
Couldn't match expected type ‘BuiltinData’ in locally run playground
Working through the Plutus Pioneer Week2 homework and getting the following error in the locally served playground.
error:
• Couldn't match expected type ‘BuiltinData’
with ...
3
votes
1
answer
137
views
Unclear error during Plutus ScriptContext construction (force headList [])
I ran into an error while trying to autobalance a transaction body:
module Foo.Offchain where
import Plutus.V1.Ledger.Scripts (MintingPolicy)
import Plutus.V1.Ledger.Address (Address)
import Hydra....
3
votes
1
answer
164
views
How can I secure a Datum value in a smart contract?
I am trying to figure out how to write a script where you can make sure the datum value doesn't change each time an output gets consumed. For example, in the auction script in the pioneer program each ...
3
votes
1
answer
170
views
Constraints.mustPayToPubKey requires txSignedBy?
For a contract, I want to use Constraints.mustPayToPubKey for an arbitrary pubKeyHash (pkh), such as a lucky winner in a lottery.
Question: Does the validator need to check that the transaction sees ...
3
votes
1
answer
125
views
Canonical example of Smart Contract Verification?
Given that the chief benefit of Cardano Smart Contracts over Ethereum Smart Contracts is formal verification (and thus its implied validity, security, and robustness), is there a non-trivial example ...
3
votes
2
answers
90
views
plutus pioneer week01 src code explain
I'm a little confused about the following code(from EnglishAuction.hs):
auctionInstance :: Scripts.ScriptInstance Auctioning
auctionInstance = Scripts.validator @Auctioning
$$(PlutusTx.compile [|| ...
2
votes
1
answer
92
views
Is it possible to not compile data constructors with plutus-tx?
I'm having a newtype VerificationKey = HydraVerificationKey (VerKeyDSIGN Ed25519DSIGN) and I would love to be able to use that type directly in our plutus scripts. While I can implement PlutusTx....