Questions tagged [plutus-pioneer-program]

A program to recruit and train developers in Plutus for the Cardano ecosystem. Use this tag for questions regarding the Plutus pioneer program. Keep lecture and homework questions brief and on-topic. Give full answers that clearly explain why they resolve the problem.

Filter by
Sorted by
Tagged with
16 votes
4 answers
1k views

On-chain and off-chain for Plutus SCs

Hi I am currently at lecture 5 of the Plutus Pioneers Programm and I was wondering which part of the code is on chain and which is offchain. I know that the valididation script is onchain but the ...
Pierre Previsionz's user avatar
13 votes
1 answer
134 views

Plutus Contracts Delegation

Is there or will there be such a thing where delegators can stake to a smart contract itself, rather than a pool?
KIJIRI's user avatar
  • 687
12 votes
2 answers
179 views

Where can I find design and documentation resources on Plutus Staking smartcontracts?

When I was exploring haddock of Plutus I have found that Plutus script can have Rewarding ScriptPurpose: data ScriptPurpose = Minting CurrencySymbol | Spending TxOutRef | Rewarding ...
KugisMugis's user avatar
12 votes
2 answers
565 views

What does it mean that a UTxO sits at script address?

What does it mean that a "UTxO sits at a script address". What is a script address?
thirsty's user avatar
  • 191
10 votes
3 answers
664 views

Plutus Pioneer Program - Lecture #1- Cabal Build error

I started following the lectures on youtube and got this error when I try to build the English Auction Warning: The build command is a part of the legacy v1 style of cabal usage. Please switch to ...
Ramiro's user avatar
  • 101
9 votes
2 answers
237 views

Where is the returning Contract Monad in the handleError function of Contract Monad?

The type of handleError function is :: (e -> Contract w s e' a)-> Contract w s e a -> Contract w s e' a It takes two arguments a function which takes error and returns a Contract monad (...
raghu's user avatar
  • 1,834
9 votes
1 answer
214 views

plutus starter course

So I am trying to start a plutus project from scratch, as we are always just editing the .hs source files in the plutus pioneering program homeworks, wondering what are the bare necessary files needed ...
Hud's user avatar
  • 433
9 votes
1 answer
68 views

What's the Lars' UTXO diagrams tool?

Maybe this is not a very interesting question but I'd like to know which is the tool that Lars uses in the lectures to draw UTXO's graphs. Thanks in advance!
kindofdev's user avatar
  • 1,304
9 votes
2 answers
179 views

What is where executed and when?

To wrap my around what happens when I where, I tried to visualize it. In order to be able to show the interaction between two different systems generating transactions, I have a Generator A and ...
Kurt Sys's user avatar
  • 172
9 votes
1 answer
451 views

Generate random number in Plutus on-chain code

Is it possible to generate a random number in Plutus on-chain code? For example, if I would like to implement a smart contract that works like gambling game, where a person deposits ADA and bets on a ...
Piotr Gorzelany's user avatar
9 votes
1 answer
93 views

PPP Q&A clarifying submitTxConstraintsWith parameters - lookups and tx

Can someone please explain the difference between the two sets of constraints supplied to submitTxConstraintsWith? 1st question: The function takes two parameters, referred to as "lookups" ...
Steve Mason's user avatar
8 votes
3 answers
183 views

Deriving Show Compilation Error on Plutus Playground

I seem to be getting a compilation error when I try to compile any of the example files on my local host configuration for the Plutus Playground. The error is pictured here: And basically it seems ...
Conor Devlin's user avatar
8 votes
2 answers
163 views

Referencing onchain contract as 3rd party

In solidity and EVM, it is possible to reference external contracts by providing the address and interface to the contract: address ckAddress = 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d; ...
Alan Saw's user avatar
  • 171
8 votes
1 answer
130 views

Confused by compilation message in plutus playground (week 5 pioneer program)

This is part of my attempt at solving the first homework assignment of week 5 in the plutus pioneer program. The rest of the unmodified file can be found here. {-# INLINABLE mkPolicy #-} -- This ...
Matthias Sieber's user avatar
  • 1,557
8 votes
3 answers
400 views

Building local Plutus documentation

I've been following this guide to build Plutus documentation locally. The key line is - [~/plutus] nix-build -A plutus-playground.haddock This works fine, but I'm following the Pioneer Program and ...
Phil Boltt's user avatar
8 votes
5 answers
279 views

Possible DApp infrastructure on Cardano. Interaction with users' wallets

I'm trying to build a possible DApp infrastructure on Cardano in my head. We should write the validation script in Haskell. Also as I understand, it is suggested to use Haskell for the off-chain code ...
Angelina's user avatar
  • 305
8 votes
2 answers
503 views

Plutus Pioneer Program - Problem with plutus playground client

I'm setting up my environment to run the example from lecture #1 (Week01 auction) All compilations went well but when I try the evaluate in the simulator I always receive: interpreter Errors ...
Simone Faré's user avatar
8 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 ...
Attilah's user avatar
  • 431
7 votes
2 answers
492 views

How to convert posixTime to slot number on Cardano Testnet

I'd like to obtain the slot number corresponding to a posixtime on Cardano Testnet. For example, this might be useful if you need to set a slot number in cardano-cli, say building a transaction: ...
kindofdev's user avatar
  • 1,304
7 votes
3 answers
1k views

Can blockchain viewers read the source code of a smart contract if they know its address?

I'm curious, is it possible to find the source code of the validation script of a smart contract (as well as other parts) that is already on the blockchain? Or this code automatically picking up into ...
Angelina's user avatar
  • 305
7 votes
3 answers
548 views

Building Plutus-apps on Mac M1

I am in the 3rd pioneers cohort, going through the env setup. I have Mac M1 with Monterey. I installed nix and added config for the caches etc as recommended here: https://github.com/input-output-hk/...
Bronya's user avatar
  • 101
7 votes
2 answers
226 views

Is there documentation on the Prerequisites for Plutus Pioneer code?

I'm trying to run the Plutus Pioneer code on a Docker container based on https://hub.docker.com/r/nixos/nix. I've followed this guide to install Cabal and GHC https://www.reddit.com/r/haskell/comments/...
phil-hawkins's user avatar
7 votes
2 answers
180 views

Plutus pattern/technique for finding original datum preimage of TxOutDatumHash?

Every UTXO at a script address must have a TxOutDatumHash (or will be unspendable). To spend the UTXO at the validator you provide a datum and a redeemer, the script must validate with your redeemer, ...
hrpr's user avatar
  • 83
7 votes
1 answer
140 views

Plutus tutorial similar to Ethereums "CryptoZombies"

Is anyone aware of a similar tutorial as Ethereum's "CryptoZombies" being built for Plutus on Cardano? I'm currently in the Pioneer program, and although we're incredibly lucky to have Lars ...
alpo's user avatar
  • 71
7 votes
2 answers
225 views

on multiple eUTxO and the validation proces

I have an in-depth question that needs good knowledge of the ledger rules. I was thinking about how to program efficiently and design apps such that they are parallelizable, a good practice for ...
Fermat's user avatar
  • 1,862
7 votes
1 answer
171 views

Pioneer Q&A question: Where is datum actually stored?

Question for Plutus Pioneer cohort 3 Q&A week 1 I'm new to Plutus dev and trying to work out where the datum value is actually stored in a typical Plutus application. From various sources (docs/...
Steve Mason's user avatar
7 votes
2 answers
225 views

Is it possible to make multiple transactions atomic?

A concrete example would be flash loans, where you could borrow some value from a lending script, do something interesting with it, and return the borrowed amount to the script with a fee, all in one ...
Mitchell Turner's user avatar
7 votes
2 answers
182 views

Plutus Pioneer Cohort 2 Lecture 3

I was going through the lecture on Youtube and this is the one with Vesting example where: wallet 1 gifts 20 ADA to wallet 2 in 2 different slots wallet 1 gifts 10 ADA to wallet 3 in a slot later on, ...
Kuldeep Srivastava's user avatar
7 votes
0 answers
97 views

Developers are having dismal experience building on Cardano [closed]

When developers get into plutus playground, 10 out pf 10 expect it to work like remix, an IDE. You put a code in. You compile and deploy. And then start interacting with the dApp. All in the same ...
Adam's user avatar
  • 343
7 votes
1 answer
287 views

Questioning Plutus API design decision

In Lecture 10 from the Plutus Pioneer Programm there is a replica of the Uniswap Smart Contract built on top of Plutus. It is actually part of the standard Plutus use cases Plutus Uniswap To have a ...
Marco Jakob's user avatar
6 votes
4 answers
633 views

Plutus environment set up: pro and cons

I am starting the Pioneer program by setting up the development environment. There are several ways to do that, I think 4! At the end the two that seems to me more appealing are the one using nix or ...
Angelo Badellino's user avatar
6 votes
1 answer
420 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 = ...
mackie's user avatar
  • 433
6 votes
1 answer
224 views

When actually a validator is deployed to the blockchain?

I'm re-watching the Plutus Pioneer Program and in the video #2 I don't exactly get it here: https://youtu.be/E5KRk5y9KjQ?t=1782 There's the same contract code used by Wallet1 and Wallet2. Each of them ...
emesik's user avatar
  • 876
6 votes
1 answer
161 views

How do you publish on-chain code to mainnet and testnet?

I've understand that the on-chain code is stored in the blockchain through Playground module which is in sync against a local node. But how to "publish" this code to run anywhere? It's an ...
Walker Leite's user avatar
6 votes
4 answers
322 views

How to prevent economic DOS attacks against Plutus contracts

Many people wrote about the eUTXO model and the benefits it brings compared to Ethereum. However, eUTXO also comes with some challenges. In particular, eUTXO is susceptible to "economic denial of ...
Mike76's user avatar
  • 161
6 votes
1 answer
305 views

How do I deploy a smart contract from another smart contract?

If I want to create one top level contract for creating a bunch of other, similar contracts, lets say a top level Uniswap contract that creates liquidity pool contracts and keeps track of the total ...
yoyobigmanyo's user avatar
6 votes
2 answers
176 views

npm build of plutus client fails with "permission denied"

I am trying to run the Plutus playground using the Gitbook recipe (https://docs.plutus-community.com/docs/setup/WindowsWSL.html). At step 15, the server starts fine, but trying to run the client with &...
KenA's user avatar
  • 161
6 votes
2 answers
73 views

Failed to build eventful-sql-common-0.2.0

For lecture 10 of plutus pioneering program, we had to run cabal run uniswap-pab to create the contract IDs. I got this - plutus-pioneer-program-week10-0.1.0.0 (exe:uniswap-pab) (first run) Starting ...
Hud's user avatar
  • 433
6 votes
0 answers
144 views

Cannot Get haskell-language-server running - duplicate symbol "sqlite3_fts3_may_be_corrupt"

hoping someone can help with this So, I would like to get the haskell-language-server running, in the context of the plutus-pioneers-program, so that in VS Code I can Ctrl+Click and view type ...
Benjamin Moore's user avatar
5 votes
3 answers
2k views

What does "off-chain code lives in the wallet" mean?

That terminology was used in PPP3 lectures, but what does it mean? The spending transaction should follow rules of the smart contract as was answered here Can blockchain viewers read the source code ...
Angelina's user avatar
  • 305
5 votes
1 answer
240 views

Q&A English Auction- if a wallets under bids then provides a valid bid, why doesn't it count the second good bid?

if you set up the english auction with three wallets and do the following: Wallet 1 min bid 10 Wallet 2 bids 15 wallet 3 bids 9 wallet 3 bids 20 wallet 1 closes It will got to wallet 2 and wallet ...
noone392's user avatar
  • 263
5 votes
2 answers
348 views

How can I set up my dev environment faster after pulling the pioneer code repos for each week

Each week so far it takes me over 1.5 hours to bring my dev environment up to date after updating the plutus-pioneer-program and plutus-app repos. This is really painful. I'm wondering if someone can ...
Steve Mason's user avatar
5 votes
1 answer
231 views

Why does my test of Plutus contract crash?

I tried to equip the EnglishAuction.hs contract from Plutus Pioneer Program week 01 with test routine designed according to what Lars presented in later lectures: doTest :: IO() doTest = ...
emesik's user avatar
  • 876
5 votes
1 answer
358 views

What are the ways of making NFTs unique?

In the week 5 of Plutus Pioneer Program Lars described how to make NFT by spending an UTxO while minting, therefore ensuring the uniqueness of the token. Are there any other ways of making NFTs unique?...
emesik's user avatar
  • 876
5 votes
2 answers
180 views

Pioneer Lecture 4 recursion - how is it not infinite?

In the solution for the Lecture #4 (cohort 1 I guess, I'm following on Youtube) payContract :: Contract () PaySchema Text () payContract = do pp <- endpoint @"pay" let tx = ...
marcel_g's user avatar
  • 239
5 votes
1 answer
76 views

Understanding do notation with Monads in Plutus Pioneer Week 04

I have a question regarding a block of code from th Week04 Plutus Pioneer Program. The block is in Writer.hs foo'' :: Writer Int -> Writer Int -> Writer Int -> Writer Int foo'' x y z = do ...
Phil Boltt's user avatar
5 votes
1 answer
58 views

Type instance syntax

I have already learned haskell from http://learnyouahaskell.com/chapters, but it doesn't cover the type instance syntax, like this: data Auctioning instance Scripts.ValidatorTypes Auctioning where ...
mackie's user avatar
  • 433
5 votes
1 answer
93 views

What is the correct Plutus repo tag for Plutus Pioneer Program week01?

I'm starting out with the Plutus Pioneer Program at https://github.com/input-output-hk/plutus-pioneer-program. One of the first steps is to clone the Plutus repo https://github.com/input-output-hk/...
phil-hawkins's user avatar
5 votes
2 answers
129 views

How to optimize Plutus smart contracts?

Context I'm creating scripts with hardcoded parameters in my smartcontract and I would like to reduce footprint of them to reduce transaction fees. Right now i'm doing so using parameterized ...
KugisMugis's user avatar
5 votes
2 answers
198 views

testing the English Auction example

I've been toying around with the English Auction example and I have two questions: After an invalid bid (less than the minimum bet set for the auction) from a wallet, a second valid bid from the same ...
Mihai Codescu's user avatar

1
2 3 4 5
8