Questions tagged [plutustx]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
59 views

Is it possible to have an On-chain Set data structure?

As the title of the question says, is it possible for me to use a Set data structure for the Datum and/or Redeemer?
4
votes
0answers
43 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 ...
2
votes
1answer
79 views

String in Datum

I want to use String or Text in a Datum, like this: import PlutusTx.Prelude newtype MyDatum = MyDatum {userReadableStuff :: BuiltinString} PlutusTx.unstableMakeIsData ''MyDatum but the complier ...
3
votes
1answer
68 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 ...
2
votes
1answer
32 views

Are Validators pretending transaction already completed?

A validator is called prior to transaction's start (not to mention completion). But yet a validator routinely checks if a potential recipient has already received his funds, and other such tests about ...
4
votes
1answer
64 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 ...
5
votes
2answers
80 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 ...
6
votes
1answer
64 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 ...
1
vote
1answer
126 views

Is there any eth_sign equivalent signing method in plutus?

I want to use my private key to sign a message, and submit the message and signatures to third party server, the third party server can verify that signatures through plutus smartcontract. In ethereum ...
6
votes
1answer
393 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
2answers
73 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 [|| ...
5
votes
1answer
82 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 ...
14
votes
1answer
285 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....